Menu Search Me

End to end Android App with Cordorva

c:\nodejs cordova create myapp com.myorg.myapp Myapp

Copy all of myapp to .\nodejs\myapp\www
1. choose overwrite all
2. remember to copy soft-linked js\core and lib

cd myapp

cordova plugin add cordova-plugin-camera
cordova plugin add cordova-plugin-file
cordova plugin add cordova-plugin-file-transfer
cordova plugin add cordova-plugin-whitelist
cordova plugin add cordova-plugin-compat
cordova platforms add android
cordova build android

Open Android Studio
Import project (Eclipse ADT, Gradle, etc.)
Select <cordova project>/platforms/android

Click 1:Project on the left menu to view and edit all js/css/html assets (.\nodejs\myapp\platforms\android\assets\www)

In the index.html, un-comment the following:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval';
style-src 'self' 'unsafe-inline'; media-src *; connect-src *; img-src * data: content:;">
<meta name="format-detection" content="telephone=no">
<meta name="msapplication-tap-highlight" content="no">

To change app name, change "app_name" in android/res/values/strings.xml

To change app icon, change all the icon.png files in android/res/mipmap-hdpi, -ldpi, -mdpi, -xhdpi