Created
April 12, 2017 08:04
-
-
Save murano500k/005e0335ad4b9dadac132b126379c345 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/html"); intent.putExtra(Intent.EXTRA_EMAIL, "[email protected]"); intent.putExtra(Intent.EXTRA_SUBJECT, "Subject"); intent.putExtra(Intent.EXTRA_TEXT, "I'm email body."); startActivity(Intent.createChooser(intent, "Send Email"));Jan 2, 2012 | |
http://umeshisran4android.blogspot.com/2015/11/how-to-readparse-ussd-messages.html | |
read sms | |
Intent intent = getIntent(); | |
Bundle bundle = intent.getBundleExtra("mySMS"); | |
if (bundle != null) { | |
Object[] pdus = (Object[])bundle.get("pdus"); | |
SmsMessage sms = SmsMessage.createFromPdu((byte[])pdus[0]); | |
Log.i("mobile.cs.fsu.edu", "smsActivity : SMS is <" + sms.getMessageBody() +">"); | |
//strip flag | |
String message = sms.getMessageBody(); | |
while (message.contains("FLAG")) | |
message = message.replace("FLAG", ""); | |
TextView tx = (TextView) findViewById(R.id.TextBox); | |
tx.setText(message); | |
} else | |
Log.i("mobile.cs.fsu.edu", "smsActivity : NULL SMS bundle"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment