コード例 #1
0
        protected override void UnregisterSubscribes()
        {
            _googleStoreNotActive.Click -= GoogleStoreNotActiveOnClick;

            if (BonusListAdapter != null)
            {
                BonusListAdapter.ItemClick -= AdapterOnItemClick;
            }
            if (TaskListAdapter != null)
            {
                TaskListAdapter.ItemClick -= AdapterOnItemClick;
            }

            if (_serviceConnection != null && _serviceConnection.Connected)
            {
                _serviceConnection.OnConnected -= HandleOnConnected;
                _serviceConnection.Disconnect();
            }

            if (_billingHandler != null)
            {
                _billingHandler.OnProductPurchased -= BillingHandlerOnProductPurchased;
                _billingHandler.BuyProductError    -= BillingHandler_BuyProductError;
                Rep.DatabaseHelper.DatabaseChanged -= InstanceOnDatabaseChanged;
            }
        }
コード例 #2
0
 static void DisconnectFromPlayStore()
 {
     m_buyingProductId = null;
     if (m_serviceConnection != null && m_serviceConnection.Connected)
     {
         m_serviceConnection.Disconnect();
     }
 }
コード例 #3
0
 protected override void OnDestroy()
 {
     if (_serviceConnection != null && _serviceConnection.Connected)
     {
         _serviceConnection.Disconnect();
     }
     base.OnDestroy();
 }
コード例 #4
0
        protected override void OnDestroy()
        {
            if (BillingServiceConnection != null)
            {
                BillingServiceConnection.Disconnect();
            }

            base.OnDestroy();
        }
コード例 #5
0
 public void Disconnect()
 {
     if (_connection != null)
     {
         _connection.Disconnect();
         _connection = null;
         _activity   = null;
     }
 }
コード例 #6
0
        protected override void CompleteDeactivation()
        {
            if (_connected)
            {
                _connection.Disconnect();
                MainActivity.BillingServiceConnection = null;
            }

            base.CompleteDeactivation();
        }
コード例 #7
0
 protected override void OnDestroy()
 {
     // Are we attached to the Google Play Service?
     if (_serviceConnection != null)
     {
         // Yes, disconnect
         _serviceConnection.Disconnect();
     }
     // Call base method
     base.OnDestroy();
 }
コード例 #8
0
ファイル: InAppPurchase.cs プロジェクト: LckDck/LiteHelper
 public void Disconnect()
 {
     if (_serviceConnection != null)
     {
         if (_serviceConnection.Connected)
         {
             UnBind();
             _serviceConnection.Disconnect();
         }
     }
 }
コード例 #9
0
        public void Disconnect()
        {
            DeviceDebugAndroid.LogToFileMethodStatic();

            if (inAppBillingServiceConnection != null)
            {
                if (inAppBillingServiceConnection.Connected)
                {
                    inAppBillingServiceConnection.Disconnect();
                }
            }
        }
コード例 #10
0
        public void Disconnect()
        {
            try
            {
                SAMLog.Debug($"AndroidBilling.Disconnect");

                if (IsConnected)
                {
                    _serviceConnection.Disconnect();
                }
            }
            catch (Exception e)
            {
                SAMLog.Error("IAB::Disconnect", e);
            }
        }
コード例 #11
0
        protected override void OnDestroy()
        {
            if (_serviceConnection != null && _serviceConnection.Connected)
            {
                _serviceConnection.Disconnect();
            }

            if (_billingHandler != null)
            {
                _billingHandler.OnProductPurchased      -= BillingHandlerOnProductPurchased;
                _billingHandler.OnProductPurchasedError -= BillingHandlerOnProductPurchasedError;
                _billingHandler.BuyProductError         -= _billingHandler_BuyProductError;
                Rep.Instance.DatabaseChanged            -= InstanceOnDatabaseChanged;
            }
            Toast.MakeText(this, "Destroyed", ToastLength.Short).Show();
            base.OnDestroy();
        }
コード例 #12
0
        protected override void OnDestroy()
        {
            if (Rep.DatabaseHelper != null)
            {
                Rep.DatabaseHelper.DataBaseCreatedOrOpened -= DatabaseHelperOnDatabaseCreatedOrOpened;
            }
            if (_serviceConnection != null)
            {
                _serviceConnection.OnConnected -= _serviceConnection_OnConnected;
                _serviceConnection.UnbindErrors();

                if (_serviceConnection.Connected)
                {
                    _serviceConnection.Disconnect();
                }
                if (_serviceConnection.BillingHandler != null)
                {
                    _serviceConnection.BillingHandler.UnbindErrors();
                }
            }
            base.OnDestroy();
        }