• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

Main repository of MikuMikuStudio


Commit MetaInfo

Revision0a9630b033b75d6b5a3833aff786553511fbf0d6 (tree)
Time2013-05-19 12:58:15
Authoriwgeric@gmail.com <iwgeric@gmai...>
Commiteriwgeric@gmail.com

Log Message

SDK: Add SingleTask Launch Mode to AndroidManifest for new projects to avoid starting a new instance of the app when users hit the Home button and then resume the app.

git-svn-id: http://jmonkeyengine.googlecode.com/svn/trunk@10627 75d07b2b-3a1a-0410-a2c5-0572b91ccdca

Change Summary

Incremental Difference

--- a/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java
+++ b/sdk/jme3-android/src/com/jme3/gde/android/AndroidSdkTool.java
@@ -290,6 +290,28 @@ public class AndroidSdkTool {
290290 in.close();
291291 in = null;
292292 boolean changed = false;
293+ Element sdkApplication = XmlHelper.findChildElement(configuration.getDocumentElement(), "application");
294+ if (sdkApplication != null) {
295+ Element sdkActivity = XmlHelper.findChildElement(sdkApplication, "activity");
296+ if (sdkActivity != null) {
297+ if (!sdkActivity.hasAttribute("android:launchMode")) {
298+ sdkActivity.setAttribute("android:launchMode", "singleTask");
299+ changed = true;
300+ }
301+ }
302+ // add the following after AndroidHarness.screenOrientation is depreciated
303+ // for jME 3.1
304+// if (sdkActivity != null) {
305+// if (sdkActivity.hasAttribute("android:screenOrientation")) {
306+// String attrScreenOrientation = sdkActivity.getAttribute("android:screenOrientation");
307+// } else {
308+// Logger.getLogger(AndroidSdkTool.class.getName()).log(Level.INFO, "creating attrScreenOrientation");
309+// sdkActivity.setAttribute("android:screenOrientation", "landscape");
310+// changed = true;
311+// }
312+// }
313+ }
314+
293315 Element sdkElement = XmlHelper.findChildElement(configuration.getDocumentElement(), "uses-sdk");
294316 if (sdkElement == null) {
295317 sdkElement = configuration.createElement("uses-sdk");