Problem setting up in app billing labresult billing service unavailable on device как исправить

I’m trying to use In-App billing:

mIabHelper = new IabHelper(this, BILLING_KEY);
        mIabHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
            @Override
            public void onIabSetupFinished(IabResult result) {
                if (!result.isSuccess()) {
                    Log.d(TAG, "Problem setting up In-app Billing: " + result);
                }
            }
        });

And getting the error:

Problem setting up In-app Billing: IabResult: Billing service unavailable on device. (response: 3:Billing Unavailable)

Why? Tried to clear cache of the Play Store, didn’t work for me.

asked Apr 8, 2013 at 21:38

artem's user avatar

1

Well we can’t help you without having much information.So instead I’ll try to do a checklist for you in case you missed something:

  1. Are you testing on an emulator?Billing services should be tested on devices,BUT if you
    really have to test on the emulator,make sure the emulator has google play installed and set up.This is very important!

  2. Did you set the correct permission in the manifest? (com.android.vending.BILLING)

  3. If you are still testing the app,did you get a test app licence from the playstore, imported the level in your SDK ,set up your licence verification library? (you can follow along here: setting up

  4. On your activity onActivityResult did you correctly handle the activity result?As seen on the example from google you should do it this way:


@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
  Log.i(TAG, "onActivityResult(" + requestCode + "," + resultCode + "," + data);

  // Pass on the activity result to the helper for handling
  if (!inappBillingHelper.handleActivityResult(requestCode, resultCode, data)) {
    super.onActivityResult(requestCode, resultCode, data);
  }
  else {
    Log.i(TAG, "onActivityResult handled by IABUtil.");
  }
}

Also having more information could be useful, like if you are testing on the emulator or device, the device name, the android version etc…

Bruno Bieri's user avatar

Bruno Bieri

9,60411 gold badges63 silver badges90 bronze badges

answered Apr 11, 2013 at 11:22

sokie's user avatar

sokiesokie

1,93622 silver badges37 bronze badges

1

This error indicates that you’re connecting to the in-app billing service on your device, but that the service doesn’t support IAB version 3. It may be that your device’s version of Google Play only supports version 2 of IAB. What version of Google Play is running on your device?

Is your version of Google Play otherwise functional (e.g., can you open the Google Play store)? Sometimes, if the date on your device is off, or there is some other problem, Google Play itself can go South.

Finally, what’s in your logcat output? It would be easier to provide assistance if you provided more detail.

answered Apr 12, 2013 at 11:42

Carl's user avatar

CarlCarl

15.4k5 gold badges55 silver badges53 bronze badges

2

I got that error when I installed the App BEFORE I registered everything and set Google Play store up. Once I set the Google Play Store account up, the error went away.

answered Jul 21, 2013 at 13:10

Gene's user avatar

GeneGene

10.8k1 gold badge66 silver badges58 bronze badges

Wipe helped me. Strange error.

answered Apr 12, 2013 at 14:44

artem's user avatar

artemartem

16.2k34 gold badges112 silver badges188 bronze badges

4

The documentation for version 2.0 of the billing was actually more helpful than 3.0 for this one even though I’m using version 3.0 of the billing.

Here’s how 2.0 describes it Response Code 3:

Indicates that In-app Billing is not available because the API_VERSION
that you specified is not recognized by the Google Play application or
the user is ineligible for in-app billing
(for example, the user
resides in a country that prohibits in-app purchases).

For me I had to setup a test Google account on my phone first before testing. I forgot that step. Once I did that fixed it for me…

Look for Server Response Codes here:

http://developer.android.com/google/play/billing/v2/billing_reference.html

http://developer.android.com/google/play/billing/billing_reference.html

answered Jan 20, 2014 at 18:21

Nathan Prather's user avatar

Nathan PratherNathan Prather

2,0781 gold badge18 silver badges15 bronze badges

2

I found a problem to fix, try root with ur LuckyPatcher, open config Toggles -> Disable billing.

enter image description here

answered Jun 28, 2015 at 1:01

KingRider's user avatar

KingRiderKingRider

2,12025 silver badges23 bronze badges

Had the same problem.

My device was rooted and ROM’ed with an older version of Google Market which did not self-update.
You can verify your the Market/Play version by looking at it in the AppManager.

I actually decided to use another device, but I guess otherwise I would have to find a way to upgrade the Market/Play version.

answered Jul 2, 2013 at 10:07

Doigen's user avatar

DoigenDoigen

1892 silver badges6 bronze badges

I got this error from wiping the Google Play cache. You have to reopen the Google Play app and accept the terms before it is functional for IAB again.

answered Jul 9, 2014 at 15:02

Lee's user avatar

LeeLee

1,0282 gold badges11 silver badges18 bronze badges

This is because the account which is currently logged in the device is not registered in Google Developer Console.
TO resolve this problem,
1. Go to your Google Developer Consol
2. In Account Detail Tab, enter the email address(which is in device) in «Gmail accounts with testing access» and press the save button on the top.

Thats it.

answered Feb 22, 2014 at 14:16

Yasir Ali's user avatar

Yasir AliYasir Ali

1,7851 gold badge16 silver badges21 bronze badges

In my case I’ve set a different value for serviceIntent.setPackage(«com.android.vending»); from IabHelper. Make sure you leave it with this value

answered Jul 29, 2015 at 17:21

Alex's user avatar

AlexAlex

1911 silver badge10 bronze badges

I had that same error and then noticed my phone was in Airplane Mode! Once connectivity was restored, I was good to go.

answered Feb 7, 2016 at 1:02

Papasmile's user avatar

PapasmilePapasmile

6241 gold badge4 silver badges22 bronze badges

IabHelper.java

Intent serviceIntent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
serviceIntent.setPackage("com.android.vending");

It is an error if it is not possible to specify correctly the action and packageName to IInAppBillingService.aidl.

answered Feb 8, 2016 at 10:59

Hashido Tomoya's user avatar

Have come up with the solution.

Try the below 3 steps:

  1. Clear the cache of GooglePlay app and Google Play services app.
  2. Remove IInAppBillingService.aidl file.
  3. Copy the above file again from sdk folder and paste it to the aidl folder in my app.

This problem usually occurs when we copy the aidl file from one project to another project.

answered May 22, 2016 at 14:10

Ankur Yadav's user avatar

Solution 1

Wipe helped me. Strange error.

Solution 2

Well we can’t help you without having much information.So instead I’ll try to do a checklist for you in case you missed something:

  1. Are you testing on an emulator?Billing services should be tested on devices,BUT if you
    really have to test on the emulator,make sure the emulator has google play installed and set up.This is very important!

  2. Did you set the correct permission in the manifest? (com.android.vending.BILLING)

  3. If you are still testing the app,did you get a test app licence from the playstore, imported the level in your SDK ,set up your licence verification library? (you can follow along here: setting up

  4. On your activity onActivityResult did you correctly handle the activity result?As seen on the example from google you should do it this way:


@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
  Log.i(TAG, "onActivityResult(" + requestCode + "," + resultCode + "," + data);

  // Pass on the activity result to the helper for handling
  if (!inappBillingHelper.handleActivityResult(requestCode, resultCode, data)) {
    super.onActivityResult(requestCode, resultCode, data);
  }
  else {
    Log.i(TAG, "onActivityResult handled by IABUtil.");
  }
}

Also having more information could be useful, like if you are testing on the emulator or device, the device name, the android version etc…

Solution 3

This error indicates that you’re connecting to the in-app billing service on your device, but that the service doesn’t support IAB version 3. It may be that your device’s version of Google Play only supports version 2 of IAB. What version of Google Play is running on your device?

Is your version of Google Play otherwise functional (e.g., can you open the Google Play store)? Sometimes, if the date on your device is off, or there is some other problem, Google Play itself can go South.

Finally, what’s in your logcat output? It would be easier to provide assistance if you provided more detail.

Solution 4

I got that error when I installed the App BEFORE I registered everything and set Google Play store up. Once I set the Google Play Store account up, the error went away.

Solution 5

The documentation for version 2.0 of the billing was actually more helpful than 3.0 for this one even though I’m using version 3.0 of the billing.

Here’s how 2.0 describes it Response Code 3:

Indicates that In-app Billing is not available because the API_VERSION
that you specified is not recognized by the Google Play application or
the user is ineligible for in-app billing
(for example, the user
resides in a country that prohibits in-app purchases).

For me I had to setup a test Google account on my phone first before testing. I forgot that step. Once I did that fixed it for me…

Look for Server Response Codes here:

http://developer.android.com/google/play/billing/v2/billing_reference.html

http://developer.android.com/google/play/billing/billing_reference.html

Comments

  • I’m trying to use In-App billing:

    mIabHelper = new IabHelper(this, BILLING_KEY);
            mIabHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
                @Override
                public void onIabSetupFinished(IabResult result) {
                    if (!result.isSuccess()) {
                        Log.d(TAG, "Problem setting up In-app Billing: " + result);
                    }
                }
            });
    

    And getting the error:

    Problem setting up In-app Billing: IabResult: Billing service unavailable on device. (response: 3:Billing Unavailable)
    

    Why? Tried to clear cache of the Play Store, didn’t work for me.

Recents

Related

Ну, мы не можем вам помочь, не имея большой информации. Поэтому вместо этого я попытаюсь сделать контрольный список, если вы что-то упустили:

1) Вы тестируете на эмуляторе? Биллинговые службы должны тестироваться на устройствах, НО если вы
действительно нужно протестировать эмулятор, убедитесь, что в эмуляторе установлена ​​и настроена игра Google. Это очень важно!

2) Вы установили правильное разрешение в манифесте? (Com.android.vending.BILLING)

3) Если вы все еще тестируете приложение, получили ли вы лицензию тестового приложения из игрового магазина, импортировали lvl в свой sdk, настроили свою библиотеку проверки лицензий? (вы можете следовать здесь: настройка

4) В вашей активности onActivityResult вы правильно обработали результат деятельности? Как видно из примера из google, вы должны сделать это следующим образом:

@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.i(TAG, "onActivityResult(" + requestCode + "," + resultCode + "," + data);

// Pass on the activity result to the helper for handling
if (!inappBillingHelper.handleActivityResult(requestCode, resultCode, data)) {
    super.onActivityResult(requestCode, resultCode, data);
}
else {
    Log.i(TAG, "onActivityResult handled by IABUtil.");
}
}

Также может быть полезно больше информации, например, если вы тестируете эмулятор или устройство, имя устройства, версию Android и т.д.

I’ve been struggling with this problem for days now. I know there are a lot of questions with the same problem on SO but i couldn’t get it to work.

What I have done

  • Uploaded APK in beta phase
  • Created Merchant account
  • Added test user

Code

Tested on

  • Huawei P8 (Google Play Version 6.2.14)
  • In Switzerland, so a supported country for In-App Billing

What I’ve tried

  • Deleted cache and data from Google Play
  • Tutorial from Google Developer site
  • Went trough the checklist from user sokie: answer of sokie

The only thing I haven’t done from this list is the setup of the License Verification Library (LVL). But I couldn’t find any information that this step is required for an In-App Purchase. If not needed I want to do it without this library because I don’t really need it as stated on the Google Site.

The Google Play Licensing service is primarily intended for paid applications that wish to verify that the current user did in fact pay for the application on Google Play.

December 2018

47.1k раз

Я пытаюсь использовать In-App биллинг:

И получаю ошибку:

Зачем? Пытались очистить кэш Play Store, не работает для меня.

14 ответы

Документация для версии 2.0 биллинг был на самом деле более полезным, чем 3.0 для этого, даже если я использую версию 3.0 биллинг.

Вот как описывает это 2,0 ответный код 3:

Указывает , что в приложении биллинг не доступны , потому что API_VERSION, указанный не распознается Google Play приложение или пользователь не имеет права на в приложении счетов (например, пользователь находится в стране , которая запрещает в приложение покупки) ,

Для меня было установить пробную учетную запись Google на свой телефон перед началом тестирования. Я забыл этот шаг. После того, как я сделал это установил ее для меня .

Ищем коды ответов сервера здесь:

Эта ошибка указывает на то, что вы подключаетесь к услуге биллинга в приложение на устройстве, но служба не поддерживает IAB версии 3. Возможно, что версия вашего устройства в Google Play поддерживает только версию 2 IAB. Какую версию Google Play работает на устройстве?

Является ли ваша версия Google Play в противном случае функционал (например, вы можете открыть Play магазин Google)? Иногда, если дата на устройстве выключена, или есть другие проблемы, Google Play себя может пойти на юг.

И, наконец, что в вашем выходе LogCat? Было бы легче оказывать помощь, если вы предоставили более подробно.

У меня был именно эта ошибка, когда я удалил все учетные записи Google с телефона (таким образом стереть исправления, потому что после того, как протирать вы, вероятно, создать учетную запись после того, как телефон перезагружается).

После того, как я добавил учетную запись, я не видел эту ошибку.

Ну мы не можем помочь вам, не имея много information.So вместо я постараюсь сделать контрольный список для вас упаковывают вы пропустили что-то:

1) Вы тестирование на эмуляторе? Платежные услуги должны быть проверены на устройствах, но если вы действительно должны проверить на эмуляторе, убедитесь, что был установлена ​​Google Play эмулятора и установить up.This очень важно!

2) Вы установили правильное разрешение в манифесте? (Com.android.vending.BILLING)

3) Если вы все еще тестируете приложение, вы получите пробную лицензию приложения от playstore, импортировали лвл в вашем SDK, настроить библиотеку проверки лицензии? (вы можете следовать здесь: настройка

? 4) На вашей деятельности onActivityResult сделали вы правильно обрабатывать результат деятельности Как видно на примере с Google вы должны сделать это таким образом:

Кроме того, с более подробной информацией может быть полезна, например, при тестировании на эмуляторе или устройстве, имя устройства, Android версии и т.д ..

Это происходит потому, что учетная запись, которая в настоящее время регистрируется в устройстве не зарегистрирована в консоли Google Developer. Чтобы решить эту проблему, 1. зайдите в Google Developer Consol 2. В детализированной вкладке, введите адрес электронной почту (который находится в устройстве) в «Gmail счетов с доступом тестирования» и нажмите кнопку Сохранить на вершине.

В моем случае я установить другое значение для serviceIntent.setPackage ( «com.android.vending»); от IabHelper. Убедитесь, что вы оставить его с этим значением

Зашли с раствором.

Попробуйте следующие 3 шага:

  1. Очистить кэш GooglePlay приложения и Google Play приложение услуг.
  2. Удалить IInAppBillingService.aidl файл.
  3. Скопируйте вышеуказанный файл снова из папки SDK и вставить его в папку aidl в моем приложении.

Эта проблема обычно возникает, когда мы копируем файл aidl из одного проекта в другой проект.

Я имел ту же самую ошибку, а затем заметил мой телефон был в режиме полета! После подключения была восстановлена, я был хорошо идти.

Я нашел проблему исправить, попробуйте корень ур LuckyPatcher, открытые конфигурации Переключает -> Отключить биллинг.

Я получил эту ошибку от протирания кэша Play Google. Вы должны вновь открыть Play приложение Google и принять условия, прежде чем она функциональна для IAB снова.

IabHelper.java

Это ошибка , если это не представляется возможным правильно определить действие и PACKAGENAME к IInAppBillingService.aidl .

Если бы та же самая проблема.

Мое устройство коренится и ROM’ed с более старой версией Google Market, который не самостоятельное обновление. Вы можете проверить вашу версию Market / Play, глядя на него в AppManager.

Я на самом деле решил использовать другое устройство, но я предполагаю, что в противном случае я бы найти способ, чтобы обновить версию Market / Play.

Протрите помог мне. Странная ошибка.

Я получил эту ошибку, когда я установил приложение ДО Я зарегистрировал все и установить Google Play магазин вверх. После того, как я установил Google Play счет магазина вверх, ошибка ушла.

1745 просмотра

1 ответ

1343 Репутация автора

Я пытаюсь реализовать IAB в моем приложении. Каждый раз при запуске приложения происходит сбой с:

Problem setting up In-app Billing: IabResult: Billing service unavailable on device. (response: 3:Billing Unavailable)

Я попробовал буквально все:

  • У меня есть com.android.vending.BILLING разрешение в манифесте.
  • Загрузка APK на бета-канал с соответствующими версиями.
  • Использование тестовых аккаунтов.
  • Очистка кеша Google Play.
  • Убедитесь, что у меня есть последние сервисы Google Play build.gradle .
  • Двойная проверка открытого закодированного ключа.
  • Использование нескольких устройств.

Но несмотря ни на что, ошибка все еще сохраняется. Я прочитал все вопросы и ответы об этом, но я не могу понять, что мне не хватает!

Вот мой соответствующий код:

Вот вывод консоли:

Обратите внимание, что у меня есть код, запрашивающий инвентарь в другом месте, но тот факт, что он не выходит за рамки, mHelper.startUpSetup() делает его неактуальным.

Ответы (1)

4 плюса

1004 Репутация автора

Попробуй это ! Просто зайдите в IabHelper класс, в startSetup методе под onServiceConnected обратного вызова. Вы можете увидеть намерение, просто замените приведенный ниже код. (или просто найдите для BILLING_RESPONSE_RESULT_BILLING_UNAVAILABLE ).

Solution 1:[1]

There are numerous cases that could lead to this problem so you need to describe what you have done so far. Some checkpoints:
— are the permissions correct in your manifest
— do you handle the response of the play services library in your onActivityResult
— are you still testing so have you entered the accounts in the testing section of your developer account

In general this indicates that either the API version on the device does not match (unlikely if you use different devices) or that the user is not allowed to use it:

Indicates that In-app Billing is not available because the API_VERSION
that you specified is not recognized by the Google Play application or
the user is ineligible for in-app billing (for example, the user
resides in a country that prohibits in-app purchases).

BTW: testing will not work with your own developer account but you need to register test accounts.

Понравилась статья? Поделить с друзьями:

Не пропустите также:

  • Как в экселе составить рейтинг
  • Как найти квартиру без посредников мариуполь
  • Как найти чтоб читать бесплатные книги
  • Созвездие жирафа как его найти
  • Как найти название сериала по эпизоду

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии