Beispiel #1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.Main);
            button        = FindViewById <Button>(Resource.Id.myButton);
            ins           = this;
            button.Click += delegate
            {
                Intent intent = new Intent(this, typeof(MyIntentService));
                StartService(intent);
            };
            LocationBroadcastReciever lbr = new LocationBroadcastReciever();

            LocalBroadcastManager.GetInstance(this).RegisterReceiver(lbr, new IntentFilter("test"));
        }
 protected override void OnResume()
 {
     base.OnResume();
     _lbr = new LocationBroadcastReciever();
     RegisterReceiver(lbr, new IntentFilter("test"));
 }