Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public override void OnDestroy()
 {
     base.OnDestroy();
     instance = null;
 }
Esempio n. 3
0
 public override void OnCreate()
 {
     base.OnCreate();
     instance             = this;
     mNotificationManager = (NotificationManager)GetSystemService(NotificationService);
 }