I've made a simple BroadcastReceiver to catch the MMS before the native app. Now I want to parse the data of this MMS in order to do some work on it.
In my onReceive
method, I've the following code:
if (intent.getAction().equals(MMS_RECEIVED) && intent.getType().equals("application/vnd.wap.mms-message"))
{
Log.e(">>>>>", "MMS");
try
{
byte[] pushData = intent.getByteArrayExtra("pdu");
// What to do with that ?
}
catch (Exception e)
{
e.printStackTrace();
}
// TODO Send notification
}
How can I retrieve the MMS data and download the associated part ?
This may be useful. The was mms is handled is quite different to SMS and the below link is similar to what I do: https://github.com/romannurik/dashclock/blob/master/main/src/main/java/com/google/android/apps/dashclock/phone/SmsExtension.java