/ / Lost purchaseToken pre fakturáciu v aplikácii Api - android, nákup v aplikácii

Ztracená nákupToken pre fakturáciu v aplikácii Api - android, nákup v aplikácii

Integrácia aplikácie Android Apid fakturácie bola integrovaná. ale stratil som nákupToken, pretože tam bola výnimka niekde hádzať. Teraz v aplikácii API 3 ju nemôžem kúpiť bez spotreby kúpeného produktu.Nemôžem ju konzumovať teraz, pretože nemám nákupToken Ako ju získať? Alebo môžem nejako obnoviť nákup?

odpovede:

0 pre odpoveď č. 1

Dalo by sa to získať dotazovaním nákupov.

Tu je príklad od spoločnosti Google: http://developer.android.com/google/play/billing/billing_integrate.html#billing-download

IabHelper.QueryInventoryFinishedListener mGotInventoryListener = new IabHelper.QueryInventoryFinishedListener() {
public void onQueryInventoryFinished(IabResult result, Inventory inventory) {
Log.d(TAG, "Query inventory finished.");

// Have we been disposed of in the meantime? If so, quit.
if (mHelper == null) return;

// Is it a failure?
if (result.isFailure()) {
complain("Failed to query inventory: " + result);
return;
}

Log.d(TAG, "Query inventory was successful.");

/*
* Check for items we own. Notice that for each purchase, we check
* the developer payload to see if it"s correct! See
* verifyDeveloperPayload().
*/

// Do we have the premium upgrade?
Purchase premiumPurchase = inventory.getPurchase(SKU_PREMIUM);
....

//<- here you can consume your purchase

}