User Tools

Site Tools


plugins:building_an_apk

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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.
-''Von venture English to lugisu''===== File paths ===== +===== 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 **"/sdcard/DroidScript"** folder will probably not exist on someone else's mobile device.
-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 **"/sdcard/DroidScript"** folder will probably not exist on someone else's mobile device.+
  
 So you should do this:-   So you should do this:-  
 <code>img = app.CreateImage( "Img/myface.png" );</code> <code>img = app.CreateImage( "Img/myface.png" );</code>
 not this: not this:
-<code>img = app.CreateImage( "/sdard/DroidScript/MyApp/Img/myface.png" );</code>+<code>img = app.CreateImage( "/sdcard/DroidScript/MyApp/Img/myface.png" );</code>
 ===== 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/streamed from the there instead, because assets cannot be served or streamed from inside an APK. 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/streamed from the there instead, because assets cannot be served or streamed from inside an APK.
Line 51: Line 50:
  "manifest"  "manifest"
  
- "minSdkVersion" : 19,W+ "minSdkVersion" : 19,
  "targetSdkVersion" : 21,  "targetSdkVersion" : 21,
  }  }
plugins/building_an_apk.1494273594.txt.gz · Last modified: 2017/05/09 03:59 (external edit)