Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>smsManager.sendTextMessage("phoneNo", null, "sms message", null, null); </code></pre> <p>"phoneNo" in this place specify the number for which you want to send sms</p> <p>ok what is that selected data does that contain the phone numbers or the some text data that needs to be sent as a message. see "phoneNo" is string what you are passing. In your phone in place of number if you type phoneNo how will it send to which number will it send. that 1st parameter is the phone number to which you want to send sms. if you are selecting the phone number from the list get that to a variable and put that variable in place of "phoneNo"</p> <p>if you want to enter the number when the alert is shown then here is the code</p> <pre><code>private void showAlertView(String str) { final EditText input = new EditText(YOURACTIVITYNAME.this); AlertDialog alert = new AlertDialog.Builder(YOURACTIVITYNAME.this) if (TextUtils.isEmpty(str)) { alert.setTitle("Not Selected"); alert.setMessage("No One is Seleceted!!!"); } else { // Remove , end of the name String strContactList = str.substring(0, str.length() - 1); alert.setTitle("Selected"); alert.setMessage(strContactList); } alert.setPositiveButton("Ok", new DialogInterface.OnClickListener() { String value; @Override public void onClick(DialogInterface dialog, int which) { //sendSMS(); SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage(input.getText().toString(), null, "sms message", null, null); dialog.dismiss(); } }).setNegativeButton("Cancel", new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int whichButton) { // Do nothing. } }).show(); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload