Redirect to SMS

Web Hosting
In this tutorial, I will show you some tutorial that redirecting or passing message to built in Messages Apps in your Android phone. From your Android Apps, you pass a message to it messages field. See the code below.

Intent smsIntent = new Intent(Intent.ACTION_VIEW);
smsIntent.setData(Uri.parse("sms:"));
smsIntent.putExtra("sms_body", "Your message"));
startActivity(smsIntent);


To only send a number, use this code.

startActivity(new Intent(Intent.ACTION_VIEW, Uri.fromParts("sms", "number", null)));

Web Hosting
That's it, hope this simple tutorial will help you. Happy Coding...





No comments:

Post a Comment