Closed wsrdzg closed 9 years ago
Thanks for the report & stack trace! I update OpenIAB install to be forced to run on the UI thread. That should take care of the problem.
Please use the latest snapshot release to test it; 0.4.0-SNAPSHOT (just pushed to maven).
Thanks after updating to 0.4.0-SNAPSHOT I didn't get the exception. But I get a proguard failure:
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentResponse
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentResponse
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.MpUtils
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.MpUtils
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentRequest
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentRequest$PaymentRequestBuilder
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentResponse
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentResponse
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentRequest
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.MpUtils
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentRequest$PaymentRequestBuilder
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentResponse
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.MpUtils
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentResponse
Warning:org.onepf.oms.appstore.FortumoBillingService: can't find referenced class mp.PaymentRequest
Warning:there were 31 unresolved references to classes or interfaces.
I got other proguard failures before when I used 0.2.0, so I added following like I had read in on some website:
-keep public class com.badlogic.gdx.Gdx {
public protected *;
}
-keep public class com.badlogic.gdx.Application {
public protected *;
}
-keep public class com.badlogic.gdx.pay.android.IAP {
public protected *;
}
-keep public class com.badlogic.gdx.backends.android.AndroidEventListener {
public protected *;
}
-keep public class com.badlogic.gdx.backends.android.AndroidApplication {
public protected *;
}
-keep public class de.darkbloodstudios.foreveralone.AndroidLauncher {
public protected *;
}
-keep public class com.badlogic.gdx.pay.android.openiab.PurchaseManagerAndroidOpenIAB {
public protected *;
}
EDIT: I added -dontwarn org.onepf.oms.appstore.FortumoBillingService
now it is working. Maybe you can edit the tutorial here on GitHub so
others know what to do.
Great - Thanks for testing it out! :-D Anyhow, I updated the gdx-pay readme to reflect the changed proguard configuration.
If you call PurchaseSystem.install(...) in ApplicationListener.create()/ApplicationAdapter.create() like in the test (https://github.com/libgdx/gdx-pay/blob/master/gdx-pay-tests/src/com/badlogic/gdx/pay/tests/PayTest.java) you get the following exception on Android:
With version 0.2.0 that doesn't happen.