private void StopHandlerThread() { _handler?.RemoveCallbacks(ScheduleNext); _handlerThread?.Quit(); _handlerThread?.Interrupt(); _handlerThread = null; }
public void stop() { if (camera != null) { camera.StopPreview(); camera.SetPreviewCallback(null); camera.Release(); camera = null; } if (cameraHandlerThread != null) { cameraHandlerThread.Quit(); cameraHandlerThread = null; } LogUtil.i("wtf", "stop"); }
private void StartRequestingLocationUpdates() { _locationManager.RemoveUpdates(this); if (_handlerThread != null) //ensure there is only one thread running { _handlerThread.Quit(); _handlerThread = null; } Log.Info(Tag, $"Request location updates start"); _logService.WriteToLog(LogFilename, $"Request location updates start"); try { _locationManager.RequestLocationUpdates(LocationManager.GpsProvider, FiveSeconds, 1, this); } catch (Exception ex) { _logService.WriteToLog("Exceptions", $"({LogFilename}) {ex.Message}"); } }
public void StopPeriodic() { _handlerThread.Quit(); _handlerThread.Interrupt(); _handlerThread.Dispose(); }