Search code examples
androidparsingsmspdu

Parsing SMS PDU


Seems to be that I need to parse PDU byte array received during SMS BroadcastReceiver:

@Override
public void onReceive(Context context, Intent intent) 
{ 
    Bundle bundle = intent.getExtras();
    Object[] pdus = (Object[]) bundle.get("pdus");
}

Can someone point me how to do it?

I know that PDUs can be handled using SmsMessage.createFromPdu((byte[]) pdus[i]) but it's not what I'm looking for. I need more precise control over pdu bytes.


Solution

  • I have found solution - there's nice Java and dot NET library (under Apache license), which handles all PDU related stuff - parsing and so on. It's SMSLib