Hi Eric,

Did you succeed in managing to get this from the smsMessage object?

Cheers,

Jodi

On Aug 27, 5:58 pm, "Eric Belen" <[email protected]> wrote:
> I have this code from an SMS receiver.  How do I get the:
> 1.  Message ID (_id)
> 2. Thread ID(thread_Id)
>
>      public void onReceive(Context context, Intent intent)
>      {
>        Bundle bundle = intent.getExtras();
>        if(bundle != null)
>        {
>         Object[] pdus =(Object[])bundle.get("pdus");
>         SmsMessage[] messages = new SmsMessage[pdus.length];
>
>         for(int i=0; i < pdus.length; i++ )
>          messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
>
>         for(SmsMessage message : messages)
>         {
>          int msgId     = >>> how do you do this here???
>          String msg   =  message.getMessageBody();
>          String from  =  message.getOriginatingAddress();
>          }
>         ...      
>        }
>
> thanks in advance.
>
> Eric

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to