projtec:readme.md
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
projtec:readme.md [2017/03/23 15:21] – orel | projtec:readme.md [2024/03/18 15:06] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 47: | Line 47: | ||
Don't forget to accept ALL Licences when the install process starts! | Don't forget to accept ALL Licences when the install process starts! | ||
- | **At CREMI, launch for the first time the following script to move $HOME/ | + | **At CREMI** |
+ | |||
+ | Get archive *android-sdl2-demo.zip* on Moodle and decompress it... | ||
+ | |||
+ | Then, launch | ||
./ | ./ | ||
Line 106: | Line 110: | ||
~~~ | ~~~ | ||
- | * AndroidManifest.xml: | + | * AndroidManifest.xml: |
application (label, icon, orientation, | application (label, icon, orientation, | ||
- | * build.xml: The main build file for our Android application (used by | + | * build.xml: The main build file for your Android application (used by |
Ant compiler). It defines the target Android version (SDK API level | Ant compiler). It defines the target Android version (SDK API level | ||
23) and the package name. | 23) and the package name. | ||
- | * SDLActivity.java: | + | * SDLActivity.java: |
application. In other words, it is the Java entry point of your | application. In other words, it is the Java entry point of your | ||
Android application. This file is provided by SDL2. Don't modify it, | Android application. This file is provided by SDL2. Don't modify it, | ||
Line 123: | Line 127: | ||
* Application.mk: | * Application.mk: | ||
level 23) we target and the platform (x86 & arm) we target. | level 23) we target and the platform (x86 & arm) we target. | ||
- | * Android.mk: This is the Makefile for the native part of our Android | + | * Android.mk: This is the Makefile for the native part of your Android |
application (used by ndk-build compiler). | application (used by ndk-build compiler). | ||
* the SDL2 libraries in jni/SDL*/ subdirectories; | * the SDL2 libraries in jni/SDL*/ subdirectories; | ||
- | * our SDL2 demo code in jni/src/* with the main SDL2 loop (called by | + | * your SDL2 demo code in jni/src/* with the main SDL2 loop (called by |
SDLActivity.java) | SDLActivity.java) | ||
Line 151: | Line 155: | ||
------------- | ------------- | ||
- | Our Android project requires to download the SDL2 library (and its | + | Your Android project requires to download the SDL2 library (and its |
extensions) in the ' | extensions) in the ' | ||
library is not available on standard Android system. Besides, it must | library is not available on standard Android system. Besides, it must | ||
Line 188: | Line 192: | ||
src/) and it finally generates an Android package | src/) and it finally generates an Android package | ||
(sdl2-demo-debug.apk) in the bin/ directory. | (sdl2-demo-debug.apk) in the bin/ directory. | ||
- | contain all the stuffs needed for our app (native libraries, assets, | + | contain all the stuffs needed for your app (native libraries, assets, |
java bytecode, ..) to run on the target plaftorms. | java bytecode, ..) to run on the target plaftorms. | ||
Line 194: | Line 198: | ||
---------- | ---------- | ||
- | You can deploy and run your application on both a real phone (off-topic) | + | You can deploy and run your application on both a real phone or an emulator. |
+ | |||
+ | ### Deployment on Emulator | ||
To create your own emulator or AVD (Android Virtual Device), launch | To create your own emulator or AVD (Android Virtual Device), launch | ||
Line 204: | Line 210: | ||
'Nexus 5' device with Android 6.0 (API level 23) and CPU/ABI 'Intel | 'Nexus 5' device with Android 6.0 (API level 23) and CPU/ABI 'Intel | ||
Atom (x86)' without Skin. Set RAM to 1024MB and Heap to 256MB. Use | Atom (x86)' without Skin. Set RAM to 1024MB and Heap to 256MB. Use | ||
- | Host GPU (unless OpenGL ES could fail). See the configuration snapshot of our AVD below. | + | Host GPU (unless OpenGL ES could fail). See the configuration snapshot of your AVD below. |
- |  | ||
+ | |||
+ | First to activate the developer mode. For that, click 5 times on the [build number](https:// | ||
+ | |||
+ | Now, on your phone, allow "debug via USB" | ||
+ | |||
+ | Now connect your phone with a USB cable. | ||
+ | |||
+ | Now, on your phone, allow this particular computer to debug via the USB cable | ||
+ | |||
+ | Finally, on the computer run the deployment command: | ||
+ | |||
+ | ant debug install | ||
+ | | ||
Android Log & Debug | Android Log & Debug | ||
------------------- | ------------------- | ||
- | * Print log written by SDL_Log() routine in your app: | + | Print log written by SDL_Log() routine in your app: |
adb logcat -s ' | adb logcat -s ' | ||
- | * Check Android properties: | + | Check Android properties: |
adb shell getprop | adb shell getprop | ||
- | * GDB Debug (off-topic) | + | GDB Debug (off-topic) |
- | -- | + | --- |
aurelien.esnard@u-bordeaux.fr | aurelien.esnard@u-bordeaux.fr | ||
projtec/readme.md.1490282489.txt.gz · Last modified: 2024/03/18 15:05 (external edit)