in-app billing android return authentication is required when try to subscribe to product(尝试订阅产品时需要应用内计费android返回身份验证)
问题描述
这是我第一次在 android 中处理 In-App Billing1) 我正在使用 API v32)我已经上传了我的应用程序的 alpha 版本以便能够测试
This is my first time to deal with In-App Billing in android 1) I am using API v3 2) I have upload alpha version of my app to be able to test then
3) 我创建了一个订阅产品
3) I have created a subscribe product
4) 这是我在产品中订阅的代码
4) This is my code to subscribe in the product
mSubscribeButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
try {
Bundle subscribeIntentBundle = mService.getBuyIntent(3, getPackageName(), "my_product_id", "subs", "bGoa+V7g/yqDXvKRqq+JTFn4uQZbPiQJo4pf9RzJ");
PendingIntent pendingIntent = subscribeIntentBundle.getParcelable("BUY_INTENT");
if (subscribeIntentBundle.getInt("RESPONSE_CODE") == 0) {
startIntentSenderForResult(pendingIntent.getIntentSender(), 4002, new Intent(), Integer.valueOf(0), Integer.valueOf(0), Integer.valueOf(0));
} else {
Toast.makeText(MainActivity.this, "Error Code: " + subscribeIntentBundle.getInt("RESPONSE_CODE"), Toast.LENGTH_SHORT).show();
}
} catch (RemoteException e) {
e.printStackTrace();
} catch (SendIntentException e) {
e.printStackTrace();
}
}
});
5) 我收到以下错误
我尝试使用不同的设备,都出现同样的错误,我也用我的 Google 帐户登录,可以打开 Google Play 商店并查看我的应用程序
I have tried to use different devices and all have the same error, I am also logged in with my Google account and can open Google Play Store and view my apps
我也尝试从应用管理器中清除 Google Play 商店的数据
I have tried also to clear data of Google Play Store from app manager
有人可以帮忙吗??
推荐答案
我之前也有同样的问题.转到您的 google 开发者控制台并确保您的应用已发布到任何版本(alpha、beta 或 prod).然后,应用内购买将起作用:)
I have the same issue previously. Go to your google developer console and make sure your app is PUBLISHED to any version(alpha, beta or prod). Then, the In app purchase will work :)
这篇关于尝试订阅产品时需要应用内计费android返回身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:尝试订阅产品时需要应用内计费android返回身份验证
- SetOnItemSelectedListener上的微调程序错误 2022-01-01
- Xcode 7.3 中带有 UILabel 的 UIStackView 2022-01-01
- 在 Iphone SDK 的导航栏上添加多个按钮 2022-01-01
- URL编码Swift iOS 2022-01-01
- 使用自动布局向 UIScrollView 添加动态大小的视图 2022-01-01
- 类似于 Mail.app 的 iPad 模态视图控制器? 2022-01-01
- GPS状态的广播接收器? 2022-01-01
- UITextView 内容插图 2022-01-01
- 网上有没有好的 UIScrollView 教程? 2022-01-01
- 如何在 iPhone 模拟器中重置 NSUserDefaults 数据? 2022-01-01
