Check if an application is installed

To check if an application is currently installed on the device, use the isApplicationInstalled method. This method takes the application identifier (bundle id for iOS, or package id for Android) and returns True or False.

Copy
Remote Web Driver
String appId="com.android.calculator2";
Map<String, Object> param  = new HashMap<>();
param.put("format", "identifier");
String appList = (String) driver.executeScript("mobile:application:find", param);
System.out.println(appList.indexOf(appId) > -1);
Copy

Appium (Java client)

String appId="com.google.android.youtube";
System.out.println(driver.isAppInstalled(appId));
Copy

Appium (Python client)

self.driver.is_app_installed('com.google.android.youtube')