How to Invoke or call one app from another app in Android?

前端 未结 3 1339
星月不相逢
星月不相逢 2021-01-27 08:07

I want to invoke one application from another application.

My Java file code:

Intent intent = new Intent(Intent.ACTION_RUN);
intent.se         


        
3条回答
  •  忘了有多久
    2021-01-27 08:30

    You might need to be a little more specific about what you're doing. If all you want to do is, say, launch another Activity from your main Activity, something like this would work:

    Intent intent = new Intent(this, OtherActivity.class);
    intent.putExtra("key", "data"); //put any data you want to pass into the new activity
    startActivity(intent);
    

    Then just make sure you put the new activity in your manifest like this:

    
    

    If your goal is something else then you should be ore specific with what you want to do.

提交回复
热议问题