Solution:
There’re lots of tools/platforms to build an app from HTML5 project, such as Trigger.io, Intel XDK, PhoneGap, Apache Cordova. I choosed Cordova to build my first html app;
$ sudo npm install -g cordova
$ cordova create hello com.liguoliang.app HelloWorld
$ cordova platform add ios/android
$ cordova build
$ cordova emulate ios/andorid
Note: It is required to install Xcode or Android SDK/Tools for simulating. you may follow the Cordova CLI message to installed the required sdk/tool.
Quick start using GCM
0. Create your project via “Google developers console”;
1. Prepare Client App:
– Get device registration ID
– Receive message from GCM
Example: https://github.com/hmkcode/Android/tree/master/android-gcm-client
2. Send Message to GCM server
– Send(Post) message to GCM server
Example: https://github.com/hmkcode/Android/tree/master/java-post-gcm
3. Start your app(#1), then send message ( #2)
Push message via AWS SNS to Android devices
Login to AWS console
1. Create new application with your GCM API key
2. ‘Create platform endpoint’ using your device registration ID;
3. Select your device and ‘Publish to endpoint’ to publish a message
4. Check your device;
Push Message via Parse Push
Need to modify the client app and then push message from Parse console;
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.