diff --git a/android/AndroidManifest.template.xml b/android/AndroidManifest.template.xml
index 8a1be98a..c9c79ae7 100644
--- a/android/AndroidManifest.template.xml
+++ b/android/AndroidManifest.template.xml
@@ -7,6 +7,8 @@
+
+
purchases) {
+ System.out.println("purchases");
+ }
+
+ public void onCreate (android.os.Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
try {
RT.var("clojure.core", "require").invoke(Symbol.intern("clojure.core.async"));
RT.var("clojure.core", "require").invoke(Symbol.intern("advent.core"));
@@ -20,6 +28,26 @@ public class MainActivity extends AndroidApplication {
Game game = (Game) RT.var("advent.core", "advent").deref();
initialize(game);
+ mBillingClient = new BillingClient.Builder(this).setListener(this).build();
+ System.out.println("billing??");
+ mBillingClient.startConnection(new BillingClientStateListener() {
+ @Override
+ public void onBillingSetupFinished(@BillingResponse int billingResponseCode) {
+ System.out.println("billing go");
+ if (billingResponseCode == BillingResponse.OK) {
+ System.out.println("billing ok");
+ // The billing client is ready. You can query purchases here.
+ }
+ }
+ @Override
+ public void onBillingServiceDisconnected() {
+
+ System.out.println("billing disconnect");
+ // Try to restart the connection on the next request to the
+ // In-app Billing service by calling the startConnection() method.
+ }
+ });
+
} catch (Exception e) {
e.printStackTrace();
}