Android Intent Set extractSMSmessages(Intent intent)

Here you can find the source of extractSMSmessages(Intent intent)

Description

extract SM Smessages

Declaration

public static SmsMessage[] extractSMSmessages(Intent intent) 

Method Source Code

//package com.java2s;

import android.content.Intent;

import android.telephony.gsm.SmsMessage;

public class Main {
    public static SmsMessage[] extractSMSmessages(Intent intent) {
        Object[] pdus = (Object[]) intent.getExtras().get("pdus");
        SmsMessage[] msgs = new SmsMessage[pdus.length];
        for (int i = 0; i < pdus.length; i++) {
            msgs[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
        }/*  w  w w  . j ava  2 s.  c o  m*/
        return msgs;
    }
}

Related

  1. getAppStartIntent(Context context)
  2. dumpBundleKeys(Intent intent)
  3. setBlankContentIntent(Context context, NotificationCompat.Builder builder)
  4. setNewTaskFlag(@Nonnull Intent intent)
  5. createCallIntent(String phoneNumber)
  6. registerReceiver(Context c, BroadcastReceiver receiver, IntentFilter f, boolean local)
  7. toByteArray(Intent intent)