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
@moniyax
moniyax / Car.java
Last active August 4, 2018 16:25
Object things
// A class is used to mint new objects. The class here is used to create new car objects
// in the program. You may think of it as a car factory.
// Classes specify methods and attributes.
// Methods define operations that can be performed on (or by) an object: a car in this case.
// The methods defined in this Car class are "move" and "turn". See the comments written for
// each method for info on their functions.
// Attributes indicate well... attributes of objects. They help ho"ld the state of the object
// at any given instance. The attributes for the car are "location", "brand", "model", and "direction".
// Silly silly old Car
@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() {