如何跳转到编辑联系人的系统界面

分类:android 208人阅读 评论(0) 收藏 举报

Intent intent=new Intent(Intent.ACTION_EDIT,Uri.parse("content://com.android.contacts/contacts/"+id));
startActivity(intent);

Intent intent = new Intent(Intent.ACTION_INSERT, Contacts.CONTENT_URI);
startActivity(intent);








应用跳转到系统添加联系人加好后再跳回当前应用

分类:android 50人阅读 评论(0) 收藏 举报

[java] view plain copy
  1. publicvoidonCreate(BundlesavedInstanceState){
  2. super.onCreate(savedInstanceState);
  3. setContentView(R.layout.main);
  4. Buttonbutton=(Button)findViewById(R.id.email);
  5. button.setOnClickListener(newOnClickListener(){
  6. publicvoidonClick(Viewv){
  7. onClickSender();
  8. }});
  9. }
  10. privatevoidonClickSender()
  11. {
  12. try
  13. {
  14. UricontactUri=Uri.fromParts("mailto","liaojianguo19840726@gmail.com",null);
  15. IntentcontactIntent=newIntent(Contacts.Intents.SHOW_OR_CREATE_CONTACT);
  16. contactIntent.setData(contactUri);
  17. //PassalongfullE-mailstringforpossiblecreatedialog
  18. contactIntent.putExtra(Contacts.Intents.EXTRA_CREATE_DESCRIPTION,
  19. "liaojianguo19840726@gmail.com");
  20. //Onlyprovidepersonalnamehintifwehaveone
  21. StringsenderPersonal=null;
  22. if(senderPersonal!=null)
  23. {
  24. contactIntent.putExtra(Intents.Insert.NAME,senderPersonal);
  25. }
  26. startActivity(contactIntent);
  27. }
  28. catch(Exceptionme)
  29. {
  30. if(Config.LOGV)
  31. {
  32. }
  33. }
  34. }
  35. }


更多相关文章

  1. Android 获取系统相册中的所有图片
  2. Android 9.0设置系统语言
  3. CentOS64位系统使用Android虚拟机问题
  4. 【Android 系统开发】使用 Source InSight 阅读 Android 源码
  5. android 修改系统各种类型的声音的默认值和最大最小值
  6. Android 获得联系人信息
  7. 打开系统wifi设置界面
  8. WebView中调用系统相册或拍照上传
  9. cocos2dx android平台事件系统解析

随机推荐

  1. Android的Intent机制
  2. Android利用Binder进行通信
  3. Android性能测试之卡顿ANR测试
  4. Android仿iphone自定义滚动选择器
  5. OpenCV 的 RGB 顺序和 Android 载入的 RG
  6. Android屏幕适配-终结者
  7. Android使用回调接口
  8. 2020年20种最佳Android应用程序模板
  9. 反编译Android部署程序
  10. android UI开源项目