2

I am developing a app in which i want to call another app apk but i don't have the code of that app so i don't know the package name and class name.i have searched alot but couldn't find anything that works. does anyone know how to do this?

1 Answers1

3

It is perfectly possible. You don't need to know its "source code", you need to do a bit of research on the app and you're probably going to find its package's name.

You can:

  • a) Try to de-pack the .apk which is extremely tedious (or was last time I tried)
  • b) Write a very simple app that will list all of your installed apps (by package name)
  • c) Some custom and even stock firmwares even have that option baked in when you go to Apps/Installed/All or something similar to that.

Once you have the package name. For example, com.adobe.reader for...well...Adobe Reader, then you can launch the app really simply by using an Intent.

Intent LaunchIntent = getPackageManager().getLaunchIntentForPackage("com.package.address");
startActivity(LaunchIntent);

For a similar, but maybe clearer for you view of things, you can check out this link:

Open another application from your own (intent)

Community
  • 1
  • 1
Eugen
  • 1,453
  • 7
  • 27
  • 55