ソースを参照

fix crash by payments when run on android 5.1.1 device.
(http://stackoverflow.com/questions/24480069/google-in-app-billing-illegalargumentexception-service-intent-must-be-explicit)

volzhs 10 年 前
コミット
903e6b37c0

+ 3 - 1
platform/android/java/src/com/android/godot/payments/PaymentsManager.java

@@ -47,8 +47,10 @@ public class PaymentsManager {
 	}
 	}
 	
 	
 	public PaymentsManager initService(){
 	public PaymentsManager initService(){
+		Intent intent = new Intent("com.android.vending.billing.InAppBillingService.BIND");
+		intent.setPackage("com.android.vending");
 		activity.bindService(
 		activity.bindService(
-				new Intent("com.android.vending.billing.InAppBillingService.BIND"), 
+				intent, 
 				mServiceConn, 
 				mServiceConn, 
 				Context.BIND_AUTO_CREATE);
 				Context.BIND_AUTO_CREATE);
 		return this;
 		return this;