Brought stores to a common view
Amazon iap_lib update
This commit is contained in:
parent
1fe29ad24a
commit
beb89d507f
BIN
extension-iap/lib/android/in-app-purchasing-2.0.76.jar
Normal file
BIN
extension-iap/lib/android/in-app-purchasing-2.0.76.jar
Normal file
Binary file not shown.
@ -4,9 +4,9 @@
|
||||
<uses-sdk android:minSdkVersion="{{android.minimum_sdk_version}}" android:targetSdkVersion="{{android.target_sdk_version}}" />
|
||||
<application>
|
||||
<!-- For Amazon IAP -->
|
||||
<receiver android:name="com.amazon.device.iap.ResponseReceiver" >
|
||||
<receiver android:name = "com.amazon.device.iap.ResponseReceiver" android:permission = "com.amazon.inapp.purchasing.Permission.NOTIFY" >
|
||||
<intent-filter>
|
||||
<action android:name="com.amazon.inapp.purchasing.NOTIFY" android:permission="com.amazon.inapp.purchasing.Permission.NOTIFY" />
|
||||
<action android:name = "com.amazon.inapp.purchasing.NOTIFY" />
|
||||
</intent-filter>
|
||||
</receiver>
|
||||
</application>
|
||||
|
@ -11,6 +11,7 @@ import java.util.concurrent.BlockingQueue;
|
||||
|
||||
import org.json.JSONException;
|
||||
import org.json.JSONObject;
|
||||
import org.json.JSONArray;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
@ -173,9 +174,13 @@ public class IapAmazon implements PurchasingListener {
|
||||
if (productDataResponse.getRequestStatus() != ProductDataResponse.RequestStatus.SUCCESSFUL) {
|
||||
listener.onProductsResult(IapJNI.BILLING_RESPONSE_RESULT_ERROR, null, commadPtr);
|
||||
} else {
|
||||
for (final String s : productDataResponse.getUnavailableSkus()) {
|
||||
Log.v(TAG, "Unavailable SKU: " + s);
|
||||
}
|
||||
|
||||
Map<String, Product> products = productDataResponse.getProductData();
|
||||
try {
|
||||
JSONObject data = new JSONObject();
|
||||
JSONArray data = new JSONArray();
|
||||
for (Map.Entry<String, Product> entry : products.entrySet()) {
|
||||
String key = entry.getKey();
|
||||
Product product = entry.getValue();
|
||||
@ -189,7 +194,7 @@ public class IapAmazon implements PurchasingListener {
|
||||
// Based on return values from getPrice: https://developer.amazon.com/public/binaries/content/assets/javadoc/in-app-purchasing-api/com/amazon/inapp/purchasing/item.html
|
||||
item.put("price", priceString.replaceAll("[^0-9.,]", ""));
|
||||
}
|
||||
data.put(key, item);
|
||||
data.put(item);
|
||||
}
|
||||
listener.onProductsResult(IapJNI.BILLING_RESPONSE_RESULT_OK, data.toString(), commadPtr);
|
||||
} catch (JSONException e) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user