I have been only using queryPurchaseHistoryAsync for in-app purchases on Android and it has been working fine. After using a promo code I noticed that it is not seen by my code. Is there a reason for this? Normally this function should return all recent purchases and redeeming code is a recent purchase. What am I missing here?
If you can provide the sample code of your it would be more helpful for more to find you a solution
At the same time hope this link provide more information to Support promo codes in your app
which version of the google play billing api you are on, from the method name, he should be on the new one
https://developer.android.com/google/play/billing/billing_overview
Related
I'm trying to setup a subscription IAP for my app. I have managed to purchase the sub via my app. The next stage is being able to edit the subscription and display details on the subscription via the app. I can't find much details on this here, or in the in_app_purchase documentation.
Does anyone know how to do this, or what the best practices are?
Many thanks.
The Google play billing guide gives a comprehensive guide on how to handle this.
Essentially, let the user edit their subscription via Google Play.
I did this simply using the url_launcher package as follows:
launch("https://play.google.com/store/account/subscriptions")
I am developing an app for Android with Android Studio.
My questions are:
"How do I implement A Yearly Subscription for my app? I want the app to not be usable if they don't have a current subscription-how do I do that?
I know that I have to go to the developer area in Google play and setup subscriptions, and that I need a product ID, but what about code in my app? Is there a library, set of code, or an easy way to accomplish what I need? I know I need an API, but where do I add it in my app? I am lost...
Again, all I want is for my app to have a yearly subscription, and the app should not work unless the yearly subscription is paid.
I have went here, and again it only tells me about the play console-nothing about adding code into my app. Google Play Create a Subscription I don't know what I need or where to code for it...
Any help would be greatly appreciated, and thank you in advance!
Step 1
First create a payment profile with Play Console and follow all instructions at https://support.google.com/googleplay/android-developer/answer/7161426
including the pages on the right side of the page.
Step 2
Incorporate billing into your app using the billing API described here
https://developer.android.com/google/play/billing/api
I have created a android application. Subscription is free. However I have put ads inside application. Now I want provide option within app where people can buy ad-free version. And also provide option to restore purchase.
I went through Android docs didn't understand anything. Please provide a good tutorial.
Hey I had worked on InApp Purchase recently and I've successfully integrated in my existing app and ready to make it live. Initially when i had started doing this I've downloaded google InApp Billing Example called "Trivial Drive" from here.
But it didn't help me much as it has lots of issues and bugs, So I've decided do it on my own from scratch using new v3 api which you can find here. This tutorial has clear explanation that would help you and also if you have time, see this youtube video where google employee had explained clearly how to integrate it.
Also if you want quick example, I've a sample app which you can download from here.
The following video also explains how to integrate InApp Purchase. Please go through it.
https://www.youtube.com/watch?v=-h2ESH71hAI
Thank you
Refer this question on SO Implementing In App purchases in Android?. Also for official documentation of The In-app Billing Version 3 API refer this link http://developer.android.com/google/play/billing/api.html
This is how you create In app purchase inside your app.
1) In your developers console, go to your application and create a in app product(Name it as Ad-Free Access or what ever).(Note: to create a in app product you need to have a merchant account).
2) If you have a merchant account ready, create a InApp Product with the type of Subscription(One time or monthly or yearly) and price.
3) Once you have created the InApp product successfully, you can prompt the user to purchase an InApp product by quering a list of in app products in your app and ask user to purchase them.
Here is a link to query the InApp products:
4) Once a user purchase the product, based on the purchase status of the product, you can disable the ads in your app.
The Simple and very easy way to implement in-app through a library anjilab.
Just add the dependecy
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
Add Permission, implement methods and you done.
For any issues you can see here
issues
The developer guide gives the sample for in-app billing, and for the subscription it takes for the same sample application, and saying to modify it for subscription.I want to modify this "Dungeons" sample application for subscription, But in the developer guide there is no info for modifying this sample to subscription. What should i change for same.I want to know complete steps for modifying this sample. Please help.
Thanks in advance.
if you implement your InApp Product Purchase with old billing API.
then
update the billing API code to version 2
not much change in the InApp subscription. other then mBillingService.requestPurchase(productId, Consts.ITEM_TYPE_SUBSCRIPTION, null)
To check subscribed items, you can use Restore purchases. In App subscriptions also act as a `InApp Products'
I hope it helps you.
In my android app internaly useing some transactions in that purpose i want use *Subscriptions Google market billing *.
i googled found some sites for In-app billing and Subscriptions ,now want used Subscriptions based api but not found any code related this api.i found in-app billing code only.
please send Subscriptions based code
There is no one specific API. It is an extension of in-app billing with a new parameter and a couple of modifications in the APIs. For example, in the RequestPurchase call in BillingService.java, the item type now needs to be 'subs'. You really need to read the documentation:
http://developer.android.com/guide/google/play/billing/billing_subscriptions.html
as well as download the 'Google play billing Rev 2' from the 'Extras' from the SDK manager as that's a sample app that does subscriptions. The entire code base for it is too big to just give you but the sample app is a good start. I suspect with such a vague question, you're not going to get more details.