Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by luvcraft · Dec 08, 2012 at 01:38 AM · memorygoogle playprime31in app purchase

android: game restarts on google play purchase

I'm using the Prime31 in-app-billing plugin to sell consumables in an android game. On my test device (Motorola Defy XT), when I open the Google Play store to make the purchase (either real or test store), the android OS closes my game in the background to free up memory. Once the purchase is finished, the Play store passes control back to my game, the OS says "oh, the game isn't running, let me restart that for you" and restarts it, the game restarts, but the game never receives the purchase confirmation so the purchase never shows up in the game. The player has been charged for the purchase, but the purchase doesn't show up! THIS IS BAD.

At the suggestion of the Prime31 team, I created a new, super-low-memory scene, and tried moving the player to that new scene whenever they initiate a purchase and running the purchase from there. This makes the game return correctly and confirm the purchase correctly if the purchase is made in the TEST store, but using the REAL store the OS still closes the game.

Meanwhile, an identical build of the game, on the same device, which uses the Prime31 Amazon IAP plugin and Amazon's store for the purchase instead of the Google Play store, makes the purchase just fine without closing the game, and doesn't even need to be called from that minimal scene.

Any suggestions on how I can fix this? I thought that if I set autoConfirmPendingPurchases to false that Google Play would continue to send the purchase data to my app (even after a restart) until I called confirmPendingPurchases(), but that didn't work, and the Prime31 guys said that it was because Google Play can take as much as 24 hours between resends of purchase data (unless I misunderstood them), so that's not an option.

I was also considering trying to make the OS "foreground" my game like a music player while the purchase was processing, but I don't think there's any easy way to do that in Unity, and I'm hoping for a simpler solution before I give myself a crash course in android native code just to make that work.

Please help!

Comment
Add comment · Show 1
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Romeo-Ordos · Jan 21, 2013 at 03:39 PM 0
Share

Any solution on this? I have the same problem but with own plugin for In-App-Billing v3.

0 Replies

· Add your reply
  • Sort: 

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

10 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Restore IAP in Android using Prime 31 1 Answer

In App Billing by Alipay, how to check if google services is not available 0 Answers

IAP game does not start on android 0 Answers

How to verify GooglePlay In App Billing receipt through Serverside 0 Answers

codeless IAP button not working on google playstore 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges