3

I am working on the Google Play in-app billing service.

I've downloaded the version 3 API sample and uploaded on my developer console as a draft application. But when I start the app on my phone and my computer, this program stay at the ONE SEC screen and never changes.

Anybody has seen that before?

Arpit
  • 6,212
  • 8
  • 38
  • 69

2 Answers2

2

Below are a couple error messages I received after running the Trivial Drive demo and how I fixed the issues. The first one is the most similar to your issue but keep reading because part of the second may apply to you too.

Problem: Screen message displays "One Second" for a long time then eventually shows an alert dialog, "Error:Failed to query inventory:IabResult:Error refreshing inventory...", then the message goes back to "One Second" and stays stuck on that message (like you describe).

Solution: Go to Settings->Accounts&Sync and make sure "Background Data" is checked.

Problem: You fix the issue above, link over to Google Play but receive this message, "The version of the application is not configured for billing through Google Play."

Solution: You can run the app with your debug key, but you won't be able to successfully purchase anything on Google Play if you don't export the apk with your production key. So instead of the "easy way" of running the app from Eclipse, you need to File->Export-> and go through the process of creating a production apk with your production key's password, etc (just like deploying a real app). I then go to a DOS command and "adb install MainActivity.apk" to install it on my phone.

The Trivial Drive "readme" file is very good: start there and make sure you follow every step explicitly. You will have to upload the production apk, THEN setup the in-app products, wait a few hours for Google to process things, then you will be able to test. It is a back-and-forth process since there is no staging environment.

0

1) Also, make sure u don't install the program onto your phone from Ecilpse. I had to use command prompt to install the apk file in order for it to work. To install the apk via the command prompt, put your apk file into your "android-sdks\platform-tools" folder and then follow these steps

Install an apk file from command prompt?

Make sure u are in the "android-sdks\platform-tools" directory when u type in "adb install YourFile.apk".

2) Make sure u have all the green check-marks up in your Google Play Developer Website. I'm talking about for "APK", "Store Listing", and "Pricing and Distribution".

3) To add the tester accounts, go to "Settings" on Google Play Developer Website. Add the emails in "Gmail accounts with testing access".

Community
  • 1
  • 1
Gene
  • 10,819
  • 1
  • 66
  • 58