Ionic writing HelloWorld Steps

Source: Internet
Author: User

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);



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.