Prabhu M
Prabhu M

Reputation: 3600

How to get class names of an installed application using packageManager

I know how to get package name of installed application using packageManager . But how to get class names in that package?

Upvotes: 0

Views: 4071

Answers (2)

Prachi
Prachi

Reputation: 1004

Use the Context to get the PackageName as well as class name. Try this out->

context.getPackageName();

context.getPackageManager().getClass();

Upvotes: 1

aMiGo
aMiGo

Reputation: 767

Not sure if you can do that. Class names inside an installed package are usually private data not destined to be shared with anyone and viewed.

On the otherhand, if it would be some .jar file with a public API, you could include in you're project and use it's exposed functionality.

Upvotes: 1

Related Questions