I have a question about an intent... I try to launch the sms app...
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setType("vnd.android-dir/mms-sms");
int flags = Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP |
Intent.FLAG_ACTIVITY_CLEAR_TOP;
intent.setFlags(flags);
intent.setData(Uri.parse("content://sms/inbox"));
context.startActivity(intent);
so, you can see that I put too much things in my intent, but that's because I don't know how I can do... Thank's
on emulator this work for me
If android version is Kitkat or above, users can change default sms application. This method will get default sms app and start default sms app.
The below code works on android 6.0.
It will open the search activity in the default messaging application with the conversations related to specific string provided.
You can start the search activity with an intent. This will open the search activity of the default messaging application. Now, to show a list of specific conversations in the search activity, you can provide the search string as string extra with the key as
as is shown in the onCreate of this class
You can also pass the SENDER_ADDRESS of the sms as string extra, which will list out all the conversations with that specific sender address.
Check com.android.mms.ui.SearchActivity for more information
You can also check this answer