Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello Guys i want to know how to send sms on button click on my user phone in android app i have sms api also please guide me or help me thanks

What I have tried:

Hello Guys i want to know how to send sms on button click on my user phone in android app i have sms api also please guide me or help me thanks
Posted
Updated 19-Jan-18 22:15pm
Comments
David Crow 20-Jan-18 10:51am    
What code do you have in place thus far? Which part of the overall problem are you having trouble with, responding to a button click, creating and sending a text message entirely from code, or simply using an Intent to send a text message?

If the latter, it could be as simple as:

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("sms:" + phoneNumber));     
intent.putExtra("sms_body", "I'm sending this through an Intent"); 
startActivity(intent);

1 solution

We can't help you with this from that little: if you have an SMS API as you say, we have no idea which one you have or how it works!

So go back to where you got the API and look there for documentation, instructions, sample code, and community forums: they will contain the info you need, or let you talk directly to the people who know it best.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900