解锁软件,我在应用程序的版本2的开发与应用,并发布在谷歌开发者现在有人下载的应用程序,并尝试购买。即使在此消息应用程序“解锁”之后,购买消息也会向他显示“您的卡片正在衰落”。现在,这是一个非常困难的情况,即在应用程序解锁时不支付款项。在我的应用程序或与Google的应用程序结算方式(逻辑)中,这是否存在问题。甚至付款后下降
如果它在我的应用程序,然后在那里它检查人卡是“谢绝牌”所以在这个方法我可以限制我的应用程序不会解锁应用程序的任何方法。
任何应用将受到赞赏。
我有这样的代码在我BillingReceviver:
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (Consts.ACTION_PURCHASE_STATE_CHANGED.equals(action)) {
String signedData = intent.getStringExtra(Consts.INAPP_SIGNED_DATA);
String signature = intent.getStringExtra(Consts.INAPP_SIGNATURE);
purchaseStateChanged(context, signedData, signature);
} else if (Consts.ACTION_NOTIFY.equals(action)) {
String notifyId = intent.getStringExtra(Consts.NOTIFICATION_ID);
if (Consts.DEBUG) {
Log.i(TAG, "notifyId: " + notifyId);
}
notify(context, notifyId);
} else if (Consts.ACTION_RESPONSE_CODE.equals(action)) {
long requestId = intent.getLongExtra(Consts.INAPP_REQUEST_ID, -1);
int responseCodeIndex = intent.getIntExtra(Consts.INAPP_RESPONSE_CODE,
ResponseCode.RESULT_ERROR.ordinal());
checkResponseCode(context, requestId, responseCodeIndex);
} else {
Log.w(TAG, "unexpected action: " + action);
}
}
使得ACTION_PURCHASE_STATE_CHANGED文件BillingService有我的purchsedstatechanged电话
private void purchaseStateChanged(int startId, String signedData, String signature) {
ArrayList<Security.VerifiedPurchase> purchases;
DatabaseHandler db=new DatabaseHandler(this);
purchases = Security.verifyPurchase(signedData, signature);
if (purchases == null) {
return;
}
ArrayList<String> notifyList = new ArrayList<String>();
for (VerifiedPurchase vp : purchases) {
if (vp.notificationId != null) {
notifyList.add(vp.notificationId);
}
ResponseHandler.purchaseResponse(this, vp.purchaseState, vp.productId,
vp.orderId, vp.purchaseTime, vp.developerPayload);
db.addUser("com.example.app", "111", "1222");
Log.i("Usgdgfer",""+db.isUserPresent("com.example.app"));
}
if (!notifyList.isEmpty()) {
String[] notifyIds = notifyList.toArray(new String[notifyList.size()]);
confirmNotifications(startId, notifyIds);
}
}
请,如果任何人知道这件事,然后提供一些信息 – User42590
你能在回答这个问题阐述。我还是不明白。 – RobCroll