Thursday 16 October 2014

current running application package name


                                                 You can get current name package


To check the curreent running package name

ActivityManager am = (ActivityManager) mContext
                .getSystemService(Activity.ACTIVITY_SERVICE);
        String packageName = am.getRunningTasks(1).get(0).topActivity
                .getPackageName();


Requires permission: 
                              android.permission.GET_TASKS 

No comments:

Post a Comment