Open arpitkh96 opened 8 years ago
I am currently also experiencing this issue. My older apps (which probably aren't using 2.4) are not.
03-05 02:26:29.933 10033-10033/com.pitchedapps.material.glass.free E/AndroidRuntime: FATAL EXCEPTION: main Process: com.pitchedapps.material.glass.free, PID: 10033 java.lang.IllegalStateException: Can't start async operation (launchPurchaseFlow) because another async operation(launchPurchaseFlow) is in progress. at org.sufficientlysecure.donations.google.util.IabHelper.flagStartAsync(IabHelper.java:821) at org.sufficientlysecure.donations.google.util.IabHelper.launchPurchaseFlow(IabHelper.java:375) at com.pitchedapps.material.glass.fragments.DonationsFragment.donateGoogleOnClick(DonationsFragment.java:359) at com.pitchedapps.material.glass.fragments.DonationsFragment$1.onClick(DonationsFragment.java:235) at android.view.View.performClick(View.java:5204) at android.view.View$PerformClick.run(View.java:21154) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5417) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at de.robv.android.xposed.XposedBridge.main(XposedBridge.java:117)
disable the button as soon as it's pressed
And if you want to press the button a second time?
you can reenable the button as soon as the first transaction has finished (in onactivityresult)
Have you properly delegated the results like done in https://github.com/SufficientlySecure/donations/blob/master/example/src/main/java/org/sufficientlysecure/donations/example/DonationsActivity.java#L84 ?
Sorry, my bad. It seems like I didn't the on activity created part. All is working now for me
The README should be improved to describe the usage of the onActivityResult delegation.
I have same issue. My onActivityResult is the same as in example. My code is here https://github.com/btimofeev/UniPatcher/blob/master/app/src/google/java/org/emunix/unipatcher/ui/activity/DonateActivity.java
Android 6.0.1 Google Play Services 10.0.84
I added a better explanation to the README to pass through results to the fragment in onActivityResult. I don't know why other crashes still happen.
As far as i know its not allowed to run multiple asynctask for google in app billing.But this library is creating new tasks if pressed donate button twice.Maybe it needs to check if a task is already running and react according to it.