Get package names and class names for all applications

后端 未结 2 969
迷失自我
迷失自我 2021-01-20 14:43

Does anyone know the class name and package name for any of these applications:

youtube facebook amazon mp3 google talk camera maps text message dialer/phone launche

2条回答
  •  佛祖请我去吃肉
    2021-01-20 14:52

    class PInfo {
        private String appname = "";
        private String pname = "";
        private String classname = "";
        private int versionCode = 0;
        private Drawable icon;
        private void prettyPrint() {
            Log.d("Applist ",appname + "   " + pname + "   " + classname + "   " + versionCode);
    
        }
    }
    
    
    
    
    
    public ArrayList getPackages() {
         Log.d("AppNo", "Inside Packages"); 
        ArrayList apps = getInstalledApps(false); /* false = no system packages */
        final int max = apps.size();
        Log.d("AppNo", "no of apps "+max); 
        for (int i=0; i getInstalledApps(boolean getSysPackages) {
        ArrayList res = new ArrayList();        
        List packs = getPackageManager().getInstalledPackages(0);
        for(int i=0;i

    }

    Using PakageInfo you can get package name, application Name but not sure about application class name

    Using this example you can list all applications install in your device and can get there information.

提交回复
热议问题