At the weekend time, studied the ionic apk build process, still smooth, the steps are simply recorded as follows.
1. Download node. js and install (www.nodejs.org)
2. NPM install-g Cordova Ionic
3. Ionic start MyApp tabs or ionic start MyApp sidemenu or ionic start MyApp blank
4, install JAVA,ANDROID-SDK, and configure Java_home,android_home,path and other paths.
5. Making signature Files
Keytool-genkey-v-keystore d:/work/ionic/my-release-key.keystore-alias release_alias-keyalg rsa-validity 36500
6. Add Android Platform folder
Cordova Platform Add Android
7, add platform/android/ant.properties file, content:
Key.store=d:/work/ionic/my-release-key.keystore
Key.alias=abc
key.store.password=123456
key.alias.password=123456
8. Cordova Build Android--release
The signed APK is successfully generated and can be used after the phone is downloaded.
Because there is no Mac computer at hand, there is no application to build apple, it seems to rely on the level two market to make some money, buy a Mac mini to use.
Cordova Plugin Add Org.apache.cordova.console
Cordova Plugin Add Org.apache.cordova.statusbar
Cordova Plugin Add Org.apache.cordova.device
Cordova Plugin Add Org.apache.cordova.splashscreen
Cordova Plugin Add Org.apache.cordova.media
Playing video requires adding media plugins
Friends Circle Share Plugin Introduction
http://blog.csdn.net/chen1026241686/article/details/38368713
SMS Plugin
Cordova Plugin Add Https://github.com/pyriel4you/Cordova-SMS.git
Use:
Smsplugin.send ("13717806882", "message");
Streaming Media Plugin
Cordova Plugin Add Https://github.com/nchutchind/Streaming-Media-Cordova-Plugin.git
Use:
var videourl = Streaming_video_url;
Just play a video
Window.plugins.streamingMedia.playVideo (Videourl);
Play a video with callbacks
var options = {
Successcallback:function () {
Console.log ("Video was closed without error.");
},
Errorcallback:function (errmsg) {
Console.log ("error!" + errmsg);
}
};
Window.plugins.streamingMedia.playVideo (Videourl, Options);
var audiourl = Streaming_audio_url;
Play an audio file (not recommended, since the screen would be plain black)
Window.plugins.streamingMedia.playAudio (Audiourl);
Play an audio file with options (all options Optional)
var options = {
BgColor: "#FFFFFF",
Bgimage: "<SWEET_BACKGROUND_IMAGE>",
Bgimagescale: "Fit",
Successcallback:function () {
Console.log ("Player closed without error.");
},
Errorcallback:function (errmsg) {
Console.log ("error!" + errmsg);
}
};
Window.plugins.streamingMedia.playAudio (Audiourl, Options);