Phonegap API & Phonegap Bridge CIS 136 Building Mobile Apps 1
Mobile Apps 2 A mobile application (or mobile app) is a software application designed to run on smartphones, tablet computers and other mobile devices Hybrid Mobile Apps are developed using frameworks and make use of API’s
API - Application Programming Interface 3 sets of tools/requirements that govern how one application can talk to another APIs make the modern Web what it is today APIs make it possible for big services like Google Maps or Facebook to let other apps "piggyback" on their offerings Yelp, for instance, displays nearby restaurants on a Google Map in its app APIs do all this by "exposing" some of a program's internal functions to the outside world in a limited fashion makes it possible for applications to share data and take actions on one another's behalf without requiring developers to share all of their software's code.
Phonegap API 4 a free and open source framework that allows you to create mobile apps using standardized web APIs for the platforms you care about Has a set of device plug-ins that allow a mobile app developer to access native device function such as the camera or accelerometer from JavaScript Combined with a UI framework such as jQuery Mobile allows a smartphone app to be developed with just HTML, CSS, and JavaScript
Phonegap API 5 PhoneGap solves two problems for developers: Can use familiar web languages like HTML and JavaScript to create a working mobile application Can port code to another platform quickly and easily Reduces the complexity of supporting multiple platforms
Phonegap Bridge 6 Bridges the Gap between your standard web technologies, and the unique capabilities inherent in your smartphone Uses plug-ins to bridge to native device Contains minimal set and there are lots of 3 rd party plug-ins to choose from Learning how and when to use the plug-in is key Requires writing Javascript/jQuery code
Core plug-ins 7 Battery Camera Console Contacts Device Accelerometer Compass Dialogs File System File Transfer Geolocation Globalization inApp Browser Media Media Capture Network Information Splashscreen Vibration StatusBar
Config.xml 8 Many aspects of an app's behavior can be controlled with a global configuration file Defines global and platform-specific options core set of images for each target platform icons and splash screens If you do not specify an icon then the Apache Cordova logo is used Global preferences Fullscreen Orientation
Core components 9
Preferences 10
Plug-ins 11
Icons 12
Screen densities 13
Origin policy 14 the set of external domains the app is allowed to communicate with Domain whitelisting is a security model that controls access to external domains over which you application has no control. formulate a whitelist and allow access to specific network domains and subdomains