最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Android使用Intent發(fā)送短信的實現(xiàn)方法

 更新時間:2016年07月06日 11:15:22   作者:無憂一生  
這篇文章主要介紹了Android使用Intent發(fā)送短信的實現(xiàn)方法,結合簡單實例形式分析了Android短信發(fā)送功能的實現(xiàn)技巧,需要的朋友可以參考下

本文實例講述了Android使用Intent發(fā)送短信的實現(xiàn)方法。分享給大家供大家參考,具體如下:

在一個Activity中使用Intent發(fā)送短信

package com.zhuguangwei;
import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
public class IntentActivity extends Activity {
  private Button myButton;
  /** Called when the activity is first created. */
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    myButton = (Button) findViewById(R.id.myButton);
    myButton.setOnClickListener(new OnClickListener() {
      @Override
      public void onClick(View v) {
        // TODO Auto-generated method stub
        // 使用Intent發(fā)短信
        Uri uri = Uri.parse("smsto:13800000000");
        Intent intent = new Intent(Intent.ACTION_SENDTO,uri);
        intent.putExtra("sms_body", "The SMS text");
        startActivity(intent);
      }
    });
  }
}

更多關于Android相關內(nèi)容感興趣的讀者可查看本站專題:《Android短信與電話操作技巧匯總》、《Android文件操作技巧匯總》、《Android操作SQLite數(shù)據(jù)庫技巧總結》、《Android操作json格式數(shù)據(jù)技巧總結》、《Android數(shù)據(jù)庫操作技巧總結》、《Android編程之a(chǎn)ctivity操作技巧總結》、《Android編程開發(fā)之SD卡操作方法匯總》、《Android開發(fā)入門與進階教程》、《Android資源操作技巧匯總》、《Android視圖View技巧總結》及《Android控件用法總結

希望本文所述對大家Android程序設計有所幫助。

相關文章

最新評論

方山县| 抚州市| 苍南县| 仁布县| 凤凰县| 伊吾县| 伊通| 商河县| 德阳市| 安仁县| 天祝| 噶尔县| 庆安县| 镶黄旗| 新野县| 通化县| 寿宁县| 夹江县| 江华| 沙田区| 治县。| 白沙| 台山市| 楚雄市| 清河县| 宣城市| 梧州市| 诸城市| 东兰县| 宜川县| 沛县| 黄山市| 太原市| 白朗县| 卫辉市| 石柱| 柳州市| 克东县| 罗城| 嘉兴市| 湘潭县|