start SMS Intent : SMS « Network « Android

Home
Android
1.2D Graphics
2.Animation
3.Core Class
4.Database
5.Date Type
6.Development
7.File
8.Game
9.Hardware
10.Media
11.Network
12.Security
13.UI
14.User Event
Android » Network » SMS 
start SMS Intent
 
import android.content.Context;
import android.content.Intent;
import android.text.Html;

class UIHelper {
  public static void startSMSIntent(final Context ctx, final String subject, final String source, final String url) {
    final StringBuilder body new StringBuilder();
    if (subject != null && !"".equals(subject.trim()))
      body.append(subject);
    
    body.append("\n\nRead on:\n ").append(url);

    final Intent sendIntent = new Intent(Intent.ACTION_VIEW);
    
    sendIntent.putExtra("sms_body"body.toString());
    sendIntent.setType("vnd.android-dir/mms-sms");
    ctx.startActivity(sendIntent);
  }
}

   
  
Related examples in the same category
1.SMS Intent
2.Sends an SMS message to another device
3.extends BroadcastReceiver to create SMS Receiver
4.SMS Inbox Demo
5.SmsMessage Demo
6.Sms Messaging Demo
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.