Ejemplo n.º 1
0
        public void StartDeviceService(DeviceServiceParameter dsp)
        {
            if (DeviceService.isServiceRunning)
            {
                throw new Exception("Service läuft bereits");
            }
            Intent si = new Intent(Application.Context, typeof(DeviceService));

            si.PutExtra(IntentHelper.INTENT_DSP_VAL, dsp.ToString());
            StartService(si);
        }
Ejemplo n.º 2
0
        public void StartDeviceService(DeviceServiceParameter dsp)
        {
            if (DeviceService.isServiceRunning)
            {
                if (DeviceService.isServiceConnecting)
                {
                    throw new Exception("Connecting...");
                }
                if (DeviceService.isServiceConnected)
                {
                    throw new Exception("Connected");
                }

                throw new Exception("Not connected");
            }
            Intent si = new Intent(Application.Context, typeof(DeviceService));

            si.PutExtra(IntentHelper.INTENT_DSP_VAL, dsp.ToString());
            Activity.StartService(si);
        }