RUn the below code and let me know if Application is launching on TV or not.
public AndroidDriver initializeAndroidDriver() {
AndroidDriver driver = null;
@SuppressWarnings(“rawtypes”)
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(MobileCapabilityType.VERSION, appiumInit.VERSION);
capabilities.setCapability(MobileCapabilityType.PLATFORM_NAME, appiumInit.PLATFORM_NAME);
capabilities.setCapability(MobileCapabilityType.DEVICE_NAME, appiumInit.DEVICE_NAME);
capabilities.setCapability(MobileCapabilityType.AUTOMATION_NAME, appiumInit.AUTOMATION_NAME);
capabilities.setCapability(MobileCapabilityType.NEW_COMMAND_TIMEOUT, appiumInit.NEW_COMMAND_TIMEOUT);
capabilities.setCapability(MobileCapabilityType.UDID, appiumInit.UDID);
capabilities.setCapability(MobileCapabilityType.APP, appiumInit.APPLICATION_PATH);
// capabilities.setCapability(MobileCapabilityType.PLATFORM_VERSION, appiumInit.PLATFORM_VERSION);
// capabilities.setCapability("clearSystemFiles", true);
//capabilities.setCapability("autoWebView", true);
//capabilities.setCapability("recreateChromeDriverSessions", true);
//capabilities.setCapability("chromedriverExecutable", "/Users/42211/Documents/SlaterAutomation/chromedriver/chromedriver");
capabilities.setCapability("newCommandTimeout", 360000);
capabilities.setCapability("appPackage",appiumInit.BUNDLEID);
capabilities.setCapability("appActivity",appiumInit.APP_ACTIVITY);
capabilities.setCapability("SYSTEM_PORT",appiumInit.SYSTEM_PORT);
capabilities.setCapability("APPIUMPORT",appiumInit.APPIUMPORT);
// capabilities.setCapability("skipUnlock",true);
// capabilities.setCapability("appActivity",appiumInit.chromedriverExecutable);
capabilities.setCapability(MobileCapabilityType.NO_RESET, true);
capabilities.setCapability(MobileCapabilityType.FULL_RESET, false);
try {
logAndroidDriverAPI.info("Starting the driver");
driver = new AndroidDriver(new URL("http://" + appiumInit.SERVERIP + ":" + appiumInit.APPIUMPORT + "/wd/hub"),
capabilities);
androidDriver = driver;
logAndroidDriverAPI.info("Appium started",true);
} catch (Exception e) {
System.out.println(e);
driver = null;
}
return driver;
}