亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

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

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

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

在一個(gè)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);
      }
    });
  }
}

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

希望本文所述對(duì)大家Android程序設(shè)計(jì)有所幫助。

相關(guān)文章

最新評(píng)論