Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You may send sms either using SmsManager or by invoking Built-in SMS application</p> <p><strong>1. Sending SMS using SmsManager API</strong></p> <pre><code>SmsManager smsManager = SmsManager.getDefault(); smsManager.sendTextMessage("", null, "&lt; message body&gt;", null, null); </code></pre> <p>SmsManager require, SMS_SEND permission in your android mainfeast.</p> <p></p> <p><strong>2. Sending SMS by invoking Built-in SMS application</strong></p> <pre><code>Intent sendIntent = new Intent(Intent.ACTION_VIEW); sendIntent.putExtra("sms_body", “"); sendIntent.setType("vnd.android-dir/mms-sms"); startActivity(sendIntent); </code></pre> <p><strong>3. Sending Email</strong></p> <pre><code>String to = toEmail.getText().toString(); String subject = emailSubject.getText().toString(); String message = emailBody.getText().toString(); Intent email = new Intent(Intent.ACTION_SEND); email.putExtra(Intent.EXTRA_EMAIL, new String[] { to }); email.putExtra(Intent.EXTRA_SUBJECT, subject); email.putExtra(Intent.EXTRA_TEXT, message); // need this to prompts email client only email.setType("message/rfc822"); startActivity(Intent.createChooser(email, "Choose an Email client")); </code></pre> <p><strong>4. Calling in android</strong></p> <pre><code>Intent callIntent = new Intent(Intent.ACTION_CALL); callIntent.setData(Uri.parse("tel:0377778888")); startActivity(callIntent); </code></pre> <p>You can find complete tutorial from below links</p> <p><a href="http://javatechig.com/android/how-to-send-email-in-android/" rel="nofollow">How To Send Email In Android</a></p> <p><a href="http://javatechig.com/android/sending-sms-message-in-android/" rel="nofollow">Sending SMS Message In Android</a></p> <p><strong>Edit-1</strong></p> <p>You can handle List click event, using the below code snippet</p> <p>lv1.setOnItemClickListener(new OnItemClickListener() {</p> <pre><code> @Override public void onItemClick(AdapterView&lt;?&gt; a, View v, int position, long id) { Object o = lv1.getItemAtPosition(position); // write your code here } }); </code></pre> <p>If each of your list row has views to handle events then you may handle individually inside your adapter getView method using ViewHolder design pattern. </p> <pre><code>public View getView(int position, View convertView, ViewGroup parent) { ViewHolder holder; if (convertView == null) { convertView = layoutInflater.inflate(R.layout.list_row_layout, null); holder = new ViewHolder(); holder.button = (Button) convertView.findViewById(R.id.button); convertView.setTag(holder); } else { holder = (ViewHolder) convertView.getTag(); } if(button!=null){ button.setOnClickListener(new OnClickListener() { @Override public void onClick(View arg0) { } }); } return convertView; } static class ViewHolder { Button button; } </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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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