A logging app showing the GPS latitude/longitude and WiFi accespoints created with phonegap.
Basic app structure from phonegap-start
- Java JDK 1.5 or greater
- Apache ANT 1.8.0 or greater
- Android SDK http://developer.android.com
npm install -g phonegap
If npm
doesn't work, install latest nodejs.
The app uses the following plugins that must be installed locally
phonegap local plugin add org.apache.cordova.device-orientation
phonegap local plugin add org.apache.cordova.geolocation
Important: For geolocation the option enableHighAccuracy
in function call navigator.geolocation.getCurrentPosition
must be set
to true
when running on emulator (see www/js/geolocation.js
)
-
Start emulator
-
Set latitude and longitude for emulator (i.e. lat 50, lon 9)
telnet localhost 5554 geo fix 50 9
-
Set orientation for emulator (i.e. 135 degress for south east orientation)
telnet localhost 5554 sensor set orientation 135
-
Compile application and install on emulator
phonegap local run android --emulator
Either:
-
Build app
phonegap local build android
-
Copy file
platforms/android/bin/PositionLogger-debug.apk
to your phone and install
Or:
-
Connect device to your machine and configure device.
-
Install app on device
phonegap local run android --device