From 69294ee52c0b519848eb73e4db4335234a0b78a2 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Wed, 7 Sep 2011 23:46:27 +0000 Subject: [PATCH] SDK: - add package to MainActivity class git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8214 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/android/AndroidSdkTool.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java b/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java index 743663f6a..5e2f802a2 100644 --- a/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java +++ b/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java @@ -217,7 +217,7 @@ public class AndroidSdkTool { if (mainAct != null) { lock = mainAct.lock(); OutputStreamWriter out = new OutputStreamWriter(new BufferedOutputStream(mainAct.getOutputStream(lock))); - out.write(mainActivityString(mainJmeClass)); + out.write(mainActivityString(mainJmeClass, packag)); out.close(); lock.releaseLock(); } else { @@ -261,8 +261,9 @@ public class AndroidSdkTool { } } - private static String mainActivityString(String mainClass) { - String str = "import com.jme3.app.AndroidHarness;\n" + private static String mainActivityString(String mainClass, String packag) { + String str = "package "+packag+";\n" + + "import com.jme3.app.AndroidHarness;\n" + "import android.content.pm.ActivityInfo;" + "import com.jme3.system.android.AndroidConfigChooser.ConfigType;" + "public class MainActivity extends AndroidHarness{\n"