private void RegisterReceivers()
 {
     receiver           = new ServiceActivityReceiver();
     receiver.Received += Receiver_Received;
     RegisterReceiver(receiver, new IntentFilter("Activity." + ReceivedData.Actions.Next.ToString()));
     RegisterReceiver(receiver, new IntentFilter("Activity." + ReceivedData.Actions.Pause.ToString()));
     RegisterReceiver(receiver, new IntentFilter("Activity." + ReceivedData.Actions.LoopBack.ToString()));
     RegisterReceiver(receiver, new IntentFilter("Activity." + ReceivedData.Actions.SeekTo.ToString()));
 }
Esempio n. 2
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);
            ActionBar bar = ActionBar;

            bar.SetBackgroundDrawable(new ColorDrawable(Color.Olive));
            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);
            FindViews();
            RequestPermissions();

            searchBar.AfterTextChanged += SearchBar_AfterTextChanged;
            searchBar.FocusChange      += SearchBar_FocusChange;
            CurrentlyPlaying.SetOnTouchListener(this);
            _gestureDetector = new GestureDetector(this);

            grid.ItemLongClick          += Grid_ItemLongClick;
            add.Click                   += Add_Click;
            remove.Click                += Remove_Click;
            ReceiveSongUpdates           = new ServiceActivityReceiver();
            ReceiveSongUpdates.Received += ReceiveSongUpdates_Received;
            RegisterReceiver(ReceiveSongUpdates, new IntentFilter("Activity." + ReceivedData.Actions.Next.ToString()));
        }