Reputation: 593
I cannot find a way to dismiss the SMS screen/activity after sending SMS successfully.
At the moment i can send SMS, but to come back to my app i have to press back.
I want the SMS screen to be dismissed AND control to come to my app automatically after sending the SMS.
This is the code i am using:
Uri uri = Uri.parse("smsto:" + "074********; 074********");
Intent smsSIntent = new Intent(Intent.ACTION_SENDTO, uri);
smsSIntent.putExtra("sms_body", "iconference sms");
startActivity(smsSIntent);
Upvotes: 3
Views: 1599
Reputation: 796
You need to use exit on sent to return back to your application.
sendIntent.putExtra("exit_on_sent", true);
Upvotes: 4
Reputation: 865
You have to create activity
in your application
which sends SMS
then you can call finish()
from your activity
to exit from activity
. By using built-in SMS
screen you cannot exit the screen until you do it by your self. Here is a good tutorial
for sending SMS
from your application
.
Upvotes: 1