public override StartCommandResult OnStartCommand(Intent intent, StartCommandFlags flags, int startId) { instance = this; AppInstanceManager theInstance = AppInstanceManager.Instance; appSetting = theInstance.getAppSetting(); if (!theInstance.isConnected) { if (appSetting != null) { new System.Threading.Thread(new System.Threading.ThreadStart(() => { theInstance.setupConnection(appSetting.getIPAddress(), int.Parse(appSetting.getTcpPort())); })).Start(); } } setupService(false); return(StartCommandResult.NotSticky); }
public override void OnDestroy() { base.OnDestroy(); instance = null; }
public override void OnCreate() { base.OnCreate(); instance = this; mNotificationManager = (NotificationManager)GetSystemService(NotificationService); }