fixing android issues.

This commit is contained in:
Bryce Covert
2017-12-05 18:32:25 -08:00
parent 850a0a945d
commit a33c75e9ac
10 changed files with 66 additions and 33 deletions

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="advent.core"
package="tickstales.core"
android:versionCode="{{version-code}}"
android:versionName="{{version-name}}" >
@@ -15,7 +15,7 @@
android:hardwareAccelerated="true"
android:largeHeap="true"
android:label="Tick's Tales">
<activity android:name=".SplashActivity"
<activity android:name="advent.core.SplashActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden" >
@@ -24,7 +24,7 @@
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity android:name=".MainActivity"
<activity android:name="advent.core.MainActivity"
android:screenOrientation="landscape"
android:configChanges="orientation|keyboardHidden" >
<intent-filter>

View File

@@ -1,15 +1,15 @@
(def version (str "2.0." (clojure.string/trim-newline (slurp "../desktop/last-release")) "-snapshot"))
(defproject advent version
(defproject tickstales version
:description "FIXME: write description"
:manifest {"Implementation-Version" version}
:dependencies [[com.badlogicgames.gdx/gdx "1.9.3" :use-resources true]
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.9.3"]
[com.badlogicgames.gdx/gdx-box2d "1.9.3"]
[com.badlogicgames.gdx/gdx-tools "1.9.3"]
:dependencies [[com.badlogicgames.gdx/gdx "1.9.4" :use-resources true]
[com.badlogicgames.gdx/gdx-backend-lwjgl "1.9.4"]
[com.badlogicgames.gdx/gdx-box2d "1.9.4"]
[com.badlogicgames.gdx/gdx-tools "1.9.4"]
[com.badlogicgames.gdx/gdx-backend-android "1.9.3"]
[com.badlogicgames.gdx/gdx-backend-android "1.9.4"]
[neko/neko "4.0.0-alpha5"]
[com.android.billingclient/billing "dp-1" :extension "aar"]
@@ -29,9 +29,10 @@
:profiles {:dev {:dependencies [[android/tools.nrepl "0.2.0-bigstack"]
[compliment "0.1.3"]]
:jvm-opts ["-Dplatform=android"]
:android {:aot :all-with-unused
:rename-manifest-package "advent.core.debug"
:rename-manifest-package "tickstales.core.debug"
:manifest-options {:app-name "ticks tales (debug)"}
:aot-exclude-ns ["clojure.core.memoize" "core.async"]}}
:release {:android

View File

@@ -6,7 +6,10 @@ import java.util.ArrayList;
import java.util.List;
import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.badlogic.gdx.Game;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.assets.AssetManager;
import com.android.billingclient.api.*;
import com.android.billingclient.api.BillingClient.BillingResponse;
import com.android.billingclient.api.BillingClient.SkuType;
@@ -48,10 +51,17 @@ public class MainActivity extends AndroidApplication {
Game game = (Game) RT.var("advent.core", "advent").deref();
System.out.println("pre-init");
initialize(game);
System.out.println("before bill??");
((AssetManager) RT.var("advent.core", "am").deref()).clear();
AndroidApplicationConfiguration cfg = new AndroidApplicationConfiguration();
cfg.useWakelock = true;
initialize(game, cfg);
AssetManager am = (AssetManager) RT.var("advent.core", "am").deref();
System.out.println(am.getDiagnostics());
Texture.setAssetManager(am);
am.finishLoading();
mBillingClient = new BillingClient.Builder(this).setListener((PurchasesUpdatedListener) RT.var("advent.android", "listener").deref()).build();
System.out.println("billing??");
mBillingClient.startConnection(new BillingClientStateListener() {
@Override
public void onBillingSetupFinished(@BillingResponse int billingResponseCode) {

View File

@@ -9,7 +9,7 @@ import android.widget.ImageView;
import android.widget.TextView;
import neko.App;
import advent.core.R;
import tickstales.core.R;
public class SplashActivity extends Activity {