Hi,
Is there a way to open up the Messaging Activity on android with a specify SMS? Thank you.
Hi,
Is there a way to open up the Messaging Activity on android with a specify SMS? Thank you.
I dug this out of the source for the Messaging app (lines 311-315), so I'm pretty sure it'll work, but I don't have any experience with it.
// threadId should be the id of the sms/mms thread you want to view
long threadId = 0;
Intent i = new Intent("com.android.mms");
i.setData(
Uri.withAppendedPath(
i.getData(), Long.toString(threadId)
)
);
i.setAction(Intent.ACTION_VIEW);
// threadId should be the id of the sms/mms thread you want to view
Intent defineIntent = new Intent(Intent.ACTION_VIEW);
defineIntent.setData(Uri.parse("content://mms-sms/conversations/"+threadId));
myActivity.startActivity(defineIntent);
This is the simplest way I found