调用Android发短信接口Intent.ACTION_SENDTO
public void welcome_register(View v) {
// 测试smsto
Uri sms_uri= Uri.parse("smsto:13517596490");//设置号码
Intent sms_intent = new Intent(Intent.ACTION_SENDTO,sms_uri);//调用发短信Action
sms_intent.putExtra("sms_body", "HelloWorld");//用Intent设置短信内容
startActivity(sms_intent);
// String qqRegiter = this.getString(R.string.QQRegiter);// 获取资源中的字符串
// if (qqRegiter != null && !(qqRegiter.equals(""))) {
// Uri uri = Uri.parse(qqRegiter);// 设置一个统一资源定位符
// Intent intent = new Intent(Intent.ACTION_VIEW, uri);// 展示一个新的View
// startActivity(intent);
// }
}
分享到:
相关推荐
恢复已经停止的更新下载。 'android.server.checkin.FOTA_RESTART' 通过 OTA 下载并安装操作系统更新。 'android.server.checkin.FOTA_UPDATE' 用户按下了'Media Button'。...'android.intent.action.PACKAGE_ADDED'
接收系统的时间流逝的广播,屏幕开启关闭的广播,电量改变的广播。这些广播在清单文件里注册时,看不到效果。在这个例子中通过在一个服务里面用代码注册的方式,成功接收了这些广播。
android.intent.action.PACKAGE_REMOVED和android.intent.action.PACKAGE_ADDED 可以监听别的应用被安装卸载,但不能监听自己被卸载啊。 监听自己被卸载通过前辈们探索发现,只能通过监听系统卸载log如:act=...
其实在系统的文件管理器中,这应该是我们常用的功能(包括文件的打开Intent.ACTION_VIEW)。 下面列出一个简单的分享方式 Intent shareIntent = new Intent(); shareIntent.setAction(Intent.ACTION_SEND); ...
Android Intent Action
returnIt = new Intent(Intent.ACTION_SENDTO, emailUri); 9,发邮件 returnIt = new Intent(Intent.ACTION_SEND); String[] tos = { "shenrenkui@gmail.com" }; String[] ccs = { "shenrenkui@gmail.com" }; ...
Intent intent = new Intent("android.intent.action.SILENT_PACKAGE_INSTALL"); intent.putExtra("silent_install_file", "/sdcard/Helloworld.apk"); intent.putExtra("silent_install_auto_start", true);//...
本文讲述了Android版Intent.ACTION_SEND分享图片和文字内容。分享给大家供大家参考,具体如下: 编辑推荐:稀土掘金,这是一个针对技术开发者的一个应用,你可以在掘金上获取最新最优质的技术干货,不仅仅是Android...
获取系统图片的简单示例,使用Intent.ACTION_GET_CONTENT 和 MediaStore两种方式获取图片以及其真正的系统所在的位置
http://blog.csdn.net/xuie0000/article/details/50604741用例
Android 屏幕唤醒 + 屏幕解锁 + 开机服务监听(android.intent.action.BOOT_COMPLET)添加权限:{//开机监听<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/><uses-permission android...
intent.setAction("android.intent.action.VIEW"); startActivityForResult( intent , 0); 3.打开壁纸设置 Intent intent = new Intent(Intent.ACTION_SET_WALLPAPER); startActivity(intent); 4.打开拨号界面 ...
BATTERY_CHANGED_ACTION 充电状态,或者电池的电量发生变化 "android.intent.action.BATTERY_CHANGED" BOOT_COMPLETED_ACTION 在系统启动后,这个动作被广播一次(只有一次) "android.intent.action.BOOT_COMPLETED" ...
使用android.provider.MediaStore类定义的意图ACTION_IMAGE_CAPTURE。... Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(intent, R.string.exti);
Intent it = new Intent(Intent.ACTION_SENDTO, uri); 3. it.putExtra("sms_body", "The SMS text"); 4. startActivity(it); 发送彩信 1. Uri uri = Uri.parse("content://media/external/images/media/23"); ...
android Action call 拨打电话 Intent.ACTION.CALL
像qq,微信那样 调用代码Intent intent=new Intent(Intent.ACTION_SEND); intent.setType("text/plain"); intent.putExtra(Intent.EXTRA_SUBJECT, "分享"); intent.putExtra(Intent.EXTRA_TITLE, mTitle....