Code to launch external app explicitly

后端 未结 6 899
闹比i
闹比i 2020-12-01 14:21

From one of my apps, I\'m trying to launch another. I want to use an explicit intent.

ComponentName cn = new ComponentName(\"com.myOtherApp\", \"OtherAppActi         


        
6条回答
  •  忘掉有多难
    2020-12-01 14:42

    In addition to @Sogger answer thing to remember is if you receiver class is com.myOtherApp.receiver.OtherAppActivity and package mentioned in AndroidManifest is com.myOtherApp your code will be

    ComponentName cn = new ComponentName("com.myOtherApp", "com.myOtherApp.receiver.OtherAppActivity");
    

提交回复
热议问题