How to get an Android app with MMS support

can anyone help me find the MMS id, I am using this code to get the MMS text, but I donโ€™t know the MMS id (mmsId), so I stopped !!

I would be grateful for your help

Samila

+3


source to share


1 answer


Uri mmsInboxUri = Uri.parse("content://mms");               
Cursor mmsInboxCursor = getContentResolver().query(mmsInboxUri ,new String[]     
    {"_id","msg_box","ct_t","date"}, "msg_box=1 or msg_box=2", null, null);
int count = mmsInboxCursor.getCount(); 
if(mmsInboxCursor != null){

    try{

         if (mmsInboxCursor.moveToFirst())
         {                  
            do{

                System.out.println("<====MONITORING MESSAGES====>");                                
                int id = mmsInboxCursor.getString(0); 
              }while(mmsInboxCursor.moveToNext());
        }
    }catch (Exception e) {

        System.out.println("MMSMonitor :: startMMSMonitoring Exception== "+ e.getMessage());
    }
}

      



0


source







All Articles