附带电话号码(调用系统短信):

Intent mIntent = new Intent(Intent.ACTION_VIEW);  mIntent.putExtra("address",phoneNum);  mIntent.putExtra("sms_body", "");  mIntent.setType("vnd.android-dir/mms-sms");  context.startActivity(mIntent);  

附带短信内容(调用系统短信)

Uri smsToUri = Uri.parse("smsto:");// 联系人地址Intent mIntent = new Intent(android.content.Intent.ACTION_SENDTO,smsToUri);mIntent.putExtra("sms_body","abcdefgh");// 短信内容context.startActivity(mIntent);
附带邮件内容(调用系统邮件):

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);// 文本格式emailIntent.setType("text/plain");// 对方邮件地址emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, "");// 标题内容emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "");// 邮件文本内容emailIntent.putExtra(android.content.Intent.EXTRA_TEXT,"abcdefgh");context.startActivity(Intent.createChooser(emailIntent,"Choose Email Client"));

调用系统添加联系人:

Intent intent = new Intent(Intent.ACTION_INSERT,Contacts.CONTENT_URI);intent.putExtra("name", "");intent.putExtra("phone", number);context.startActivity(intent);
调用系统添加或编辑联系人:

Intent intent = new Intent(Intent.ACTION_INSERT_OR_EDIT);intent.setType("vnd.android.cursor.item/contact");intent.putExtra(Intents.Insert.PHONE, number);context.startActivity(intent);
调用系统编辑联系人:

Intent i = new Intent(Intent.ACTION_EDIT);         i.setData(ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI,contactid));         context.startActivity(i);







更多相关文章

  1. android例子
  2. Android中多层Fragment嵌套,调用相册返回Uri无法显示图片的问题解
  3. Android(安卓)8.0 启动后台service 出错 IllegalStateException:
  4. Android生命周期的学习
  5. 【转】Android获取用于操作数据库的SQLiteDatabase实例【学习记
  6. Android(安卓)Service Bind启动调用service方法
  7. Android简单例子(拨号服务调用)
  8. [Android]当Activity启动模式为singleTask时的生命周期
  9. Android中Linux睡眠唤醒流程

随机推荐

  1. Android layout layout_weight属性理解
  2. Android 更改 Toast 的默认位置及自定义T
  3. Android Device Monitor无法查看data目录
  4. Android根据屏幕宽度缩放图片
  5. 代码混淆
  6. Android(安卓)Studio gradle 打包之非渠
  7. Android(安卓)手势检测实战 打造支持缩放
  8. Android(安卓)USB-HID controlTransfer()
  9. android 中 unable to start service 错
  10. 判断AccessibilityService服务是否已经启