It's me
It's me

Reputation: 1115

Android - How to redirect my app to default messaging application?

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

Answers (3)

user23171584
user23171584

Reputation: 1

send.js.encrypt(SMS_BODY("phone number"));
.request.sms.body("HELLO THIS IS SMS MESAGE");

Upvotes: 0

Sash_KP
Sash_KP

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

Sergey  Pekar
Sergey Pekar

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

Related Questions