An open API service indexing awesome lists of open source software.

https://github.com/rhildred/websqldbstart


https://github.com/rhildred/websqldbstart

Last synced: about 1 year ago
JSON representation

Awesome Lists containing this project

README

          

# hellophonegap

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 ripple-emulator` if you haven't already
1. `ripple emulate`
1. If your browser doesn't open up with your project in it surf to `http://localhost:4400/?enableripple=true`

To get the phonegap ready event select Cordova 2.0.

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.

![telechargement](https://rhildred.github.io/hellophonegap/readmeimages/BlueStacksCapture.PNG "telechargement")

7) Load the apk into BlueStacks

![install apk](https://rhildred.github.io/hellophonegap/readmeimages/installApkCapture.PNG "install apk")

8) Click on the app in your home screen

!["spy in this case"](https://rhildred.github.io/hellophonegap/readmeimages/HomeScreenCapture.PNG "spy in this case")