Example #1
0
        /// <summary>
        /// Background thread
        /// </summary>
        private void RunLogServiceAsync(IDevice device)
        {
            var attempt = 0;

            while (attempt < 10)
            {
                attempt++;
                try
                {
                    // Ensure server is running
                    var adb = new Adb();
                    adb.StartServer(Adb.Timeout.StartServer);

                    // Run log messages
                    adb.RunLogService(new LogServiceListener(this, Thread.CurrentThread), device, Adb.LogNames.Main);
                }
                catch (Exception ex)
                {
                    ErrorLog.DumpError(ex);
                }
            }
        }