Create secondary app manager such as (facebook app manager)

179 Views Asked by At

Is there away to install secondary app when the user installs the APK? The secondary app porpoise is to save local data that will be shared between multiple apps and detect + listen to app removal package.

I have seen that Facebook is doing something similar they have 2 apps called (Facebook App installer + Facebook App Manager)

1

There are 1 best solutions below

1
Pratishtha Dubey On

you can do with the help of package name of the other app. so once your first app is installed in phone , at some point yo can check for other app with the help of package name if it is installed or not by using below code

 PackageManager pm = getPackageManager();
        try {
            pm.getPackageInfo(uri, PackageManager.GET_ACTIVITIES);
            return true;
        } catch (PackageManager.NameNotFoundException e) {
        }

and if that is not the case you can take user to play store to get it installed. Happy Coding :) !!