https://github.com/rhildred/hellophonegap
phonegap hello world
https://github.com/rhildred/hellophonegap
Last synced: about 1 year ago
JSON representation
phonegap hello world
- Host: GitHub
- URL: https://github.com/rhildred/hellophonegap
- Owner: rhildred
- Created: 2016-01-08T15:26:29.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-01-23T18:38:43.000Z (over 8 years ago)
- Last Synced: 2025-05-13T14:47:26.055Z (about 1 year ago)
- Language: HTML
- Size: 2.78 MB
- Stars: 0
- Watchers: 2
- Forks: 41
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
phonegap hello world. The config.xml sets the name and id:
```
hello phonegap
most basic of examples, responds to deviceready
Rich Hildred
```
The html5 phonegap code includes the javascript `cordova.js` file, which will be replaced during the build by a cordova.js that is built on the fly.
```
hello phonegap
I can't believe it's this simple. ...
Not connected to phonegap!
var phonegapReady = function(){
oStatus = document.getElementById("connectionStatus");
oStatus.innerHTML = "Now connected to phonegap";
oStatus.style.color = "green";
}
document.addEventListener("deviceready", phonegapReady, false);
```
To test this in a local environment:
1. npm install -g browser-sync if you haven't already
1. `browser-sync start --server --files "./*"`
You can also get the phonegapready event by installing the ripple beta google chrome plugin.
This can be loaded up on phonegap build, and turned into a apk that can be put on your phone.
To install this on phonegap build:
1) sign up for an adobe account and log in to https://build.phonegap.com
2) push this on to your own github
3) create an app on phonegap build
4) Click the `ready to build` button.
5) Download the APK on to your local machine.
6) Install [BlueStacks](https://www.bluestacks.com/download.html) if you haven't already.

7) Load the apk into BlueStacks

8) Click on the app in your home screen
