How to get Context or ContextWraper in intellij plugin

Hi,

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.

2 comments
Comment actions Permalink

Hello,

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.

0
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,
            PackageManager.GET_ACTIVITIES);

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.
0

Please sign in to leave a comment.