Пример #1
0
        protected override void OnResume()
        {
            base.OnResume();

            if (PlayServicesUtils.IsGooglePlayStoreAvailable(this))
            {
                PlayServicesUtils.HandleAnyPlayServicesError(this);
            }

            if (RichPushInbox.ViewInboxIntentAction == Intent.Action)
            {
                v4.App.Fragment fragment = Navigate(Resource.Id.nav_message_center);
                if (Intent.Data != null && Intent.Data.Scheme.ToLower() == RichPushInbox.MessageDataScheme)
                {
                    string messageId = Intent.Data.SchemeSpecificPart;
                    if (fragment != null && fragment is MessageCenterFragment)
                    {
                        ((MessageCenterFragment)fragment).SetMessageID(messageId);
                    }
                }

                Intent.SetAction(null);
            }

            UAirship.Shared().Inbox.AddListener(inboxListener);
            ShowMessageCenterIndicator();
            UpdateUnreadCount();
        }
Пример #2
0
        protected override void OnResume()
        {
            base.OnResume();

            // Handle any Google Play services errors
            if (PlayServicesUtils.IsGooglePlayStoreAvailable(this))
            {
                PlayServicesUtils.HandleAnyPlayServicesError(this);
            }

            // Use local broadcast manager to receive registration events to update the channel
            IntentFilter channelIdUpdateFilter;

            channelIdUpdateFilter = new IntentFilter();
            channelIdUpdateFilter.AddAction(UrbanAirshipReceiver.ACTION_CHANNEL_UPDATED);
            LocalBroadcastManager.GetInstance(this).RegisterReceiver(channelIdUpdateReceiver, channelIdUpdateFilter);

            // Update the channel field
            UpdateChannelIdField();
        }