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. How can I use methods from an activity in other activities

Basically, I have two different Activities, one of them has 2 member
functions which I want to use them in other activities.

so here in Splash class activity, I referenced to Htest class:

private final Htest htest;

but I get this error: The blank final field hsudoku may not have been

Please look at the following code and u will see what I mean.

here is the activity which has two member functions

public class Htest extends Activity implements OnClickListener{

    public void onCreate(Bundle savedInstanceState) {

        setNoTitle();     //no Title
        setFullscreen(); //Full screen




    public void setFullscreen() {


    public void setNoTitle() {


now here is another activity which I want to reference to those member

public class Splash extends Activity {

       private final Htest htest; //reference to Htest class

       private Splash_view splashview;

       public void onCreate(Bundle savedInstanceState) {

       htest.setNoTitle(); // this gives me this error:  The blank
final field hsudoku may not have been initialized


        splashview = new Splash_view(this);



2. Running linux commands from java code

I am trying to execute "ls -a" from java code, any idea how to do so.

3. How to read Sensors from home screen Widget (1.5 cupcake)?

4. Can an end user disable 2G data, or GSM function?

5. How to read Sensors from home screen Widget (1.5 cupcake)?

6. Android UI related:

7. Android Emulator Porting: Makefile.boot is not present