Beispiel #1
0
        private bool Initialize()
        {
            try
            {
                var adbLocation = ToolboxApp.Settings.GetString(UserSettingKeys.Builtin.AdbLocation);

                if (_bridge == null)
                {
                    _bridge = new AndroidDeviceBridge(adbLocation);
                }

                if (!_bridge.AppDataAdbLocationExists)
                {
                    ToolboxApp.Log.Warn("The Android SDK was not found.");
                    return(false);
                }

                ToolboxApp.Log.Info($"Starting the ADB bridge. User defined adb location: {adbLocation ?? "adb.exe location not set."}");
                _devices = _bridge.Start();
                ToolboxApp.Log.Info("ADB bridge started.");

                return(true);
            }
            catch (Exception ex)
            {
                ToolboxApp.Log.Error(ex, $"Error querying android devices in {nameof(DeviceManagerView)}.");
                return(false);
            }
        }
Beispiel #2
0
 public DeviceItemView(AndroidDeviceBridge bridge, MobileDevice device)
 {
     Bridge = bridge;
     Device = device;
     CreateLayout();
 }