How to open specific third party activity?
Ok I want to open a specific Activity from a app, not my app. Let's say
that I want to open this package com.test.app and inside that package
TestActivity. How can I do this?
I have tried like this:
Intent i = new Intent();
i.setClassName(pack, activity);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(i);
Intent i = new Intent(pack+activity);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(i);
Intent i = new Intent();
i.setClassName(pack, "."+activity);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(i);
Intent i = new Intent(pack+"."+activity);
i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
getApplicationContext().startActivity(i);
With all of them I'm having this error:
Unable to find explicit activity class {PACKAGE/ACTIVITY}; have your
declared this activity in your AndroidManifest.xml?
NOTE: I do have the app installed with package com.test.app and with an
activity TestActivity. So how could this be done?
No comments:
Post a Comment