summaryrefslogtreecommitdiff
path: root/platform/android/java/src/com
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-04-14 22:43:44 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-04-14 22:43:44 -0300
commitec4ef2d2e794819548d731f93728266d31261d71 (patch)
tree6c2940a9029d07a22288c93684dac19cc39de7ed /platform/android/java/src/com
parent162d2ebe4f1a6da2da62ad45c4cbfb161157d31d (diff)
-Added google play services (needed for some stuff)
-Added new screen resizing options, stretch_2d is removed, new much more flexible ones. -Fixed bug in viewport (can create more instances in 3d-in-2d demo now) -Can set android permissions and screen sizes manually in the export settings -Changed export templates extension to .tpz (too many people unzipped the manually..) -File dialog now ensures that the proper extension is used (will not allow to save without it) -Fixed bug that made collision exceptions not work in 2D
Diffstat (limited to 'platform/android/java/src/com')
-rw-r--r--platform/android/java/src/com/android/godot/GodotPaymentV3.java10
-rw-r--r--platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java4
-rw-r--r--platform/android/java/src/com/android/godot/payments/PaymentsManager.java9
3 files changed, 13 insertions, 10 deletions
diff --git a/platform/android/java/src/com/android/godot/GodotPaymentV3.java b/platform/android/java/src/com/android/godot/GodotPaymentV3.java
index 9d2893cde6..23f5bf34d3 100644
--- a/platform/android/java/src/com/android/godot/GodotPaymentV3.java
+++ b/platform/android/java/src/com/android/godot/GodotPaymentV3.java
@@ -24,8 +24,12 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
}
});
};
+
+/* public string requestPurchasedTicket(){
+ activity.getPaymentsManager()
+ }
-
+*/
static public Godot.SingletonBase initialize(Activity p_activity) {
return new GodotPaymentV3(p_activity);
@@ -40,8 +44,8 @@ public class GodotPaymentV3 extends Godot.SingletonBase {
- public void callbackSuccess(){
- GodotLib.callobject(purchaseCallbackId, "purchase_success", new Object[]{});
+ public void callbackSuccess(String ticket){
+ GodotLib.callobject(purchaseCallbackId, "purchase_success", new Object[]{ticket});
}
public void callbackFail(){
diff --git a/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java b/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java
index 08fc405183..531a786dc9 100644
--- a/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java
+++ b/platform/android/java/src/com/android/godot/payments/HandlePurchaseTask.java
@@ -61,7 +61,7 @@ abstract public class HandlePurchaseTask {
pc.setConsumableFlag("block", productId, true);
pc.setConsumableValue("token", productId, purchaseToken);
- success(purchaseToken, productId);
+ success(purchaseData);
return;
} catch (JSONException e) {
error(e.getMessage());
@@ -71,7 +71,7 @@ abstract public class HandlePurchaseTask {
}
}
- abstract protected void success(String purchaseToken, String sku);
+ abstract protected void success(String ticket);
abstract protected void error(String message);
abstract protected void canceled();
diff --git a/platform/android/java/src/com/android/godot/payments/PaymentsManager.java b/platform/android/java/src/com/android/godot/payments/PaymentsManager.java
index 325e3a0751..983f655c35 100644
--- a/platform/android/java/src/com/android/godot/payments/PaymentsManager.java
+++ b/platform/android/java/src/com/android/godot/payments/PaymentsManager.java
@@ -84,8 +84,9 @@ public class PaymentsManager {
new HandlePurchaseTask(activity){
@Override
- protected void success(String purchaseToken, String sku) {
- validatePurchase(purchaseToken, sku);
+ protected void success(String ticket) {
+ godotPaymentV3.callbackSuccess(ticket);
+ //validatePurchase(purchaseToken, sku);
}
@Override
@@ -112,7 +113,7 @@ public class PaymentsManager {
@Override
protected void success() {
- godotPaymentV3.callbackSuccess();
+ godotPaymentV3.callbackSuccess("");
}
@@ -145,7 +146,5 @@ public class PaymentsManager {
this.godotPaymentV3 = godotPaymentV3;
}
-
-
}