コード例 #1
0
        private void ProcessUpdateInfo(AndroidJavaObject javaAppUpdateInfo)
        {
            // Parsing AppUpdateInfo java object as an AppUpdateState since AppUpdateInfo contains all the fields for
            // an AppUpdateState.
            var updateState = new AppUpdateState(javaAppUpdateInfo);

            OnStateUpdateEvent.Invoke(updateState);
        }
コード例 #2
0
        private void OnStateUpdateReceived(AssetPackState newState)
        {
            if (_gettingPackStates)
            {
                _stateUpdatesSinceGetPackStates.Add(newState.Name);
            }

            OnStateUpdateEvent.Invoke(newState);
        }
コード例 #3
0
        /// <summary>
        /// Processes a java AssetPackStates object and invokes <see cref="OnForcedStateUpdate"/> for each pack
        /// state it contains.
        /// </summary>
        /// <param name="javaPackStates">A java object representing a AssetPackStates object.</param>
        private void ProcessPackStates(AndroidJavaObject javaPackStates)
        {
            try
            {
                var packStates = new AssetPackStates(javaPackStates);

                foreach (var packStatePair in packStates.PackStates)
                {
                    if (_stateUpdatesSinceGetPackStates.Contains(packStatePair.Key))
                    {
                        // A newer state update was received before the getPackStateTask finished.
                        // Discard this state.
                        continue;
                    }

                    OnStateUpdateEvent.Invoke(packStatePair.Value);
                }
            }
            finally
            {
                EndGetPackStates();
            }
        }
コード例 #4
0
        // Proxied java calls. Method names are camelCase to match the corresponding java methods.
        public void onStateUpdate(AndroidJavaObject installState)
        {
            var updateState = new AppUpdateState(installState);

            PlayCoreEventHandler.HandleEvent(() => OnStateUpdateEvent.Invoke(updateState));
        }
コード例 #5
0
 private void OnStateUpdateReceived(AppUpdateState newState)
 {
     OnStateUpdateEvent.Invoke(newState);
 }
コード例 #6
0
        // Proxied java calls. Method names are camelCase to match the corresponding java methods.
        public void onStateUpdate(AndroidJavaObject assetPacksState)
        {
            var packState = new AssetPackState(assetPacksState);

            PlayCoreEventHandler.HandleEvent(() => OnStateUpdateEvent.Invoke(packState));
        }