For all the necessary capabilities, you can refer to the official documentation available at docs.bitbar.com:
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("testdroid_username", <your username>);
capabilities.setCapability("testdroid_password", <your password>);
capabilities.setCapability("testdroid_target", "android");
capabilities.setCapability("testdroid_project", <project name displayed on Web UI>);
capabilities.setCapability("testdroid_testrun", "Test Run 12/04/2018");
capabilities.setCapability(
"testdroid_device",
<The unique device identifier on Bitbar Testing cloud>
);
capabilities.setCapability("browserName", "chrome");
AndroidDriver driver = new AndroidDriver(
new URL("https://appium.testdroid.com/wd/hub"),
capabilities
);