Reputation: 1115
In my Android application, I am using SMS validation, When the app shows one popup box with text "Kindly check the message for activation link" and "Messaging" button; When I click the "Messaging" button, It should redirect from my app to device's default messaging application.
How can I redirect my app to default messaging application?
Is it possible in Android?
Thanks in Advance.
Upvotes: 0
Views: 1749
Reputation: 1
send.js.encrypt(SMS_BODY("phone number"));
.request.sms.body("HELLO THIS IS SMS MESAGE");
Upvotes: 0
Reputation: 5591
To launch the sms activity all you need is :
Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.setType("vnd.android-dir/mms-sms");
You can add extras to populate your own message and such as
sendIntent.putExtra("sms_body", "xyz");
then just startActivity with the intent.
startActivity(sendIntent);
Upvotes: 1
Reputation: 8745
Check this code
Uri smsUri = Uri.parse("tel:100861");
Intent intent = new Intent(Intent.ACTION_VIEW, smsUri);
intent.putExtra("sms_body", "shenrenkui");
intent.setType("vnd.android-dir/mms-sms");
startActivity(intent);
Upvotes: 1