按键精灵手机版可以通过
RunApp "com.tencent.mm", ".plugin.sns.ui.SnsTimeLineUI"
直接打开微信朋友圈
我尝试用
ComponentName cmp = new ComponentName("com.tencent.mm","com.tencent.mm.plugin.sns.ui.SnsTimeLineUI");
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setComponent(cmp);
startActivity(intent);
结果获得以下错误
09-15 13:15:53.087 11188-11188/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.example.lee.myapplication, PID: 11188
java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.VIEW cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.tencent.mm/.plugin.sns.ui.SnsTimeLineUI } from ProcessRecord{42ec77e8 11188:com.example.lee.myapplication/u0a103} (pid=11188, uid=10103) not exported from uid 10092
at