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

Google Play: No suitable appstore was found (response: 3:Billing Unavailable) #503

Open nanom1t opened 9 years ago

nanom1t commented 9 years ago

Hello.

I used native Google Play billing in my Android app and it worked fine. Now I decided to integrate openIAB 0.9.8.7 into my app. But it does not work on my phone (with native In-app it works fine and Google Play is setuped). I did not do anything extraordinary and I just followed for your tutorials.

I get error "No suitable appstore was found" during initialization. However Google Play woriks good on my phone and I can buy goods in other apps.

Gradle dependency: compile 'org.onepf:openiab:0.9.8.7'

Initializing: Map<String, String> iabStoresKeys = new HashMap<>(); iabStoresKeys.put(OpenIabHelper.NAME_GOOGLE, googlePlayPublicKey);

    SkuManager.getInstance()
        //Google Play
        .mapSku(ITEM_20COINS_SKU, OpenIabHelper.NAME_GOOGLE, "p20coins")
        .mapSku(ITEM_65COINS_SKU, OpenIabHelper.NAME_GOOGLE, "p65coins")
        .mapSku(ITEM_125COINS_SKU, OpenIabHelper.NAME_GOOGLE, "p125coins")
        .mapSku(ITEM_250COINS_SKU, OpenIabHelper.NAME_GOOGLE, "p250coins")
        .mapSku(ITEM_450COINS_SKU, OpenIabHelper.NAME_GOOGLE, "p450coins");

    OpenIabHelper.Options.Builder openIABBuilder = new OpenIabHelper.Options.Builder();
    //openIABBuilder.setCheckInventory(true);
openIABBuilder.setStoreSearchStrategy(OpenIabHelper.Options.SEARCH_STRATEGY_INSTALLER);
    openIABBuilder.setVerifyMode(OpenIabHelper.Options.VERIFY_ONLY_KNOWN);
    openIABBuilder.addStoreKeys(iabStoresKeys);

    iabHelper = new OpenIabHelper(context, openIABBuilder.build());
    if(iabHelper != null) {
        iabHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
            public void onIabSetupFinished(IabResult result) {
                if (!result.isSuccess()) {
                    isIabHelperSetuped = false;

                    Toast.makeText(context, "Problem setting up in-app billing: " + result, Toast.LENGTH_SHORT).show();
                    return;
                } else {
                    isIabHelperSetuped = true;
                }
            }
        });
    }
nanom1t commented 9 years ago

2_1076924_paymnterror 2

RomanZhilich commented 9 years ago

openIABBuilder.setStoreSearchStrategy(OpenIabHelper.Options.SEARCH_STRATEGY_INSTALLER)

Have you tried adb install -i as mentioned in https://github.com/onepf/OpenIAB/wiki/Google-Play#test ?

akarimova commented 9 years ago

any updates?

TobyKaos commented 9 years ago

Hi, I see in my analytics account many inapp statup error with code error 3. When I have test with aptoide all was fine. But some users seems experiment this issue: http://chaos-interactive.store.aptoide.com/app/market/com.chaosinteractive.jetpackhigh/71/11746330/Jetpack+High%3A+a+bird+story

TobyKaos commented 9 years ago

Yandex and aptoide store featured my game Jetpack High but I notice many many error startup 3 in my analytic logs.

When I try with on my devices all seems ok. Startup ok, purchase ok.

Is it countries limitation?

shashi278 commented 4 years ago

I'm facing the same problem as mentioned by @nanom1t . Any updates on how to fix this?

EDIT: Installing apk with -i option as suggested by @RomanZhilich solves the issue for few devices.