How can I send SMS from one number to another number in android programatically? -


I'm developing an Android application for sending OTP (One Time Password) a text message (like SMS) to the user Is required so that he can enter the valid OTP code and enter the application. I was looking at the SMS Manager API provided by the Android Framework, which uses the application to send text messages. But I need to send a text message to the user from my registered number.

How can we achieve this requirement?

If you want to send an SMS through your application then this is the method.

SmsManager.getDefault () - Get the default example of SmsManager

sendTextMessage (string destinationaddress, string scanner, string text, pending anticipated Sent, pending presentation delivery)

Use this to send the SMS

  SMS Manager SMS Manager = SMSManager.Get Default (); SmsManager.sendTextMessage (phone no, zero, SMS, empty, empty);  

Forget & lt; Usage-permission Android: name = "android.permission.SEND_SMS" />

Check this for more information is required


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -