draconisPW / PWMAngband

A free, multi-player roguelike dungeon exploration game based on Angband
35 stars 12 forks source link

Update Android SDL2 client #536

Closed s88100 closed 2 years ago

s88100 commented 2 years ago

first run will be a black screen - unpacking files lib.zip (requires process display) PWMAngClient.java checks 'pwmangclient' folder and 'lib' folder then copies files from lib.zip and 'pwmangclient.ini' setEnvVars() "HOME", "ANDROID_APP_PATH" getenv("ANDROID_APP_PATH")

does not work android:screenOrientation="landscape" .works as "sensor" setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);

not showing Toast.makeText(getApplicationContext(), "Copy assets files 'pwmangclient/lib'", Toast.LENGTH_LONG).show(); when 'lib.zip' is unpack if you delete the 'pwmangclient.ini' file and the message will appear.

file 'pwmangclient.ini' is not created (solution. copy from assets)

Android Studio -> 'Make Project' will build 'pwmangclient-debug.apk' all 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64' but if 'Run' emulator, then '.apk' will be built and there will be only the architecture 'x86'. use otg smart connection kit or bluetooth keyboard ;-)

android links: https://riptutorial.com/android/example/17144/android--internal-and-external-storage---terminology-clarification https://stackoverflow.com/questions/19568354/apps-path-for-external-storage-in-native-code https://stackoverflow.com/questions/49053115/how-to-get-external-storages-path https://stackoverflow.com/questions/4447477/how-to-copy-files-from-assets-folder-to-sdcard https://stackoverflow.com/questions/5280176/make-directory-in-android https://blog.spacepatroldelta.com/a?ID=00300-9e6948b0-b96a-4e69-9246-3a7a549789d9 https://codepad.co/snippet/copying-file-from-assets-directory-to-sdcard-in-android android01 android02 android03 android04