public override void OnCreate() { // This method is optional to implement base.OnCreate(); Log.Debug(TAG, "OnCreate"); timestamper = new UtcTimestamper(); }
// Optional to implement public override void OnDestroy() { Log.Debug(TAG, "OnDestroy"); Binder = null; timestamper = null; base.OnDestroy(); }
public override void OnDestroy() { Log.Debug(TAG, "OnDestroy"); messenger.Dispose(); timestamper = null; base.OnDestroy(); }
/// <summary> /// 【可选的】 /// 实例化服务。 它用于初始化服务在生存期内所需的任何变量或对象。 /// </summary> public override void OnCreate() { base.OnCreate(); Log.Debug(TAG, "OnCreate"); timestamp = new UtcTimestamper(); }
public override void OnDestroy() { // This method is optional to implement Log.Debug(TAG, "OnDestroy"); Binder = null; timestamper = null; base.OnDestroy(); }
public override void OnCreate() { base.OnCreate(); Log.Debug(TAG, "OnCreate"); timestamper = new UtcTimestamper(); messenger = new Messenger(new TimestampRequestHandler(this)); Log.Info(TAG, $"TimestampService is running in process id {Android.OS.Process.MyPid()}."); }