Question

I'm to work on an application that has to intercept WAP push messages and then /do something/ with the information. I've read up as much as I could on WAP and handling WAP, etc. I was able to write a prototype that would parse binary/hex strings that were sent across as part of the intent extras of the WAP_PUSH_RECIEVED broadcast.

I've tried reading up things here as well, but I cannot seem to understand some things clearly.

1) How is a textual WAP message handled in Android? Is is intercepted the same and will that information also be sent as the data in the broadcast? Meaning, when we are writing a User Agent in android, can we simply assume that WAP messages, text, wbxml or otherwise is handled and broadcast along with the WBXML form?

2) I've been trying to listen to WAP messages, specifically the ones sent out for GMail, and nothing is detected. Does this mean that these messages are specifically delivered to the Gmail UA only, and therefore we can't get them, or am I doing something wrong? The below is from my manifest. I also have the appropriate permissions

       <intent-filter android:priority="999" >
            <action android:name="android.provider.Telephony.WAP_PUSH_RECEIVED" />
            <data android:mimeType="application/*" />
            <data android:mimeType="application/vnd.wap.emn+wbxml" />
            <data android:mimeType="text/vnd.wap.emn+xml" />
            <data android:mimeType="text/vnd.wap.emn" />
            <data android:mimeType="text/vnd.wap.emnc" />
        </intent-filter>

I tried with MMS as the mime type and was able to work with it, but the WAP message otherwise eludes me.

Any help would be appreciated. Ta!

Was it helpful?

Solution

Just in case there is someone looking for similar information as I requested:

1) Yes, there is a Data SMS parser in the Android framework that takes up the responsibility of parsing any incoming message, and converts it to the compact WBXML form, as part of the broadcast. On a side note, we can user the kxml2 library to convert the WBXML back into XML, with or without having to create a file for it. kxml2 has methods that will produce a tree in memory to search through.

2) Gmail WAP push messages are sent out specifically, I think, some of the software online that claim push message functionality for Gmail are really using the broadcast sent out indicating there has been a change in the gmail inbox. Other WAP messages were received when a specific and correct mimeType was provided in the manifest.

Thanks!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top