Implement InApp Purchase in an existng project of Android? - android

I am working on a android project where I received an enhancement from client to add in App Purchase to add certain points in the game. So the player can increase his life by using in app purchase. I have checked the sample app provided by google and also configured inApp purchase same as it was doing. Now I want to do it from my live account so that live account can be used for testing and in live app.
Please provide links and steps by which I can get the details which I need to set in my application such as AppID etc.
Thanks in Advance.

Add your email id to the testers account on google developer console.
Add the iap products in google developer console.
Sign the build with live keystore.
Do inapp. (Make sure that the prompt that comes up says This is a test account bla bla)

Related

How to integrate InApp Purchase in Android

I want to use inapp purchase in my application.FOR inapp I have seen so many tutorial and I have get demo project for that.,but the problem is that when I am clicking in google developer console, it's asking for payment and I only want its public key without payment, I don't want to publish my application on googleplay. two things I want to do
how to create my public key for InAPP Purchase api.
from where I can get my key for inapp?/
I have seen this links
here
&
here
and here is the image snippest
I suppose the best tutorials are those of developer.android.com. So first read this:
http://developer.android.com/google/play/billing/billing_overview.html
You definitely want to add this:
<uses-permission android:name="com.android.vending.BILLING"/>
to your manifest so that you can later add your keys on the developer console
Actually you can not test Google InApp purchases without publishing application on play-store whether it is in Alpha Testing Mode.
In your case if you really need to test InApp purchases in your application then below are the steps to do so:
Sign-up on Google Play Console (Paid Once)
Complete your merchant account (Required for InApp)
Get billing-key (Go to Setting->API Access) from play developer console
Use this key into your application to purchase something from
play-store (Follow these steps)
Create application on Play Console and Fill all store listing data
for same application
Create in-app purchases products on console
Generate signed application and publish it to alpha
Add some testing users for demo testing of your application
After final testing publish it to production for all users
Thanks

How to add in app purchase in one feature of an application of android?

I have prepared an application which has several features. To one feature of them, I want to add in app purchase option. Can anyone inform me the simplest way to implement this? As far I know it can't be tested using emulator. Then How can I test it after adding this option?
you can make a test account in your developer console under setting, upload the apk with in-app billing permissions but don't publish it.
Add in-app products in developer console.
Login with the same test account you have added in developer console as primary account to your android device.
then install the signed apk into your device
and you are ready for testing
you can also refer to android.developer for more details
http://developer.android.com/google/play/billing/billing_testing.html
At last, I have implemented in app purchase in my application with the help of bellow's website which contains brief but clear explanation of in app purchase with a simple example. Possibly this site will be helpful for the novice android programmers to learn how to implement in app purchase.
techotopia-In app purchase

Is their any need merchant account for In app purchase in android

I want to use In app purchase in android. I have a developer account for android play store. But I just want to ask is their any necessary of merchant account details to test android In app purchase functionality.
If no then please guide me how I can test In App using test account.
You will not see an option to create and manage In App products for your app until you have setup your Merchant Account. Due to this, you must have one to test and deploy apps using in app purchases.

In-app billing of sample application is failing with payment error

Executed the following steps for running the sample application, but the application is failing with payment error.
Downloaded the sample application from android SDK
Added Google Play public key to the sample application code.
Changed the package name of the sample application.
Built the sample application in release mode and sign it.
Created a product list for the sample application.
Published the items of product list (sword_001 and potion_001) for the draft version of sample application.
Test account registered under the Google Play publisher account.
Verified that device is running a supported version of the Google Play application.
Installed the same signed application onto the device.
10.My test account is the primary account on my device.
11.Ran the application and purchased the sword.
When I try to do a purchase getting the following error while the order is being authorized ('authorize payment' is displayed), this usually happens about 30 seconds after the order has been placed (i.e. 'accept & buy' has been tapped).
"Your payment could not be processed. sign in to your google wallet account to request support"
Does anyone experiencing the same error ?
Thanks in advance.
Getting in-app billing is challenging. Its not easy to read thru and get it integrated. I have a project created which works like a hello world, I suggest you download and use that. There are just too many variables. I have documented the integration steps here.
Problem got fixed when I changed the API version number inside makeRequestBundle() method of BillingService.Java:
request.putInt(Consts.BILLING_REQUEST_API_VERSION, 1);
to
request.putInt(Consts.BILLING_REQUEST_API_VERSION, 2);

Configuring Android In App purchase for testing

Im new to this situation. Ive coded for Android In App purchase, and uploaded it as a draft in google play(Not published) for testing purpose. Now Ive to create some In App products there in developer console, that can be bought through my app.
My doubt is about the pricing when the app is put for testing. The price cant be set to zero. It shows a minimum of $0.99 should be there.
To test my app, how can I configure it such a way that i can purchase it freely.
Helps would be appreciated, :)
This should help you get started Testing In-app Billing.
However there is a warning:
Note: Making in-app billing requests with the reserved product IDs
overrides the usual Google Play production system. When you send an
in-app billing request for a reserved product ID, the quality of
service will not be comparable to the production environment.
And one more thing i could find out on the above topic is, its possible to add testing email accounts in the Google Play. Developer can add any number of gmail ids as testing accounts there.

Categories

Resources