1

I'm writing an android app which have one function of searching the SMS content. After getting the result, if user clicks the one item, I want to open other SMS app to view details

Then I use code from link launch sms application with an intent

My question is, seems the code from above only open the conversation, and locate me to the latest message.

How to open one exact message? I mean navigate user to correct location of the conversation, not always the end. Can I provide id or other informations to Intent?

Community
  • 1
  • 1
wanana
  • 361
  • 1
  • 9

1 Answers1

0

After reading the source code I found the solution.

Before transfer to other Intent, put extra infomation thread_id and select_id(the _id property of the sms). Code is:

    smsIntent.setAction("android.intent.action.VIEW");

    smsIntent.putExtra("thread_id",Long.valueOf(threadIdView.getText().toString()));
    smsIntent.putExtra("select_id",Long.valueOf(idView.getText().toString()));
wanana
  • 361
  • 1
  • 9