DroidScript wiki

(was AndroidScript) unofficial documentation by the community

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
plugins:building_an_apk [2018/12/30 01:25]
114.125.41.56 [Extracting assets]
plugins:building_an_apk [2018/12/30 05:28] (current)
administrator old revision restored (2018/12/29 08:41)
Line 10: Line 10:
 not this:​- ​ not this:​- ​
 <​code>​img = app.CreateImage( "/​sdcard/​DroidScript/​MyApp/​Img/​myface.png"​ );</​code>​ <​code>​img = app.CreateImage( "/​sdcard/​DroidScript/​MyApp/​Img/​myface.png"​ );</​code>​
-<​manifest xmlns:​android="​http://​schemas.android.com/​apk/​res/​android"​ +===== Extracting assets ===== 
-    package="​eu.chainfire.libsuperuser"​ +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.
-    android:​versionCode="​1"​ +
-    ​android:​versionName="​1.0">+
  
-    <​uses-sdk android:​minSdkVersion="​4"​ android:​targetSdkVersion="​21"​ /> +Another reason you might want to extract assets to the device'​s internal sdcard, is when you need to modify them in some way or allow the user to modify them at run time. For example you might have a template settings file or database file that should be extracted when the app is first run. You can handle the extraction of assets using the **app.IsNewVersion()** and **app.ExtractAssets()** methods.
-</​manifest>​+
 ===== Using a build.json file ===== ===== Using a build.json file =====
 If you create a file called '​build.json'​ at the top level of your project, then you will be able to control certain aspects of the build process, such as the '​minSdkVersion'​ setting in the manifest, which sets the minimum version of Android that your app will run on. If you create a file called '​build.json'​ at the top level of your project, then you will be able to control certain aspects of the build process, such as the '​minSdkVersion'​ setting in the manifest, which sets the minimum version of Android that your app will run on.
plugins/building_an_apk.txt · Last modified: 2018/12/30 05:28 by administrator