onepf / OpenIAB

Open In-App Billing for Google Play, SlideMe, Amazon Store, Nokia Store, Samsung Apps, Yandex.Store, Appland, Aptoide, AppMall and Fortumo.
http://onepf.org/openiab/
Apache License 2.0
476 stars 171 forks source link

Samsung IAP crash on startup under certain conditions #444

Closed MikhailAOstapenko closed 9 years ago

MikhailAOstapenko commented 9 years ago

Hello again :)

I'm encountering crash on startup in case of:

  1. Samsung IAP Service is not installed on device
  2. Test mode enabled (SamsungApps.isSamsungTestMode = true)

I'm looking into SamsungApps.isBillingAvailable(String packageName) function and see, that function always returns 'true' if 'isSamsungTestMode' enabled without any check for Samsung IAP availability. Is it bug or feature?

Here is log: 01-26 17:56:21.023: E/AndroidRuntime(16228): FATAL EXCEPTION: main 01-26 17:56:21.023: E/AndroidRuntime(16228): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.sec.android.iap/com.sec.android.iap.activity.AccountActivity}; have you declared this activity in your AndroidManifest.xml? 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1635) 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1434) 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.app.Activity.startActivityForResult(Activity.java:3432) 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.app.Activity.startActivityForResult(Activity.java:3393) 01-26 17:56:21.023: E/AndroidRuntime(16228): at org.onepf.oms.appstore.SamsungAppsBillingService.startSetup(SamsungAppsBillingService.java:165) 01-26 17:56:21.023: E/AndroidRuntime(16228): at org.onepf.oms.OpenIabHelper$12$1.onIabSetupFinished(OpenIabHelper.java:831) 01-26 17:56:21.023: E/AndroidRuntime(16228): at org.onepf.oms.OpenIabHelper.finishSetup(OpenIabHelper.java:920) 01-26 17:56:21.023: E/AndroidRuntime(16228): at org.onepf.oms.OpenIabHelper.finishSetup(OpenIabHelper.java:889) 01-26 17:56:21.023: E/AndroidRuntime(16228): at org.onepf.oms.OpenIabHelper.access$1700(OpenIabHelper.java:83) 01-26 17:56:21.023: E/AndroidRuntime(16228): at org.onepf.oms.OpenIabHelper$12$2.run(OpenIabHelper.java:840) 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.os.Handler.handleCallback(Handler.java:725) 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.os.Handler.dispatchMessage(Handler.java:92) 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.os.Looper.loop(Looper.java:175) 01-26 17:56:21.023: E/AndroidRuntime(16228): at android.app.ActivityThread.main(ActivityThread.java:5279) 01-26 17:56:21.023: E/AndroidRuntime(16228): at java.lang.reflect.Method.invokeNative(Native Method) 01-26 17:56:21.023: E/AndroidRuntime(16228): at java.lang.reflect.Method.invoke(Method.java:511) 01-26 17:56:21.023: E/AndroidRuntime(16228): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102) 01-26 17:56:21.023: E/AndroidRuntime(16228): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869) 01-26 17:56:21.023: E/AndroidRuntime(16228): at dalvik.system.NativeStart.main(Native Method)

RomanZhilich commented 9 years ago

Looks like a bug, thank you for your report.