How to get Context or ContextWraper in intellij plugin


I need to access entire Package info of the current project. So that I can access Package name and Launching activity names. 

In order to use getPackageManger() I need Context or ContextWraper.

Comment actions Permalink


could you please clarify what do you mean by 'Package info of the current project'?

I don't see any method named 'getPackageManager' in our sources.

Comment actions Permalink

Thanks for your early response.

getPackageManager is the method in ContextWraper class. Inside android.jar we have all these classes.

PackageManager manager = context.getPackageManager();
    PackageInfo packageInfo = manager.getPackageArchiveInfo(path,

Basically my issue is I want to access current project package name and launching activity name from my plugin.
For this if there is any predefined classes in com.intellij.openapi. Please tell me it will be very helpful to me.

Please sign in to leave a comment.