This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
En un metodo o en un evento poner simplemente | |
{{ | |
Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); | |
startActivityForResult(cameraIntent, CAMERA_REQUEST); | |
}} | |
Ahí mandas a llamar el intent correspondiente | |
Y en cuando tomas la foto o lo que sea ejecutas esto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package uaa.bedl.examenii; | |
/** | |
* Created by Bety on 07/04/2015. | |
*/ | |
import android.content.Context; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Carlos Bedoy on 15/05/14. | |
* exchange-android - Pademobile | |
*/ | |
package org.pademobile.bills.services.inapp; | |
import android.app.Activity; | |
import android.graphics.Bitmap; | |
import android.graphics.Color; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim cs As String = "Database=testdb;Data Source=localhost;" _ | |
& "User Id=testuser;Password=test623" | |
Dim stm As String = "SELECT VERSION()" | |
Dim version As String | |
Dim conn As MySqlConnection | |
Try | |
conn = New MySqlConnection(cs) | |
conn.Open() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UserORMProvider userORMProvider = new UserORMProvider(getApplicationContext(), "DB", null, 1); | |
//Add User | |
User userToAdd = new User(); | |
userToAdd.setId(1); | |
userToAdd.setName("Bedoy"); | |
userToAdd.setAge(24); | |
userORMProvider.addUser(userToAdd); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProvedorDeUsuarios extends SQLiteOpenHelper{ | |
public ProvedorDeUsuarios(Context context, String name, SQLiteDatabase.CursorFactory factory, int version) { | |
super(context, name, factory, version); | |
} | |
//Este es mi Script para crear la base de datos, no me apuro por si es incremental puesto que el sqlite de Android no lo tiene :c | |
private final String sqlCreateScript = "CREATE TABLE Users (username TEXT, password TEXT, first_name TEXT, last_name TEXT)"; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[{"id":1,"city":"Bunirasa","country":"Indonesia","latitude":"-7.4109","longitude":"108.4482","color":"Khaki","company":"Zooveo","full_name":"Sara Reid","phone":"9-(047)956-8930"}, | |
{"id":2,"city":"Sayama","country":"Japan","latitude":"35.85295","longitude":"139.41212","color":"Indigo","company":"Rhyloo","full_name":"Deborah Foster","phone":"7-(591)102-9021"}, | |
{"id":3,"city":"Stockholm","country":"Sweden","latitude":"59.3326","longitude":"18.0649","color":"Yellow","company":"Riffpedia","full_name":"Samuel Edwards","phone":"2-(270)726-2866"}, | |
{"id":4,"city":"Yushugou","country":"China","latitude":"44.124","longitude":"127.53072","color":"Green","company":"Skinte","full_name":"Sharon Ortiz","phone":"0-(702)854-1508"}, | |
{"id":5,"city":"Stockholm","country":"Sweden","latitude":"59.3326","longitude":"18.0649","color":"Teal","company":"Jetwire","full_name":"Diana Jordan","phone":"9-(837)561-5758"}, | |
{"id":6,"city":"Verkhniy Mamon","country":"Russia","latitude":"50.1635","longitude":"40.3832","color":"Indigo","company": |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SplashViewController extends Activity | |
{ | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.el_layout_de_mi_splash); | |
new Handler().postDelayed(new Runnable() { | |
@Override |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package self.cbedoy.utils; | |
/** | |
* Created by Carlos Bedoy on 17/06/2015. | |
* | |
*/ | |
public class Utils | |
{ | |
public static void printChromosomeWithTitle(int[] chromosome, String title){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="cbedoy.gymap" > | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.GET_ACCOUNTS"/> | |
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> |