tags:

views:

42

answers:

1

Hi all,

I had written an simple program in android to show an notification..By click on notification msg i have to go to inbox. I am using the following code.

Intent notifyIntent = new Intent(android.content.Intent.ACTION_VIEW,Uri.parse("content://sms/inbox"));
PendingIntent intent = PendingIntent.getActivity(SimpleNotification.this, 0, 
                    notifyIntent, android.content.Intent.FLAG_ACTIVITY_NEW_TASK);

I am able to recieve notification but by clicking on notification i am not able to go to inbox..

Please any help..thanks in advance

A: 

According to the answer to this question, the following will launch the messaging app. However, this makes use of undocumented APIs which are not part of the Android core. Developers should not use the com.android.mms application as it is not guaranteed to work in future versions or on all devices.

Intent intent = new Intent("android.intent.action.MAIN");
intent.setComponent(
    new ComponentName("com.android.mms","com.android.mms.ui.ConversationList"));
startActivity(intent);
Brian
This will not work on some devices and may not work in future versions of Android. Neither the `com.android.mms` application nor the `content://sms/inbox` content provider should be used by developers, as neither are part of the operating system.
CommonsWare
Thanks, I've updated my answer with a warning.
Brian
Thanks..i will check it out.
Sridhar Bandi