0

You built a mobile app and your mobile app relies on a 3rd party app.

Is it possible for your mobile app to find out if the required 3rd party app has been installed or not? (If not then prompt the user to install the required app.)

001
  • 62,807
  • 94
  • 230
  • 350
  • You would need the package name of the specific app to check if it is installed in the device. follow below answer it'll work. – Sanket Patel Dec 23 '19 at 04:44
  • Note that if your app requires another app to be installed in order to run it will be rejected by Apple – Paulw11 Dec 23 '19 at 12:23

1 Answers1

1

Check if a particular pacakage has been installed by using a PackageManager. You can include the code to fetch the package inside the catch statement.

private boolean isPackageInstalled(String packageName, PackageManager packageManager) {
    try {
        packageManager.getPackageInfo(packageName, 0);
        return true;
    } catch (PackageManager.NameNotFoundException e) {
        return false;
    }
}

Check the following answer for further explanation

Check if application is installed - Android

animeshk
  • 376
  • 1
  • 7