[英]Google play In-app purchase not detecting the product I have created in developer console
I am new for in-app purchase in android, I have implemented using this tutorial 我是android中的应用内购买的新手 ,我已经使用本教程实现了
I have uploaded signed APK with License Key for the app to Alpha Testing, have created In-app products, Included product ID of the in-app product I have created in code. 我已将使用该应用程序的许可证密钥的签名APK上传到Alpha Testing,创建了应用程序内产品,包括我在代码中创建的应用程序内产品的包含产品ID。
Google play returns "The item you were attempting to purchase could not be found" Google Play返回“找不到您尝试购买的商品”
Following is the code I have used: 以下是我使用的代码:
public static final String TAG = "com.some.name";
IabHelper mHelper; IabHelper mHelper;
static final String ITEM_SKU = "com.inapp.ID";
@Override
protected void onStart() {
super.onStart();
String base64EncodedPublicKey = "License";
mHelper = new IabHelper(MainScreenActivity.this, base64EncodedPublicKey);
mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() {
public void onIabSetupFinished(IabResult result) {
if (!result.isSuccess()) {
Log.d(TAG, "In-app Billing setup failed: " + result);
} else {
Log.d(TAG, "In-app Billing is set up OK");
}
}
});
on buy click the following method is called: 在购买时单击以下方法称为:
public void buyClick(View view) {
Log.e("Buy Clicked", "----------------");
mHelper.launchPurchaseFlow(MainScreenActivity.this, ITEM_SKU, 10001,
mPurchaseFinishedListener, "mypurchasetoken");
}
}
Can someone help me with the steps to be followed for successful in-app purchase and what are all the reason for the ERROR message "The item you were attempting to purchase could not be found" 有人可以帮助我成功完成应用内购买应遵循的步骤,以及导致错误消息“找不到您尝试购买的商品”的所有原因是什么?
Thanks in advance! 提前致谢!
In-app Google play process(Rough-outline): 1. Create APK with License key provided(must) & with your in-app product ID correctly.
应用内Google播放过程(粗略概述): 1.使用提供的(必须)许可证密钥和正确的应用内商品ID创建APK。 2. Upload it to Alpha Testing (For testing).
2.将其上传到Alpha Testing(用于测试)。 3. Create in-app Purchase products.
3.创建应用内购买产品。 4. Fill all required fields, Upload required screenshots, App graphics wallpaper, etc., 5. Publish the app, It will take about 24 hours max to get published.
4.填写所有必填字段,上传所需的屏幕截图,App图形壁纸等,5.发布应用程序,发布最多需要24小时。 6. Test/Check purchase using the test accounts added.(In the testing APK, Purchase button Trigger with exact product ID you created in Google Play In-app product)
6.使用添加的测试帐户测试/检查购买。(在测试APK中,使用您在Google Play应用内商品中创建的确切商品ID触发购买按钮触发)
Problem I faced or mistake/shortcoming I did are, 1. I tested purchase before publishing the app ie when the app was in Draft.
我遇到的问题或我犯的错误/缺点是: 1.我在发布应用程序之前(即,应用程序处于草稿阶段)测试了购买。 So it resulted the item you are trying to purchase is not available.
因此,导致您尝试购买的商品不可用。 2. I have added non gmail accounts for testing, which resulted some odd error(Unable to connect to server).
2.我添加了非Gmail帐户进行测试,这导致了一些奇怪的错误(无法连接到服务器)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.