我想从我的应用程序中打开什么是应用程序对话活动cmp=com.whatsapp/.Conversation
。
我怎样才能做到这一点?我有联系电话号码、联系人 ID、联系人原始 ID,并且还有特定联系人的应用程序 uri。
private void openWhatsApp(String id) {
Intent i = new Intent(Intent.ACTION_VIEW, Uri.parse("content://com.android.contacts/data/"+id));
Log.v("ssssss", s);
i.setType("vnd.android.cursor.item/vnd.com.whatsapp.profile");
i.setComponent(new ComponentName("com.whatsapp", ".Conversation"));
startActivity(i);
}
04-20 18:13:45.794: I/ActivityManager(1862): START
{act=android.intent.action.VIEW
dat=content://com.android.contacts/data/8269
typ=vnd.android.cursor.item/vnd.com.whatsapp.profile
cmp=com.whatsapp/.accountsync.ProfileActivity} from pid 32159
04-20 18:42:11.317: I/ActivityManager(1862): START {flg=0x14000000 cmp=com.whatsapp/.Conversation (has extras)} from pid 1150