How can I receive WAP Push with custom MIME Type?

by RainBow » Tue, 15 Dec 2009 09:38:02 GMT

Sponsored Links

I am trying to write a simple code that will receive a WAP Push
message on my device. However, when I send a wap message with a custom
mime-type, I get the following error (taken from logcat logs):

Received PDU. Unknown Content-Type = XYZ

where XYZ = my custom MIME-typed message

Looking at the relevant telephony code (, I found
that their is no switch in the code that will be able to handle a
custom MIME type. (Please see the code below)

So, how do I go about sending a wap-push with custom MIME type? Any

Thanks for reading/answering my post in advance.

Kind regards.


URL: ;a=blob_plain;f=telephony/java/com/android/internal/telephony/;hb=15ab3eae2ec3d73b3e8aa60b33ae41445bf83f4b

Relevant code from

 if (mimeType.equals

 129                 binaryContentType =

 130             } else if (mimeType.equals

 131                 binaryContentType =

 132             } else if (mimeType.equals

 133                 binaryContentType =

 134             } else if (mimeType.equals

 135                 binaryContentType =

 136             } else if (mimeType.equals

 137                 binaryContentType =

 138             } else if (mimeType.equals

 139                 binaryContentType =

 140             } else {

 141                 if (Config.LOGD) Log.w(LOG_TAG, "Received PDU.
Unknown Content-Type = " + mimeType);

 142                 return;

 143             }


Other Threads

1. Merry Xmas & Happy New Year 2010

Wishing u a wonderful & joyful CHRISTMAS. & HAPPY NEW YEAR 2010 to all my 
beloved friends who celebrate it...Let's celebrate it with purifying heart & 


bimo wicaksono

Google Groups "Indonesian Android Community [id-android]" group.

To post to this group, send email to

To request to subscribe to this group:


2. MediaRecorder - how to continuously record in memory (using a circular buffer)

Dear All,

I'm trying to use the MediaRecorder to have my application
continuously record audio in memory (to a circular buffer of a known
size). Indeed, I'd like to be able to play back the past 10 seconds of
recorded based on a certain event in my program.

Much of the Media API is designed to linearly record audio to a file.

Has anyone an idea on how I could best do this with or without the
default API ?



3. Kuota Data

4. Created my app - how do i put it onto my g1 phone?

5. Creating SetContentView

6. Subscript

7. Unpublished App receiving comments and ratings