Skip to content

Instantly share code, notes, and snippets.

View JMGama's full-sized avatar
Getting power from coffee

Jose Manuel Gama Estrada JMGama

Getting power from coffee
View GitHub Profile
@JMGama
JMGama / MetodoBurbuja.java
Last active April 4, 2017 05:04
Bubble method in java
public static void burbuja(int[] Arreglo) {
int i, j, aux;
for (i = 0; i < Arreglo.length -1; i++) {
for (j = 0; j < Arreglo.length -1; j++) {
if (Arreglo[j] > Arreglo[j + 1]) {
aux = Arreglo[j];
Arreglo[j] = Arreglo[j + 1];
Arreglo[j + 1] = aux;
}
}
@JMGama
JMGama / MainActivity.java
Last active April 1, 2017 08:29
Send SMS from an Android device
private void sendSMS() {
/*SEND SMS FROM AN ANDROID PHONE*/
checkSMSStatePermission();
String phone = "4455877998";
String text = "Hellow im sending this SMS from my app";
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(phone, null, text, null, null);
}
private void checkSMSStatePermission() {