protected virtual object GetAppStartHint(object hint = null)
 {
     if (((Activity)this).get_Intent().get_Extras() != null)
     {
         Bundle bundle = ((Activity)this).get_Intent().get_Extras().GetBundle("pushMessageExtra");
         if (bundle != null)
         {
             this._pushMessage = NotificationBroadcastReceiver.CreatePushMessageBundle(bundle);
         }
     }
     return((object)this._pushMessage);
 }
Beispiel #2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Main);

            #region Properties and events
            Prefs = PreferenceManager.GetDefaultSharedPreferences(this);

            Volume = FindViewById <SeekBar>(Resource.Id.seekbar_volume);
            Volume.StartTrackingTouch += VolumeStartTrackingTouch;
            Volume.StopTrackingTouch  += VolumeStopTrackingTouch;

            Preview = FindViewById <ImageView>(Resource.Id.image_preview);

            Position = FindViewById <SeekBar>(Resource.Id.seekbar_position);
            Position.StartTrackingTouch += PositionStartTrackingTouch;
            Position.StopTrackingTouch  += PositionStopTrackingTouch;

            Back        = FindViewById <ImageButton>(Resource.Id.button_skip_back);
            Back.Click += BackClick;

            PlayAndPause        = FindViewById <ImageButton>(Resource.Id.button_play_and_pause);
            PlayAndPause.Click += PlayAndPauseClick;

            Forward        = FindViewById <ImageButton>(Resource.Id.button_skip_forward);
            Forward.Click += ForwardClick;
            #endregion

            Task.Run(UpdateViewWithDataFromPlayer);

            Broadcast = new NotificationBroadcastReceiver();
            var intentFilter = new IntentFilter();
            intentFilter.AddAction(NotificationBroadcastReceiver.ActionMediaPlayerControlFwd);
            intentFilter.AddAction(NotificationBroadcastReceiver.ActionMediaPlayerControlPlayAndPause);
            intentFilter.AddAction(NotificationBroadcastReceiver.ActionMediaPlayerControlRew);
            RegisterReceiver(Broadcast, intentFilter);

            CrashManager.Register(this, "6b762f5af26743b08b6f971555427c48", new CrashListener());
        }