Presentation is loading. Please wait.

Presentation is loading. Please wait.

Coursework 2 implementation options Chris Greenhalgh G54UBI / 2011-03-02 1Chris Greenhalgh

Similar presentations


Presentation on theme: "Coursework 2 implementation options Chris Greenhalgh G54UBI / 2011-03-02 1Chris Greenhalgh"— Presentation transcript:

1 Coursework 2 implementation options Chris Greenhalgh G54UBI / 2011-03-02 1Chris Greenhalgh (cmg@cs.nott.ac.uk)

2 Contents Target device(s) Implementation options – Supported: Google AppInventor, HTML/JS, PhoneGap, Android Java (native) App – Unsupported: Titanium mobile, other native app Sensor options Summary 2Chris Greenhalgh (cmg@cs.nott.ac.uk)

3 Target device(s) Android is the only supported target platform – Freely available tools – Freely available emulators 3Chris Greenhalgh (cmg@cs.nott.ac.uk)

4 Implementation options… Supported Google AppInventor HTML/JS Browser App PhoneGap Android native (java) app Unsupported Titanium mobile Other native app 4Chris Greenhalgh (cmg@cs.nott.ac.uk)

5 Option 1: Google AppInventor Creates simple Android apps – Drag’n’Drop UI builder – Scratch-like visual programming Web tool plus local tools (JNLP) – Requires Google account http://appinventor.googlelabs.com/about/ 5Chris Greenhalgh (cmg@cs.nott.ac.uk)

6 Option 2: HTML/JS Browser App Dynamic web pages – HTML layout – CSS styling – JavaScript behaviour Compatible with many devices – Limited low-level/sensor access Various tool(s) – E.g. Eclipse 6Chris Greenhalgh (cmg@cs.nott.ac.uk)

7 Option 3: PhoneGap Converts HTML/JS apps to installable phone apps Compatible with many devices – Better low-level/sensor access – Option for native extensions Requires app build – Eclipse for Android http://www.phonegap.com/ 7Chris Greenhalgh (cmg@cs.nott.ac.uk)

8 Option 4: Android Native (Java) App Creates Android apps – OO Java framework specific to Android – Limited DnD UI builder Complete access to device APIs, sensors, … Requires Eclipse IDE plus Android SDK and Eclipse plugins Only suitable for experienced developers http://developer.android.com/ LIMITED SUPPORT 8Chris Greenhalgh (cmg@cs.nott.ac.uk)

9 Other option: Titanium Mobile Creates mobile apps – All programming in Javascript – Custom (native) widgets – Converted to installable App (similar to PhoneGap) Compatible with Android and iPhone – Good low-level/sensor access – Option for native extensions Simple desktop GUI project management/build tool – plus your own choice of JS editor http://www.appcelerator.com/products/titanium-mobile-application-development/ NOT SUPPORTED 9Chris Greenhalgh (cmg@cs.nott.ac.uk)

10 Other option: Other native app E.g. iPhone/iOS Creates app for that target – Platform-specific development Complete access to device APIs, sensors, … Platform-specific tools NOT SUPPORTED 10Chris Greenhalgh (cmg@cs.nott.ac.uk)

11 Implementation Summary AppInventorBrowserPhoneGapNative Android SupportYes Limited Installable / standalone app YesNoYes GUIDnD editorHTML/CSS Java/XML LogicVisual programming Javascript Java 2 (Android framework) GPSYes 1 Yes Other sensors Compass, Accelerometer, barcode, photo - Compass, Accelerometer, barcode, camera, … Map viewLimited 2 Yes NetworkingLimitedHTTP HTTP, TCP, … AndroidYes iPhoneNoYesYes (requires Mac OS-X) No Easier Easy transition 1 Limited options for region logic 2 By switch to map app (no overlay) 11Chris Greenhalgh (cmg@cs.nott.ac.uk)

12 Sensor options Supported GPS – Lat/long – Regions Compass Accelerometer 2D barcode Remote sensors – Environmental Unsupported Remote sensors – Interactive/installation Photo Continuous camera input Network scanning – Bluetooth, WiFi NFC / RFID 12Chris Greenhalgh (cmg@cs.nott.ac.uk)

13 GPS lat/long Outdoor position – Requires view of sky Typically 5m accuracy Updates once/second Takes up to a minute (sometimes more) to get initial “fix” 13Chris Greenhalgh (cmg@cs.nott.ac.uk)

14 A note on network location providers iPhone and Android also support location from network information – GSM cell, WiFi networks Requires network lookup (online) Very rough position – 10s metres (urban) – 1000s metres (rural) 14Chris Greenhalgh (cmg@cs.nott.ac.uk)

15 GPS regions Classification of GPS position in terms of “meaningful” regions – E.g. “near the statue” Depends on GPS fix & accuracy – Classified at run-time Requires region geometry to be pre- specified 15Chris Greenhalgh (cmg@cs.nott.ac.uk)

16 Compass Many phones contain a 1, 2 or 3-D magnet flux compass – Gives approximate orientation (heading) – Affected by nearby ferrous objects – Native Android apps may get pitch and roll as well as heading (azimuth) 16Chris Greenhalgh (cmg@cs.nott.ac.uk)

17 Accelerometer Monitors 3D acceleration of device – Acceleration = rate of change of velocity – Gravity = 9.8ms -2 (down) 17Chris Greenhalgh (cmg@cs.nott.ac.uk)

18 2D Barcode Several standards for encoding data (esp. URLs) as 2D barcodes – E.g. QR Code Supported by standard reader apps using camera – E.g. ZXing for Android Can be generated and placed to identify – Specific objects – Places – People http://www.cs.nott.ac.uk/~cmg/ 18Chris Greenhalgh (cmg@cs.nott.ac.uk)

19 Remote sensors Network access to remote sensors – E.g. Phidget Single Board Computer w. Embedded in environment* – E.g. Temperature, humidity, light Interactive installation – E.g. Touch, distance, pressure, force, … IR Distance IR Reflective Vibration Force Magnetic Rotation Touch Motion (PIR) Slider Mini-joystick pressure Voltage current temperature Temp & humidity light sonar ID distance * One set of sensors will be installed at the edge of the CS Atrium for test/development NOT SUPPORTED 19

20 Sensor summary AppInvPhoneGapEmulatorDevice(s) GPS lat/longYes Yes (no accuracy)Most GPS regionLimitedYes Most (GPS) CompassYes NoMost AccelerometerYes NoMany 2D barcodeYes 1 No 2 Most (Camera) Remote sensorsYes 3 Yes 4 All (network) 1 : requires ZXing app 2 : a work-around might be possible using an alternative app (TBD) 3 : requires bridging service (for AppInv specifically as WebTinyDB) 4 : remote sensors are outside the emulator (emulating the remote sensors is another matter) 20Chris Greenhalgh (cmg@cs.nott.ac.uk)

21 Conclusion First: – Identify the target platform (default Android) – Identify the implementation approach you will use Taking account of technical skills/background plus interests and platform capabilities – Identify the sensor(s) that you will use Bear in mind emulator support and your options for access to real device(s) Scope/refine your coursework 2 concept accordingly 21Chris Greenhalgh (cmg@cs.nott.ac.uk)


Download ppt "Coursework 2 implementation options Chris Greenhalgh G54UBI / 2011-03-02 1Chris Greenhalgh"

Similar presentations


Ads by Google