Displaying a particular SMS in default messaging app

Put your problem here if it does not fit any of the other categories.

Displaying a particular SMS in default messaging app

Postby westmeadboy » Sun Nov 29, 2009 6:33 am

I have an SMS represented by this URI:

content://sms/123

and wish to start whatever SMS application can display that SMS.

So I tried:

Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

which gave:

11-28 17:36:19.817: ERROR/AndroidRuntime(5609): android.content.ActivityNotFoundException: No Activity found to handle Intent { action=android.intent.action.VIEW data=content://sms/123 }

on the 2.0 emulator, it brings up a dialog box showing some "unsupported" message.

Then I tried:

Intent intent = new Intent(null, uri);
startActivity(intent);

which takes me to the "Set up your google account" wizard on my HTC Hero and to the SMS composition activity on my 2.0 emulator.

1. Is there an Intent for displaying individual SMS messages? If not, an intent for displaying the Inbox?
2. Where is the starting point for documentation on which actions are supported for various uris etc?
westmeadboy
Once Poster
Once Poster
 
Posts: 1
Joined: Fri Oct 16, 2009 3:04 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: Google [Bot] and 17 guests