APISonar


com.appium.entities.MobilePlatform.ANDROID

> com > appium > entities > MobilePlatform > ANDROID
com APIs appium APIs entities APIs MobilePlatform APIs ANDROID APIs

Example 1
public static MobilePlatform getMobilePlatform() {
        String os = AppiumDeviceManager.getAppiumDevice().getDevice().getOs();
        if (os.equalsIgnoreCase("ios")) {
            return MobilePlatform.IOS;
        } else {
            return MobilePlatform.ANDROID;
        }
    }
Example 2
public void captureScreenShot(String screenShotName) {
        String className = getCurrentTestClassName();
        String methodName = getCurrentTestMethodName();
        String deviceModel = null;
        if (AppiumDeviceManager.getMobilePlatform().equals(MobilePlatform.ANDROID)) {
            deviceModel = new AndroidDeviceConfiguration().getDeviceModel();
        } else if (AppiumDeviceManager.getMobilePlatform().equals(MobilePlatform.IOS)) {
            deviceModel = AppiumDeviceManager.getAppiumDevice().getDevice().getDeviceModel();
        }
        captureScreenShot(1, className, screenShotName, methodName, deviceModel);
    }