[android-developers] Re: About to receive the mms

2009-08-01 Thread PianoPan

Yes, I already add this permission.

On Fri, Jul 31, 2009 at 11:47 PM, Jack Hajack...@t-mobile.com wrote:

 Do you have the following in your AndroidManifest.xml file?

 uses-permission android:name=android.permission.RECEIVE_MMS/

 --
 Jack Ha
 Open Source Development Center
 ・T・ ・ ・Mobile・ stick together

 The views, opinions and statements in this email are those of
 the author solely in their individual capacity, and do not
 necessarily represent those of T-Mobile USA, Inc.


 On Jul 31, 1:45 am, Piano Pan piano...@gmail.com wrote:
 I use the BroadcastReceiver to get the MMS information, but the
 onReceive can not get the message when MMS coming.

 Code as following:

 private static final String ACTION_SMS_RECEIVED =
 android.provider.Telephony.SMS_RECEIVED;
     private static final String ACTION_MMS_RECEIVED =
 android.provider.Telephony.WAP_PUSH_RECEIVED;
     private static final String MMS_DATA_TYPE = 
 application/vnd.wap.mms-message;

  public int RegistReceiver()
     {

         IntentFilter filter = new IntentFilter();
         filter.addAction(ACTION_MMS_RECEIVED);
         filter.addAction(ACTION_SMS_RECEIVED);
         try {
             filter.addDataType(MMS_DATA_TYPE);
         } catch (MalformedMimeTypeException e){
         }
         this.registerReceiver(this.mReceiver, filter);
         return 0;
     }
     public int UnregisterReceiver()
     {
         this.unregisterReceiver(this.mReceiver);
         return 0;
     }

     class MSGTestReceiver extends BroadcastReceiver
     {

         @Override
         public void onReceive(Context context, Intent intent) {

             String action = intent.getAction();
             String dataType = intent.getType();
             if (ACTION_SMS_RECEIVED.equals(action))
             {
                 MDebug.V(Message is a SMS);
             } else {
                 MDebug.V(Message is a MMS);
             }
         }

     }

 This code can work when SMS coming. Does anybody give me some
 comments?

 Regards

 Pan
 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to check a activity have exit?

2009-01-21 Thread PianoPan

Hi,

Does anyone know how to check if a activity have exit, I know the
activity's package name, I use the 'ps' to check the process list. but
android did not free the process after activity quit.

Pan

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---