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
475 stars 171 forks source link

Samsung certification #465

Closed Lakedaemon closed 9 years ago

Lakedaemon commented 9 years ago

What should I do to get my App that uses openIAB to get it certified for samsung Apps ?

When I try my app with "adb install -i com.sec.android.app.samsungapps my.apk" with SamsungApps.isSamsungTestMode = true, it seems to work : it finds the SamsungApps store and even asks to install SamsungBilling

Yet, if I remove "SamsungApps.isSamsungTestMode = true", it doesn't find the SamsungApp store

Am I supposed to submit an app with "SamsungApps.isSamsungTestMode = true" for certification and when it is certified, to update the app with an apk without that line ?

If I submit this app without that line for my app that is not certified yet, inApp billing won't work with the samsung Store, right ? (I previously got this app refused because inApp buys weren't working mostly because of a bug in my code, that is fixed now)

Lakedaemon commented 9 years ago

Ok, I just lost hours trying to figure out how to make openIAB able to work with SamsungApps and I just got it.

  1. SamsungApps.isSamsungTestMode = true puts the samsung InApp sdk in developer mode and allows you to fake inApp purchase and to test that your purchase flow is working as it should.
  2. You shouldn't commit/submit app to samsung with SamsungApps.isSamsungTestMode = true because purchases can't be processed to the end in this mode
  3. The openIAB documentation is lacking concerning SamsungApps. In your openIABHelper.options, you have to set

setSamsungCertificationRequestCode(some positive number*)

If you don't and if you have SamsungApps.isSamsungTestMode = false, the lib won't find the samsung store on your phone ...and will silently fail without telling why

The number* should probably be in the range 0..65535 to work with fragments

Could you please update the documentation ?

Lakedaemon commented 9 years ago

Argg, no I still doesn't work. I thought I managed to make it work but in my test, SamsungApps.isSamsungTestMode was still set to true...

still can't make it find the samsung store with SamsungApps.isSamsungTestMode =false...

Lakedaemon commented 9 years ago

I have been trying to get more info from the openIAB lib to understand what happens. So I set org.onepf.oms.util.Logger.setLoggable(true);

Yet, I'm not getting additionnal data though I tried with my debug build (without proguard) and the release build (with proguard)... I checked that the installer was set with com.sec.android.app.samsungapps Apparently setup fails

I only get these messages :
D/OpenIAB﹕ checkSamsung() activity = org.lakedaemon.android.activity.RxSearchActivity@426276b8 D/OpenIAB﹕ setupWithStrategy() package name = org.lakedaemon.japanese.dictionary 2 x D/IAPService﹕ getThirdPartyPackageName() org.lakedaemon.japanese.dictionary

and the result is billing is unavailable... error 3...

Lakedaemon commented 9 years ago

stupid me, my filters in android studio prevented me from seeing the logs, now I have setupWithStrategy() store search strategy = 2 D/OpenIAB﹕ setupWithStrategy() package name = org.lakedaemon.japanese.dictionary D/OpenIAB﹕ setupWithStrategy() package installer = com.sec.android.app.samsungapps D/OpenIAB﹕ packageInstalled() is true for com.sec.android.app.samsungapps D/OpenIAB﹕ handleActivityResult() requestCode: xxx resultCode: -1 data: null D/OpenIAB﹕ Init IAP connection status code: 0 D/OpenIAB﹕ getItemsInbox, startNum = 1, endNum = 100 D/OpenIAB﹕ finishSetup() === SETUP DONE === result: IabResult: 3, No suitable appstore was found (response: 3:Billing Unavailable) Appstore: null D/OpenIAB﹕ dispose() was called for com.samsung.apps