I searched the web for an answer but I don't find any information about if I can add in app purchase after I publish the app in play store in a new update for the application or should I added it from the beginning ?
You can add in app billing to an existing app and I've done so with a few of mine in the past.
A point to note is that you must upload an APK with billing permissions enabled at least into Alpha channel before you can test it.
Related
When I tried to purchase a product with the in-app purchase I am receiving an error as mentioned below instead of in-app purchase dialog
This version of the application is not configured for billing through Google Play
Yes, there are lots of answers available online but they all suggested adding this particular user as a licensed tester, I am facing this issue in the live application and I can not add a user as a licensed tester.
I also find a workaround for this issue as mentioned below,
Uninstall the app from the device
I removed the google account from the device on which I am facing the issue
Then add a new google account on the same device
Install the app again from the google play store
And try to purchase a product and it worked
Again I uninstall the app
I remove the new google account from the device and add the old one
Install the app from the play store
And try to purchase a product and its shows the error mentioned above
Yes, adding a new google account fix the issue but my question is why this is not working with my existing google account?
The issue has been fixed 🎉
The live build did not contain the permission com.android.vending.BILLING
What I was doing wrong is, I added this permission to the build and was testing in debug mode and not from the internal testing of the google play console.
After adding this permission I uploaded the build to internal testing and download the app from there on my real device and everything worked as expected.
Still, the confusing point is in some android device billing works without the above-mentioned permission 🤔
I am developing the flutter app which has In-app-Purchases feature, I have created the non-consumable product (one time) in the developer console. And I am using the official flutter package to implement IAP in the app - https://pub.dev/packages/in_app_purchase.
IAP product is in active state in the play console
I uploaded the right version and version code of the APK
My app is in published state
I have added the license testers under account settings to test IAP.
my androidManifest.xml file updated with right user permission for BILLING.
when I test the IAP in local it works well, I am able to test the IAP properly.
but after I published the same (generated App bundle) in to play store under Alpha release, it does not works. If I check the logs using the abd logcat, then I just getting the below line related to billing
BillingClient: Client is already in the process of connecting to billing service.
I am not sure, should I specifically do any app signing before generates the app bundle after added the IAP. I am just using the existing key information which I have used for previous releases to do the app signing.
Kindly let me know if anybody can help on this problem and I can share if anyother information is required
Now the IAP feature is working in my flutter APP (in Alpha, beta, Production), the problem was in the code. when we try to connect to the store we have this code to check the store availability.
final bool available = await InAppPurchaseConnection.instance.isAvailable();
I was just checking one time and if store available I further coded the premium features logic. But this works always in local, but the published alpha/beta versions never works.
so I just changed my code like below.
if(!available)
{
//try to connect again
await InAppPurchaseConnection.instance.isAvailable();
}
Here I am just trying to connect the store again, If first time fails. so at first we dont get always the response properly, trying multiple times to connect with store helps to work IAP. I put the logic to check the connection 3 times. Hope this helps!
Before asking this question, I have read the developer notes on android developers site and also watched the Google IO video. I have also seen the question posted on SO. Since the question has been asked long ago and its answers are also pretty aged, it doesn't answer my doubts reason being Google has changed quite a few things related to In App Billing and its testing.
I am planning to add in app purchase to my app which I published long ago in play store. I wrote the code of in app billing V3 ytaking help from TrivialDrive example. I have few doubts on how do I proceed further for testing:
[Question]
I have read that I should upload the new apk which includes in app billing code and permission to play store's in-app products. Won't that make the upgrade available to all the users using previous version of app? Once I upload the new apk with in app billing feature, it would replace the older apk in production, right? If yes, how do I make sure the upgrade goes to production only when I am done with testing?
When I click on button for in-app purchase, it displays an alert dialog with following error:
Authentication is required. You need to sign in to your Google Account.
You can upload it to the Alpha or Beta channels first. Add yourself as a test user so you'll be able to make test purchases.
When the version on the Beta channel will be ready, you can make it the production version.
If you choose to upload it to the production, you can choose not to publish it, but save it as draft, and you'll be able to test it.
Authentication is required. You need to sign in to your Google Account error comes when you have not downloaded the app from playstore(i.e. you are testing via IDE).
You can test in app purchases via alpha beta channels from your dev console as told by Udi I.
Additional points:-
Keep in mind that for every real/succesful transaction/purchase Google takes 30% of the fee.
You can re-imburse/cancel the transaction to the user in the first 15 minutes.
User can restore the purchases within 15 Minutes, or the in app purchase amount credited to you will get deducted if the user immediately un-installs the app after doing the transaction.
I am trying to test google play services features in an app, without publishing the app.
I went through the below link to do that.
https://developers.google.com/games/services/console/enabling
This process worked earlier but i think it has changed now, as i am getting the following error even after checking all the steps mentioned in the link above.
"The application is incorrectly configured. Check that the package name and signing certificate match the client ID created in Developer Console. Also, if the application is not yet published, check that the account you are trying to sign in with is listed as a tester account. See logs for more information."
Does anyone know if there has been any change in the process or if i am missing out something? Thanks.
You need to publish the app before it becomes available for testing.
If you publish the app and it is only in the "alpha testing" section then it is NOT available to general public; it is only available to activated testers in the alpha section.
EDIT: One additional note: "normal" uses will not find your app on Google Play, but also the activated tester can not find the application by using the search box.
Only the direct link to the application package will work (only for the activated testers).
You do not need to publish an app for testing. From the error it seems that the users/testers who want to test are not white listed. Quoting from the official documentation.
If your game is in an unpublished state, you must whitelist the user accounts that you want to grant access for testing. Otherwise, your testers will encounter OAuth and 404 errors when attempting to access the Google Play games services endpoints. Also remember to add yourself as a tester, or the Play Games SDK will not work for your user account
Hope this Helps!!
We have an existing app (apk v282) published in Google Play. This app doesn't have in-app products and no BILLING permission.
We have developed an upgrade version (v292) that contains in-app products and BILLING permission.
We face a problem to create the in-app products in Google Play console:
When we upload the v292 apk as a draft in Google Play console, we have two APK listed in the draft: the old and the new:
From this page, we have two alternatives:
1- Either we click on "In-app products" on the left list to create our products, we see a page saying:
To add in-app products, you need to add the BILLING permission to your
APK.
So we cannot create in-app products, probably because v282 still is in draft configuration.
2- Or, we remove the older v282 APK (that hadnt the BILLING permission), in order to leave only the new v292 in the Draft configuration. But then when clicking on "In-app products", we get a popup warning about the configuration not being saved. But there is no button to save it, only publish. Of course we don't want to publish it as it's under test.
To sum it all up: How to test in-app purchase in an application that was previously published without it?
For everyone looking for a solution to this: uploading an apk to alpha will do. So you should add billing permission to your android manifest, build a signed version and load apk to alpha. Afterwards you can configure in app purchase products without uploading an apk to production.
I had the exact same problem. What I ended up doing was uploading a new release with the new permission but without the in app billing option visible. Mine was easy as it was just a preference option to remove ads that was easy to just not show. Once published the site let me create in-app products and I was able to test with a new apk file and published that one shortly afterwards.
You have to temporary change the package name and upload new application in market (Do not need to publish ) for temporary.
Just checking in App purchase so don't choose any package name which you want to use in feature. because Each package name is unique and Google remembers all package names anyway so you could use this a reminder
And then test in that and when you get success full run in that temporary build app then you can change again your previously package name in which you want to upload your next apk and you must have to delete your old version from that and then you can create in app product now.
Now if you want to check in App purchase then you have to buy that product from different account except this account in which you are uploading your apk Dont worry you can rollback your money after checking this functionality.
I recently face this problem and I followed like this So I hope you will get some help from my experience.
I think the issue here is that the Google Play console thinks that you are trying to publish multiple apks. This is only supported if the apks are targeting different device configurations:
publishing multiple apks
I think that once you delete the previous version you will be able to activate the newer version with in-app billing. I'll be trying this out shortly and update this answer if I learn more.