Example usage for com.badlogic.gdx.pay Information getLocalDescription

List of usage examples for com.badlogic.gdx.pay Information getLocalDescription

Introduction

In this page you can find the example usage for com.badlogic.gdx.pay Information getLocalDescription.

Prototype

public String getLocalDescription() 

Source Link

Document

Returns the localized product description or null if not available (PurchaseManager-dependent).

Usage

From source file:com.badlogic.gdx.pay.android.googleplay.testdata.GetSkuDetailsResponseBundleObjectMother.java

private static JSONObject makeJsonObject(Offer offer, Information information) {
    JSONObject object = new JSONObject();

    try {/* w  w  w.  j  a  va  2 s.  co m*/
        object.put(GoogleBillingConstants.SKU_TITLE, information.getLocalName());
        object.put(GoogleBillingConstants.SKU_DESCRIPTION, information.getLocalDescription());
        object.put(GoogleBillingConstants.SKU_PRICE, information.getLocalPricing());
        object.put(GoogleBillingConstants.PRODUCT_ID, offer.getIdentifier());
        object.put(GoogleBillingConstants.PRICE_AMOUNT_MICROS, information.getPriceInCents() * 10_000);
        object.put(GoogleBillingConstants.PRICE_CURRENCY_CODE, information.getPriceCurrencyCode());
    } catch (JSONException e) {
        throw new IllegalStateException("Failed to create json object", e);
    }
    return object;
}