In App BIlling trouble with Pending Intents and switching activities

后端 未结 1 595
有刺的猬
有刺的猬 2021-01-01 06:32

Ok so I have been trying to fix this for days, and I\'m not coming here looking for someone to do my work for me as I have been troubleshooting and fixed every single error

相关标签:
1条回答
  • 2021-01-01 06:43

    I may know what's wrong and I have a test for you to do. The buy screen runs a finish call after the user cancels the purchase or completes the purchase. For me for some reason the finish call was drifting down into the currently running activity and (CLOSING??? it).

    Here's the relevant line from the log:

    06-16 11:20:22.774: WARN/ActivityManager(132): Duplicate finish request for HistoryRecord{40ace828 com.android.vending/.billing.InAppBuyPageActivity}

    I think I fixed this in my code problem is that I can't remember exactly what I did (maybe didn't call finish in my purchase complete handler...)

    I don't know anything about Andgen, but what would happen if a finish call got called on the main Andgen activity? I'd imagine it would stop execution and you might get a black screen and an app crash.

    So to test this, create a separate activity for you buy page. Doesn't need to be complicated - maybe have it just buy one canned product after it starts up. Run your code and see if it still gives you the black screen of doom. My bet: it may exit out of the activity back to your game but I think it'll work.

    Hope this helps and Good Luck!

    0 讨论(0)
提交回复
热议问题