daily pastebin goal
37%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Override
  2. public void onReceive(Context context, Intent intent) {
  3.     Bundle bundle = intent.getExtras();
  4.  
  5.     Object messages[] = (Object[]) bundle.get("pdus");
  6.     SmsMessage smsMessage[] = new SmsMessage[messages.length];
  7.     for (int n = 0; n < messages.length; n++) {
  8.     smsMessage[n] = SmsMessage.createFromPdu((byte[]) messages[n]);
  9.     }
  10.  
  11.     // show first message
  12.         Toast toast = Toast.makeText(context,
  13.                 "SMS Makassar Diterima : " + smsMessage[0].getMessageBody(), Toast.LENGTH_LONG);
  14.                 toast.show();          
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top