Open another one application from our application?

后端 未结 3 1635
旧巷少年郎
旧巷少年郎 2021-01-13 04:21

From my application i have to open a another one application.Is there any possibility to open like this?

3条回答
  •  粉色の甜心
    2021-01-13 05:13

    You should use the function of the package manager.

    try {
        Intent i = ctx.getPackageManager().getLaunchIntentForPackage("com.android.browser");
        ctx.startActivity(i);
    } catch (NameNotFoundException e) {
        // TODO Auto-generated catch block
    }
    

提交回复
热议问题