diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-12-02 14:02:41 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-12-02 14:02:41 -0300 |
commit | e361e8539c889d3ca66e77ebb5d0ceb61d17f49d (patch) | |
tree | e34bb70d58e8d023df34c3e6744b5cdfa866ef7d /platform/android/java/src/com | |
parent | 9d5a2cb8470d538fa33f9f7b4d6cdd5390b3b70b (diff) |
-Ability to ask for documents/pictures/etc system dirs.
-Fixes to animationplayer
-fixes to collada importer
Diffstat (limited to 'platform/android/java/src/com')
-rw-r--r-- | platform/android/java/src/com/android/godot/GodotIO.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/platform/android/java/src/com/android/godot/GodotIO.java b/platform/android/java/src/com/android/godot/GodotIO.java index fad489721c..d149916893 100644 --- a/platform/android/java/src/com/android/godot/GodotIO.java +++ b/platform/android/java/src/com/android/godot/GodotIO.java @@ -557,6 +557,58 @@ public class GodotIO { } } + + public static final int SYSTEM_DIR_DESKTOP=0; + public static final int SYSTEM_DIR_DCIM=1; + public static final int SYSTEM_DIR_DOCUMENTS=2; + public static final int SYSTEM_DIR_DOWNLOADS=3; + public static final int SYSTEM_DIR_MOVIES=4; + public static final int SYSTEM_DIR_MUSIC=5; + public static final int SYSTEM_DIR_PICTURES=6; + public static final int SYSTEM_DIR_RINGTONES=7; + + + public String getSystemDir(int idx) { + + String what=""; + switch(idx) { + case SYSTEM_DIR_DESKTOP: { + //what=Environment.DIRECTORY_DOCUMENTS; + what=Environment.DIRECTORY_DOWNLOADS; + } break; + case SYSTEM_DIR_DCIM: { + what=Environment.DIRECTORY_DCIM; + + } break; + case SYSTEM_DIR_DOCUMENTS: { + what=Environment.DIRECTORY_DOWNLOADS; + //what=Environment.DIRECTORY_DOCUMENTS; + } break; + case SYSTEM_DIR_DOWNLOADS: { + what=Environment.DIRECTORY_DOWNLOADS; + + } break; + case SYSTEM_DIR_MOVIES: { + what=Environment.DIRECTORY_MOVIES; + + } break; + case SYSTEM_DIR_MUSIC: { + what=Environment.DIRECTORY_MUSIC; + } break; + case SYSTEM_DIR_PICTURES: { + what=Environment.DIRECTORY_PICTURES; + } break; + case SYSTEM_DIR_RINGTONES: { + what=Environment.DIRECTORY_RINGTONES; + + } break; + } + + if (what.equals("")) + return ""; + return Environment.getExternalStoragePublicDirectory(what).getAbsolutePath(); + } + protected static final String PREFS_FILE = "device_id.xml"; protected static final String PREFS_DEVICE_ID = "device_id"; |