Esempio n. 1
0
        public async Task ActivatePro()
        {
            await _inAppPurchaseService.PurchaseProduct(ProEdition);

            _defaultValueService.Set(ProEdition, true);
            var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;

            appDelegate?.RegisterUserForNotifications();
        }
Esempio n. 2
0
        public async Task ActivatePro()
        {
            var productData = (await _inAppPurchaseService.RequestProductData(ProEdition)).Products.FirstOrDefault();

            if (productData == null)
            {
                throw new InvalidOperationException("Unable to activate CodeHub Pro");
            }
            await _inAppPurchaseService.PurchaseProduct(productData);
        }
Esempio n. 3
0
        public async Task ActivatePro()
        {
            var productData = (await _inAppPurchaseService.RequestProductData(ProEdition)).Products.FirstOrDefault();

            if (productData == null)
            {
                throw new InvalidOperationException("Unable to activate CodeHub Pro");
            }
            await _inAppPurchaseService.PurchaseProduct(productData);

            _defaultValueService.Set(ProEdition, true);
            _defaultValueService.Set(PushNotifications, true);
            var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;

            appDelegate?.RegisterUserForNotifications();
        }
 private void BuyCredits()
 {
     Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, true));
     mInAppPurchaseService.PurchaseProduct(ProductId);
     Mvx.Resolve <IMvxMessenger>().Publish(new ProgressMessage(this, false));
 }
Esempio n. 5
0
 public System.Threading.Tasks.Task PurchaseProduct(StoreKit.SKProduct productId)
 {
     using (_networkActivity.ActivateNetwork())
         return(_inAppPurcahseService.PurchaseProduct(productId));
 }
Esempio n. 6
0
        public async Task ActivatePro()
        {
            await _inAppPurchaseService.PurchaseProduct(ProEdition);

            ActivateUserNotifications();
        }
Esempio n. 7
0
 public Task ActivatePro()
 {
     return(_inAppPurchaseService.PurchaseProduct(ProEdition));
 }
Esempio n. 8
0
        public async Task ActivatePro()
        {
            await _inAppPurchaseService.PurchaseProduct(ProEdition).WithTimeout(TimeSpan.FromSeconds(30));

            ActivateUserNotifications();
        }