문제 설명
인텐트를 사용하여 메시지 작성 열기 (Opening create message using an intent)
I have the following code which displays a create message screen.
String uri= "smsto:";
Intent intent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uri));
intent.putExtra("compose_mode", true);
startActivity(intent);
However, when the intent is called, I am asked to choose from a list of apps like messages, whatsapp, Skype, etc. Is it possible for my app directly to open messages instead of asking the user to choose an option?
참조 솔루션
방법 1:
No it is not possible. As by sending an implicit intent you are requesting to perform a task, this intent can be caught by all application which register intent filter with same intent name. you do not have control over selecting an application directly from a a number of application with same intent filter.