is there a way to create a menu from scratch?

by ~ TreKing » Fri, 23 Apr 2010 02:46:30 GMT


Sponsored Links
 



... because ... ?

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--



Other Threads

1. How Delete SMS

Hi all,

 I am trying to delete SMS from inbox but not able to delete any one
can help me i am trying like this
message format which i received  "123 abcde ijklm"
************************************
public class VOPSMSReceiver extends BroadcastReceiver {

        private String userName = null;
    private String password = null;
    private String receivedSMS = null;
        @Override
        public void onReceive(Context context, Intent intent) {

        if(!intent.getAction().equals
("android.provider.Telephony.SMS_RECEIVED"))
        {
                return;
        }
        SmsMessage smsMsg[] = getMessagesFromIntent(intent);

        for(int i=0; i < smsMsg.length; i++)
        {
                receivedSMS = smsMsg[i].getDisplayMessageBody();
                if(receivedSMS.startsWith("1234"))
                  {
                          String[] dataArray = VOPUtility.breakIntoLines
(receivedSMS, ' ');
                          String uName = dataArray[1];
                          String uPassword = dataArray[2];
                          this.updateUsernamePassword(context, uName, 
uPassword);//saving
req data
                          Toast.makeText(context,"Settings saved", 
Toast.LENGTH_LONG).show
();
                  try{
//*****here i want to delete sms which i receive currently which is
starting with 123 *****//

                        Uri uriSms = Uri.parse("content://sms/inbox");
                        Cursor c = context.getContentResolver().query(uriSms,
null,null,null,null);
                        int thread_id = c.getCount();//c.getInt(1); //get the 
thread_id
                        Log.i("Thread Id***",""+thread_id);
                        Log.i("COUNT ***",""+c.getCount());
                      context.getContentResolver().delete(Uri.parse
("content://sms/conversations/"
                       +thread_id),null,null);
                    }catch(Exception e)//conversations
                            {
                                Log.i("exception ",e.getMessage());
                            }
                  }

            }

   }

        private SmsMessage[] getMessagesFromIntent(Intent intent)
        {
                SmsMessage receivedSMS[] = null;
                Bundle bundle = intent.getExtras();
                try{
                        Object pdus[] = (Object [])bundle.get("pdus");
                        receivedSMS = new SmsMessage[pdus.length];
                        for(int n=0; n < pdus.length; n++)
                        {
                                byte[] byteData = (byte[])pdus[n];
                                receivedSMS[n] = 
SmsMessage.createFromPdu(byteData);
                        }

                }catch(Exception e)
                {
                        Log.e("GetMessages", "fail", e);
                }
                return receivedSMS;
        }

**********************************
in try catch block i want to delete sms after getting my required data
like username and password

i want to delete this perticullar sms .i have received sms
successfully get the required data but after getting data i m not able
to delete that sms
any one can help me how i can delete it .OR  prevent it to received in
inbox  ?

Thanks,
Gulfam
--~--~---------~--~----~------------~-------~--~----~

2. Fwd: GMAPS is not being displayed in the emulator

Kindly look at this query....and help me regarding the issue..

thank you

--~--~---------~--~----~------------~-------~--~----~

3. Starting app not listed in launcher

4. Working of locationListener() in Android DEV Phone...

5. Face Detection

6. question about WebView and MapView

7. Enabling PV logging in Opencore2.0