0
上週,我做了一系列測試內購買應用,一切進展順利。不過,我在結帳時取消了我的命令,因爲這樣,谷歌播放會不停地發送取消通知。應用內結算:確認退款通知
顯然googleplay不理解我的確認,並在連續循環中通知我。
在onPurchaseStateChanged,JSON解析後:
ArrayList<String> confirmations = new ArrayList<String>();
for (Trans p : transactions)
{
[...]
if (p.purchaseState.ordinal() == PurchaseState.CANCELLED.ordinal())
confirmations.add(p.notificationId);
}
if (!confirmations.isEmpty())
{
final String[] notifyIds = confirmations.toArray(new String[confirmations.size()]);
confirmNotifications(context, notifyIds);
}
。
public static void confirmNotifications(Context context, String[] notifyIds)
{
final Intent intent = createIntent(context, Action.CONFIRM_NOTIFICATIONS);
intent.putExtra(EXTRA_NOTIFY_IDS, notifyIds);
context.startService(intent);
}
我做錯了什麼?
是的,我沒有任何問題與同樣的方法購買確認 – 2012-04-25 07:19:23
好吧,似乎是由於我的工作俘虜網絡/代理。在家取消通知被確認沒有問題。另一方面,我不明白爲什麼確認購買確認但不取消確認(在工作中) – 2012-04-25 07:42:47