This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
plugins:building_an_apk [2017/05/08 19:59] 105.227.223.190 [File paths] |
plugins:building_an_apk [2018/12/30 13:28] (current) |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Usage ===== | ===== Usage ===== | ||
Once the ApkBuilder plugin is downloaded, you can create APK files by long pressing on your app icon in DroidScript and selecting the 'Build APK' option. | Once the ApkBuilder plugin is downloaded, you can create APK files by long pressing on your app icon in DroidScript and selecting the 'Build APK' option. | ||
- | '' | + | ===== File paths ===== |
- | It is important to use relative file paths FIXME==== **Headline** ==== | + | It is important to use relative file paths in your JavaScript source code to load images, sounds and external scripts etc, because these files are copied into the APK file as internal assets during the build process. Remember the **"/ |
- | in your JavaScript source code to load images, sounds and external scripts etc, because these files are copied into the APK file as internal assets during the build process. Remember the **"/ | + | |
So you should do this: | So you should do this: | ||
< | < | ||
not this: | not this: | ||
- | < | + | < |
===== Extracting assets ===== | ===== Extracting assets ===== | ||
If your app is running a web server or streaming video from assets, then you will need to extract these assets from your APK to the internal sdcard when your app is first run. These assets can then be served/ | If your app is running a web server or streaming video from assets, then you will need to extract these assets from your APK to the internal sdcard when your app is first run. These assets can then be served/ | ||
Line 51: | Line 50: | ||
" | " | ||
{ | { | ||
- | " | + | " |
" | " | ||
} | } |