-3

I am trying to Display a Toast When the Message is Successfully Sent from android in-built app. but i not found any satisfactory result over the internet. Please help me out with some useful links.

1 Answers1

1

Use PendingIntent object to monitor the status of the SMS:

PendingIntent sentPI = PendingIntent.getBroadcast(this, 0,
        new Intent(SENT), 0);

And Broadcast Receiver objects to display a Toast:

registerReceiver(new BroadcastReceiver(){
        @Override
        public void onReceive(Context arg0, Intent arg1) {
            switch (getResultCode())
            {
                case Activity.RESULT_OK:
                    Toast.makeText(getBaseContext(), "SMS sent", 
                            Toast.LENGTH_SHORT).show();
     }
        }
    }, new IntentFilter(SENT));

Refer this link for more details,it may help you:http://mobiforge.com/design-development/sms-messaging-android

Giridharan
  • 708
  • 7
  • 16
  • thanks for your response but the link actually using smsmanager class which is used for sending sms from your own app bt i am looking for displaying toast when i send sms from android inbuilt sms app.please help out with that relavence. – chandan chaudhary Jan 29 '15 at 06:10