public override void OnCreate() { base.OnCreate(); _serviceHelper = SensusServiceHelper.Get() as AndroidSensusServiceHelper; _serviceHelper.SetService(this); _serviceHelper.UpdateApplicationStatus("0 protocols are running"); }
public override void OnCreate() { base.OnCreate(); SensusServiceHelper.Initialize(() => new AndroidSensusServiceHelper()); _serviceHelper = SensusServiceHelper.Get() as AndroidSensusServiceHelper; // it's happened that the service is created after the service helper is disposed: https://insights.xamarin.com/app/Sensus-Production/issues/46 if (_serviceHelper == null) { StopSelf(); return; } _serviceHelper.SetService(this); _serviceHelper.UpdateApplicationStatus("0 protocols are running"); }
public override void OnCreate() { base.OnCreate(); SensusServiceHelper.Initialize(() => new AndroidSensusServiceHelper()); _serviceHelper = SensusServiceHelper.Get() as AndroidSensusServiceHelper; // it's happened that the service is created after the service helper is disposed: https://insights.xamarin.com/app/Sensus-Production/issues/46 if (_serviceHelper == null) { StopSelf(); return; } _serviceHelper.SetService(this); _serviceHelper.UpdateApplicationStatus("0 protocols are running"); }