Android explicit intent with target component

后端 未结 5 1464
鱼传尺愫
鱼传尺愫 2020-12-09 03:45

Is it possible to fire explicit intent but not for an activity from my project but for activity in some other application.

I am sure of this code and I know it is ru

5条回答
  •  天命终不由人
    2020-12-09 04:45

    Intent intent = new Intent(Intent.ACTION_MAIN);
    intent.setClassName("np.birthday.com.order", "np.birthday.com.order.MainActivity");// intent.setClassName("Package NAme of another application", "np.birthday.com.order.MainActivity");
    startActivity(intent);
    

提交回复
热议问题