/// <summary> /// Initialize <see cref="RegusKioskOptionsManager"/> class /// </summary> /// <param name="linkUI">target JetAdvantageLink UI to contorl</param> /// <param name="packageName">package name to control</param> public RegusKioskOptionsManager(JetAdvantageLinkUI linkUI, string packageName) { _linkUI = linkUI; _controller = linkUI.Controller; _controlHelper = new JetAdvantageLinkControlHelper(linkUI, packageName); _packageName = packageName; }
public PrinterOnAndroid(string deviceIdentifier) { _deviceIdentifier = deviceIdentifier; _mobile = SESLib.Create(_deviceIdentifier); _mobile.Connect(); _mobile.SetTimeout(DEFAULT_TIMEOUT); }
/// <summary> /// Initializes a new instance of the <see cref="RoamAndroidAuthenticator"/> class. /// </summary> /// <param name="pluginExecutionData">The plugin execution data.</param> /// <param name="activityData">The plugin activity data.</param> /// <param name="controller">The SES controller.</param> /// <param name="androidHelper">The android helper.</param> public RoamAndroidAuthenticator(PluginExecutionData pluginExecutionData, HpRoamActivityData activityData, SESLib controller, AndroidHelper androidHelper) { Provider = activityData.AuthProvider; _controller = controller; _androidHelper = androidHelper; switch (activityData.AuthProvider) { case AuthenticationProvider.HpId: ExternalCredentialInfo externalCredential = pluginExecutionData.ExternalCredentials.Where(x => x.Provider == ExternalCredentialType.HpId).FirstOrDefault(); Credential = new AuthenticationCredential(externalCredential.UserName, externalCredential.Password, pluginExecutionData.Credential.Domain); break; default: Credential = new AuthenticationCredential(pluginExecutionData.Credential); break; } }
/// <summary> /// Create JetadvantageLinkUI object and connect to Android /// </summary> /// <param name="device"></param> /// <exception cref="DeviceCommunicationException">thrown when can not connect to Link UI</exception> public JetAdvantageLinkUI(IDevice device) { Address = device.Address; try { JetAdvantageLinkLogAdapter.Attach(); } catch { // Consume exception here. } Controller = SESLib.Create(Address); if (Controller == null) { throw new DeviceCommunicationException($"Can not connect to the Link UI on device at {device.Address}."); } if (!Controller.Connect(true, true)) { throw new DeviceCommunicationException($"Can not start SES Agent on device at {device.Address}"); } }
/// <summary> /// Initializes a new instance of the <see cref="AndroidAppManagerBase"/> class. /// </summary> /// <param name="pluginExecutionData"></param> /// <param name="activityData"></param> public AndroidAppManagerBase(PluginExecutionData pluginExecutionData, HpRoamActivityData activityData) { try { _executionData = pluginExecutionData; _activityData = activityData; _controller = SESLib.Create(_activityData.MobileEquipmentId); _controller.Connect(false, true); _androidHelper = new AndroidHelper(_controller); _controller.PressKey(KeyCode.KEYCODE_WAKEUP); //Power Button _controller.PressKey(KeyCode.KEYCODE_HOME); if (_androidHelper.ExistResourceId("com.android.systemui:id/keyguard_indication_area")) { _controller.Swipe(SESLib.To.Up); } } catch (NullReferenceException ex) { throw new DeviceWorkflowException($"Unable to connect to the android phone using the connection ID {_activityData.MobileEquipmentId}.", ex); } }
/// <summary>Initializes a new instance of the <see cref="AndroidHelper"/> class.</summary> /// <param name="controller">SESLib</param> public AndroidHelper(SESLib controller) { _controller = controller; }
/// <summary> /// Initialize <see cref="JetAdvantageLinkScanOptionManager"/> class /// </summary> /// <param name="linkUI">target JetAdvantageLink UI to contorl</param> /// <param name="packageName">package name to control</param> public JetAdvantageLinkScanOptionManager(JetAdvantageLinkUI linkUI, string packageName) { _controller = linkUI.Controller; _controlHelper = new JetAdvantageLinkControlHelper(linkUI, packageName); _packageName = packageName; }