AndroidInAppPurchase
AndroidInAppPurchase copied to clipboard
Suspned/Resume make the system dialog appears twice
Hello,
Thank you for this great extension, it works perfect except that while displaying the system dialog of in app purchase, if I suspend/resume the application, the another dialog appears from step 1 over the previous dialog confusing the application and occasionally causing a crash. For example if in the screen of adding credit/debit card, I suspend/resume, the first dialog of purchase confirmation appears over the dialog of adding credit/depit card. I think it is similar to #14 but I am not sure.
I am also seeing some crashes with following stack trace. I don't have any exact step to reproduce the same, but in our crash analytics, there are couple of records showing this same log.
I am not sure if its related to same behaviour.
java.lang.NullPointerException
com.android.payment.utils.IabHelper.queryPurchases(IabHelper.java:848)
com.android.payment.utils.IabHelper.queryInventory(IabHelper.java:544)
com.android.payment.utils.IabHelper$2.run(IabHelper.java:619)
java.lang.Thread.run(Thread.java:856)
Also, there are also some records showing this stack trace :
java.lang.RuntimeException
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3351)
android.app.ActivityThread.access$700(ActivityThread.java:123)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1151)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:137)
android.app.ActivityThread.main(ActivityThread.java:4424)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:511)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:592)
dalvik.system.NativeStart.main(Native Method)
Caused by: com.android.payment.utils.IabHelper.launchPurchaseFlow(IabHelper.java:386)
com.pozirk.payment.Billing.purchase(Billing.java:54)
com.pozirk.payment.BillingActivity.onCreate(BillingActivity.java:57)
android.app.Activity.performCreate(Activity.java:4465)
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1051)
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3351)
android.app.ActivityThread.access$700(ActivityThread.java:123)
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1151)
android.os.Handler.dispatchMessage(Handler.java:99)
android.os.Looper.loop(Looper.java:137)
android.app.ActivityThread.main(ActivityThread.java:4424)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:511)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:592)
dalvik.system.NativeStart.main(Native Method)
I don't use this extension anymore, so most likely won't support it any longer, have no time now. Sorry, you still have all the source code.