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

isBillingAvailable() Samsung IAP Service is not installed #488

Open thupten1234 opened 9 years ago

thupten1234 commented 9 years ago

The newest samsung store does not have a separate iap package so it seems the isBillingAvailable is failing. I am getting "isBillingAvailable() Samsung IAP Service is not installed" in the log in debug mode.

This same apk is working fine on old samsung device that has the iap package "com.sec.android.iap" The new device with newer galaxy store does not have the package. Is there a different way to make it work on the new devices?

Thanks.

thupten1234 commented 9 years ago
// LOG DURING SETUP

06-08 15:41:31.351: E/Zygote(30199): MountEmulatedStorage()
06-08 15:41:31.351: E/Zygote(30199): v2
06-08 15:41:31.351: I/SELinux(30199): Function: selinux_compare_spd_ram , priority [2] , priority version is VE=SEPF_SM-G925P_5.0.2_0009
06-08 15:41:31.351: E/SELinux(30199): [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL
06-08 15:41:31.351: I/art(30199): Late-enabling -Xcheck:jni
06-08 15:41:31.351: I/libpersona(30199): KNOX_SDCARD checking this for 10223
06-08 15:41:31.351: I/libpersona(30199): KNOX_SDCARD not a persona
06-08 15:41:31.371: D/TimaKeyStoreProvider(30199): TimaSignature is unavailable
06-08 15:41:31.371: D/ActivityThread(30199): Added TimaKeyStore provider
06-08 15:41:31.391: I/InjectionManager(30199): Inside getClassLibPath + mLibMap{0=, 1=}
06-08 15:41:31.391: I/InjectionManager(30199): Inside getClassLibPath caller 
06-08 15:41:31.551: D/InjectionManager(30199): InjectionManager
06-08 15:41:31.551: D/InjectionManager(30199): fillFeatureStoreMap com.thuptencho.transitbus
06-08 15:41:31.551: I/InjectionManager(30199): Constructor com.thuptencho.transitbus, Feature store :{}
06-08 15:41:31.551: I/InjectionManager(30199): featureStore :{}
06-08 15:41:31.611: D/PhoneWindow(30199): *FMB* installDecor mIsFloating : false
06-08 15:41:31.611: D/PhoneWindow(30199): *FMB* installDecor flags : 8454400
06-08 15:41:31.631: D/AbsListView(30199): Get MotionRecognitionManager
06-08 15:41:31.641: D/AbsListView(30199): Get MotionRecognitionManager
06-08 15:41:31.651: D/OpenIAB(30199): checkOptions() Options={availableStores=[], availableStoreNames=[], preferredStoreNames=[], discoveryTimeoutMs=0, checkInventory=false, checkInventoryTimeoutMs=0, verifyMode=1, storeSearchStrategy=0, storeKeys={}, samsungCertificationRequestCode=899}
06-08 15:41:31.651: D/OpenIAB(30199): checkGoogle() verify mode = 1
06-08 15:41:31.651: D/OpenIAB(30199): checkSamsung() activity = com.hellothupten.transitcore.activities.MainActivity@2f86f29d
06-08 15:41:31.651: D/OpenIAB(30199): hasRequestedPermission() is true for com.nokia.payment.BILLING
06-08 15:41:31.651: D/OpenIAB(30199): checkNokia() has permission = true
06-08 15:41:31.651: D/OpenIAB(30199): checkFortumo() fortumo sdk available: false
06-08 15:41:31.651: D/OpenIAB(30199): checkFortumo() fortumo billing required: false
06-08 15:41:31.651: D/OpenIAB(30199): checkFortumo() ignoring fortumo wrapper.
06-08 15:41:31.651: D/OpenIAB(30199): checkAmazon() amazon sdk available: false
06-08 15:41:31.651: D/OpenIAB(30199): checkAmazon() amazon billing required: false
06-08 15:41:31.651: D/OpenIAB(30199): checkAmazon() ignoring amazon wrapper.
06-08 15:41:31.651: D/OpenIAB(30199): startSetup() options = Options={availableStores=[], availableStoreNames=[], preferredStoreNames=[], discoveryTimeoutMs=0, checkInventory=false, checkInventoryTimeoutMs=0, verifyMode=1, storeSearchStrategy=0, storeKeys={}, samsungCertificationRequestCode=899}
06-08 15:41:31.651: D/OpenIAB(30199): setupWithStrategy() store search strategy = 0
06-08 15:41:31.651: D/OpenIAB(30199): setupWithStrategy() package name = com.thuptencho.transitbus
06-08 15:41:31.651: D/OpenIAB(30199): setupWithStrategy() package installer = com.sec.android.app.samsungapps
06-08 15:41:31.651: D/OpenIAB(30199): packageInstalled() is true for com.sec.android.app.samsungapps
06-08 15:41:31.651: D/Activity(30199): performCreate Call Injection manager
06-08 15:41:31.651: D/OpenIAB(30199): isBillingAvailable() Samsung IAP Service is not installed
06-08 15:41:31.661: D/AbsListView(30199): Get MotionRecognitionManager
06-08 15:41:31.661: D/AbsListView(30199): Get MotionRecognitionManager
06-08 15:41:31.671: I/InjectionManager(30199): dispatchOnViewCreated > Target : com.hellothupten.transitcore.fragments.RoutesListFragment isFragment :true
06-08 15:41:31.691: D/PhoneWindow(30199): *FMB* installDecor mIsFloating : true
06-08 15:41:31.691: D/PhoneWindow(30199): *FMB* installDecor flags : 8388610
06-08 15:41:31.701: D/OpenGLRenderer(30199): Render dirty regions requested: true
thupten1234 commented 9 years ago
//LOG WHEN MAKING A PURCHASE
06-08 15:44:01.571: D/ViewRootImpl(30199): ViewPostImeInputStage ACTION_DOWN
06-08 15:44:01.721: D/OpenIAB(30199): startSetup() options = Options={availableStores=[], availableStoreNames=[], preferredStoreNames=[], discoveryTimeoutMs=0, checkInventory=false, checkInventoryTimeoutMs=0, verifyMode=1, storeSearchStrategy=0, storeKeys={}, samsungCertificationRequestCode=899}
06-08 15:44:01.721: D/OpenIAB(30199): setupWithStrategy() store search strategy = 0
06-08 15:44:01.721: D/OpenIAB(30199): setupWithStrategy() package name = com.thuptencho.transitbus
06-08 15:44:01.721: D/OpenIAB(30199): setupWithStrategy() package installer = com.sec.android.app.samsungapps
06-08 15:44:01.741: D/OpenIAB(30199): packageInstalled() is true for com.sec.android.app.samsungapps
06-08 15:44:01.741: D/OpenIAB(30199): isBillingAvailable() Samsung IAP Service is not installed
06-08 15:44:01.741: D/OpenIAB(30199): finishSetup() === SETUP DONE === result: IabResult: 3, No suitable appstore was found (response: 3:Billing Unavailable) Appstore: null
06-08 15:44:01.741: D/OpenIAB(30199): dispose() was called for com.samsung.apps
06-08 15:44:01.741: D/OpenIAB(30199): startSetup() options = Options={availableStores=[], availableStoreNames=[], preferredStoreNames=[], discoveryTimeoutMs=0, checkInventory=false, checkInventoryTimeoutMs=0, verifyMode=1, storeSearchStrategy=0, storeKeys={}, samsungCertificationRequestCode=899}
06-08 15:44:01.741: D/OpenIAB(30199): setupWithStrategy() store search strategy = 0
06-08 15:44:01.741: D/OpenIAB(30199): setupWithStrategy() package name = com.thuptencho.transitbus
06-08 15:44:01.741: D/OpenIAB(30199): setupWithStrategy() package installer = com.sec.android.app.samsungapps
06-08 15:44:01.761: D/OpenIAB(30199): packageInstalled() is true for com.sec.android.app.samsungapps
06-08 15:44:01.761: D/OpenIAB(30199): isBillingAvailable() Samsung IAP Service is not installed
06-08 15:44:01.761: D/OpenIAB(30199): finishSetup() === SETUP DONE === result: IabResult: 3, No suitable appstore was found (response: 3:Billing Unavailable) Appstore: null
06-08 15:44:01.761: D/OpenIAB(30199): dispose() was called for com.samsung.apps
RomanZhilich commented 9 years ago

I haven't seen any announcements by Samsung, so I'm pretty sure they still use Samsung In-App Purchase app for billing. Galaxy Apps should promt you to install it when you try to download app with In-Apps.

thupten1234 commented 9 years ago

when Samsung In-App Purchase app for billing is not installed on the device, do we need to resolve the issue ourselve or openiab resolves the Samsung In-App Purchase app's install/upgrade process?

thupten1234 commented 9 years ago

Manually installed Samsung In-App Purchase on the device. On making a purchase forwarded me to Samsung Billing app on galaxy store after a dialog message that it requires this. On onIabSetupFinished, if billing is unavailable, shouldn't similar behavior occur?. ie. forward user to download Samsung In-App Purchase. thanks.

RomanZhilich commented 9 years ago

Samsung SDK does check for In-App Purchase app, however we wasn't able to use it in OpenIAB since it wasn't intended to be distributed as jar. Thus, all Samsung billing workflow was implemented from scratch. Behaviour you mentioned is not implemented due to some technical difficulties (we first need to connect to IAPConnector service and it's located within In-App Purchase app).

This problem however should be fixed here, new release with Samsung support (although with some limitations, Samsung billing is just awful) is scheduled pretty soon.

akarimova commented 9 years ago

any updates?