Martin de Keijzer gave a presentation on using Phonegap to create native mobile apps with JavaScript. Phonegap allows wrapping HTML apps as native apps by bridging native functionality to a JavaScript API. It was originally created by Nitobi and later acquired by Adobe, and is now maintained by the Apache Software Foundation as Cordova. The presentation covered installing Phonegap, creating a first project, using Phonegap Build for easier builds, working with plugins, and choosing from available open source plugins.
3. About me
Martin de Keijzer
Dutch web developer
Working for Ibuildings
PHPBenelux Board Member
@Martin1982
http://www.martindekeijzer.nl
3
Sunday, 14 April 13
19. Creating your first project
$ ./path/to/cordova-ios/bin/create
/path/to/my_new_cordova_project
com.example.cordova_project_name
CordovaProjectName
19
Sunday, 14 April 13
37. Building like a pro
config.xml
W3C Widget Specification
https://gist.github.com/Martin1982/5063962
37
Sunday, 14 April 13
38. Plug-ins
When the web just doesn’t suffice
38
Sunday, 14 April 13
39. Accelerometer
Get device movement
in an X,Y, Z space.
39
Sunday, 14 April 13
40. Camera & Capture & Media
Use the device’s library,
camera and microphone to
work with local audio, video
and images.
Don’t forget iOS 6 supports:
<input type="file" accept="image/*" capture="camera">
40
Sunday, 14 April 13
41. Compass
API to detect which way a
device user is pointing
41
Sunday, 14 April 13
42. Connection
See if a user is connected and
inspect the type of connection:
Wifi, xG, Ethernet
Caution navigator.isOnline is your close friend
42
Sunday, 14 April 13
43. Contacts
Access the user’s contact list
43
Sunday, 14 April 13
44. Device
•Name
•Cordova version
•Platform
•UUID
•Version
•Model
44
Sunday, 14 April 13
45. Events
Handles application state
(deviceready, paused etc)
45
Sunday, 14 April 13
46. File
Filesystem bridging, based
on the W3C File API
46
Sunday, 14 April 13
47. Geolocation
API to get the latitudes and
longitudes of the device.
Caution: Already supported by browsers!
47
Sunday, 14 April 13
48. Globalization
Currency, language, date time
48
Sunday, 14 April 13
49. InAppBrowser
The browser opened by
window.open()
49
Sunday, 14 April 13
51. Splashscreen
No matter how beautiful your splash screen is,
eventually you’ll need to show and hide it
51
Sunday, 14 April 13
52. Storage
SQL storage based on the W3C
WebSQL specification.
Caution; WebSQL is no longer maintained
IndexedDB is the new superhero!
52
Sunday, 14 April 13
53. User plugins
Why reinvent the wheel
53
Sunday, 14 April 13
54. Pick what you want
https://github.com/phonegap/phonegap-plugins 54
Sunday, 14 April 13