Phonegap Bridge – Device,Network, Vibration,Battery,Console CIS 136 Building Mobile Apps 1.

Slides:



Advertisements
Similar presentations
Mobile Application Development Keshav Bahadoor. Part 1 Cross Platform Web Applications.
Advertisements

Welcome to the Award Winning Easiest to Use & Most Advanced View, Manage, and Control Security, Access Control, Video, Energy & Lighting Systems, & Critical.
Android Power Calculations Approaches and Best Practice Hafed Alghamdi.
Fòmasyon Itilizatè Ayiti Office 365 Fòmasyon. Why the Change? Partners in Health's new hosted Microsoft Office 365 solution allows users to access their.
Accessing the device native APIs Kamen Bundev Telerik Academy academy.telerik.com Senior Front-End Developer
Introduction CIS 136 Building Mobile Apps 1. What did we do Software review 2.
Fundamentals of Python: From First Programs Through Data Structures
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Phonegap Bridge – Battery API CIS 136 Building Mobile Apps 1.
1 Semester 2 Module 3 Configuring a Router Yuda college of business James Chen
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
Phonegap Bridge – Telephony CIS 136 Building Mobile Apps 1.
Secure Search Engine Ivan Zhou Xinyi Dong. Introduction  The Secure Search Engine project is a search engine that utilizes special modules to test the.
Building Native Mapping Apps with PhoneGap: Advanced Techniques
Part 1: Android Gateway In this part of the manual, we will learn about the Android Gateway: This includes: How to maintain your Android Gateway See if.
AirPatrol’s ZoneDefense for Corrections Complete 24/7 precision monitoring and detection of all mobile devices.
Frequently Asked Questions NCSC Product Certification Payroll Anytime, Anywhere!
User Interface Design using jQuery Mobile CIS 136 Building Mobile Apps 1.
FIRST SCREEN In 1929, we were introduced to the “First Screen” Still today, Television advertising is a tremendously effective way to market.
By: Paige Schulte.  According to Dictionary.com, mobile devices are a portable, wireless computing device that is small enough to be used while held.
 Hubs Hubs  Bridges Bridges  Switches Switches  On-Line On-Line  Off-line Off-line  Bibliography Bibliography.
Phonegap Bridge – Compass API CIS 136 Building Mobile Apps 1.
Phonegap Bridge – File System CIS 136 Building Mobile Apps 1.
{ Cloud computing. Exciting and relatively new technologies allow computing to be a part of our everyday lives. Cloud computing allows users to save their.
Phonegap Bridge – Device, Network, Console, Geolocation API’s CIS 136 Building Mobile Apps 1.
Riva – Sync GoldMine to Exchange and Office 365 Server-side sync | No plug-ins required Neil Graham Riva Specialist Riva CRM Integration ext.
Built atop SharePoint Online, WorkPoint 365 Offers a Project and Case Management Solution to Boost Business Productivity and Deliver Governance OFFICE.
Hands-On Microsoft Windows Server 2008 Chapter 5 Configuring Windows Server 2008 Printing.
STAAR Assessment Management System and StAAR Online Testing Platform
Assignment # 3 Networking Components By: Jeff Long.
The VERSO Product Returns Portal Incorporates Office 365 Outlook and Excel Add-Ins to Create Seamless Workflow for All Participating Users OFFICE 365 APP.
JQuery Events, Mobile Events, and Page Events CIS 136 Building Mobile Apps 1.
Office 365 is cloud- based productivity, hosted by Microsoft. Business-class Gain large, 50GB mailboxes that can send messages up to 25MB in size,
Phonegap Bridge –Geolocation and Google maps CIS 136 Building Mobile Apps 1.
Websms Offers Professional Messaging Solutions via Web, , Gateway or Directly Out of Excel (Online) on the Microsoft Office 365 Platform OFFICE 365.
IPEmotion License Management PM (V1.2).
Enterprise | education | public printing locations PrinterOn for Legal.
Enterprise | education | public printing locations PrinterOn for Manufacturing.
Phonegap Bridge – Storage CIS 136 Building Mobile Apps 1.
REDCap Mobile Application
PhoneGap, Processing.
Geospatial Research & Solutions GIS.ASU.EDU
Office 365 is cloud-based productivity, hosted by Microsoft.
WELCOME Mobile Applications Testing
What is a Firewall?.
Resource Management IB Computer Science.
Seminar On Android Submitted By: Ghaytadak Satish Laxman 1.
Development-Introduction
Booklet365 Office 365 Outlook Add-In Makes Easy Work of Managing Schedules for Fitness Gyms, Sports Associations, Trainers, and Their Customers Partner.
Geolocation using Google maps
CIS 136 Building Mobile Apps
CIS 136 Building Mobile Apps
Introduction to Computers
Introduction to Mobile Devices
SocialBoards Self-Service, Multichannel Support Ticket Notifications in Microsoft Office 365 Groups Help Customer Care Teams to Provide Better Care OFFICE.
RR RR Problems Along With Solutions For iPhone And iPad Toll Free ( )
Install and Run the Kronos Mobile App
It’s About Time – ScheduleMe Outlook Add-In for Office 365 Enables Users to Schedule Meetings Easily with People Outside of Your Organization Partner Logo.
Get Enterprise-Grade Call Handling and Control for Microsoft Office 365 and Skype for Business with the Bridge Boss-Admin Executive Console OFFICE 365.
Built on the Powerful Microsoft Office 365 Platform, My Intranet Boosts Efficiency with Support of Daily Tasks, Internal Communications and Collaboration.
The Jamespot for Office 365 Application Attaches Business Processes to Docs and Syncs Them to OneDrive to Simplify Collaboration and Sharing OFFICE 365.
Geolocation using Google maps
CIS 136 Building Mobile Apps
Phonegap Bridge Configuration file
CIS 136 Building Mobile Apps
Yooba File Sync: A Microsoft Office 365 Add-In That Syncs Sales Content in SharePoint Online to Yooba’s Sales Performance Management Solution OFFICE 365.
Reportin Integrates with Microsoft Office 365 to Provide an End-to-End Platform for Financial Teams That Simplifies Report Creation and Management OFFICE.
Device,Network, Vibration, Console, Accelerometer
Device,Network, Vibration, Console, Accelerometer
Geolocation using Google maps
Presentation transcript:

Phonegap Bridge – Device,Network, Vibration,Battery,Console CIS 136 Building Mobile Apps 1

Device 2

Device Plug-in org.apache.cordova.device 3  describes the device's hardware and software  Global in scope, but not available until the device is ready  Device object has 5 properties  cordova  model  platform  uuid  version

device.cordova 4  Gets the version of Cordova running on the device  Ex: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { $(‘info’).html(device.cordova); }

device.model 5  Gets the the name of the device's model or product  set by the device manufacturer and may be different across versions of the same product  Might get the production code name  Ex: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { $(‘info’).html(device.model); } Android: Nexus One returns "Passion" (Nexus One code name) Motorola Droid returns "voles" BlackBerry: Torch 9800 returns "9800" iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1.

device.platform 6  Gets the operating system name  Ex: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { $(‘info’).html(device.platform); }

device.uuid 7  Gets the Universally Unique Identifier  a 128-bit value that is ‘practically unique’  determined by the device manufacturer and are specific to the device's platform or model.  Ex: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { $(‘info’).html(device.uuid); }

device.version 8  Gets the operating system version  Kitkat  Ex: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { $(‘info’).html(device.version); }

Network 9

Network Information Plug-in org.apache.cordova.network-information 10  provides information about the device's cellular and wifi connection  Indicates if the device has an internet connection  Connection Object has 1 property and 8 constants  connection.type  Connection.UNKNOWN  Connection.ETHERNET  Connection.WIFI  Connection.CELL_2G  Connection.CELL_3G  Connection.CELL_4G  Connection.CELL  Connection.NONE

navigator.connection.type 11  determine the device's network connection state, and type of connection  Ex: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { var networkState = navigator.connection.type; $(‘info’).html(networkState); }

Network States 12  Using the type of connection, coupled with the translation of network state constants, can provide textual description - quirky document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { var networkState = navigator.connection.type; var states = {}; states[Connection.UNKNOWN] = 'Unknown connection'; states[Connection.ETHERNET] = 'Ethernet connection'; states[Connection.WIFI] = 'WiFi connection'; states[Connection.CELL_2G] = 'Cell 2G connection'; states[Connection.CELL_3G] = 'Cell 3G connection'; states[Connection.CELL_4G] = 'Cell 4G connection'; states[Connection.CELL] = 'Cell generic connection'; states[Connection.NONE] = 'No network connection'; $(‘info’).html(states[networkState]); }

Network related events 13  offline - fires when an application goes offline, and the device is not connected to the Internet document.addEventListener("offline", yourCallbackFunction, false);  online - fires when an application goes online, and the device becomes connected to the Internet document.addEventListener("online", yourCallbackFunction, false);

Vibration 14

Vibration 15  navigator.notification object  Method:  vibrate(duration)  duration is specified in milliseconds  To make a device vibrate, pause, then vibrate again, need to call vibrate several times and force the app to pause in between  navigator.notification.vibration(2000);

Battery 16

Battery Status Plug-in org.apache.cordova.battery-status 17  a means for web developers to programmatically determine the battery status of the hosting device and whether the device is plugged in or not  without knowing the battery status of a device, you are designing the web application with the assumption there is sufficient battery level for the task at hand  battery of a device may exhaust faster than expected if apps are unable to make decisions based on the battery status  given knowledge of the battery status, web developers are able to craft web content and applications which are power- efficient, thereby leading to improved user experience

Battery Status Plug-in 18  Battery Status events can be used to defer or scale back work when the device is not plugged in or is low on battery  Ex:  In an advanced application, like an app, the app can check the server for new every few seconds if the device is plugged in, but do so less frequently if the device is not plugged in or is low on battery  In an advanced application, like a note keeper, the app could monitor the battery level and save changes before the battery runs out to prevent data loss

Battery Status Attributes 19  isPlugged (Boolean)  whether the device is plugged in  Level (float)  Represents how much of the internal power source remains, scaled from 0 to 100 (null if no juice)  Status (string)  the battery status of the hosting device, scaled from critical to ok

Battery Status Attributes 20  Critical  Low  OK  null - unable to report the battery's level

Battery Status Event 21  BatteryStatus event is triggered when  isPlugged changes its value, or  level changes by at least 1, or  status changes its value  This event fires when the percentage of battery charge changes by at least 1 percent, or if the device is plugged in or unplugged

Battery Status Example 22 window.addEventListener("batterystatus", onBatteryStatus, false); function onBatteryStatus(info) console.log("Level: " + info.level + " isPlugged: " + info.isPlugged); } o The battery status handler is passed an object that contains two properties: o level: The percentage of battery charge (0-100) o isPlugged: A boolean that indicates whether the device is plugged in o use an EventListener to attach an event handler after the deviceready event fires

Battery Critical 23  The event fires when the percentage of battery charge has reached the critical battery threshold  The value is device-specific

Battery Critical Example 24  The batterycritical handler is passed an object that contains two properties:  level: The percentage of battery charge (0-100)  isPlugged: A boolean that indicates whether the device is plugged in window.addEventListener("batterycritical", onBatteryCritical, false); function onBatteryCritical(info) { alert("Battery Level Critical " + info.level + "%\nRecharge Soon!"); }

Battery Low 25  This event fires when the percentage of battery charge has reached the low battery threshold  device-specific value

Battery Low Example 26  The batterylow handler is passed an object that contains two properties:  level: The percentage of battery charge (0-100)  isPlugged: A boolean that indicates whether the device is plugged in window.addEventListener("batterylow", onBatteryLow, false); function onBatteryLow(info) { alert("Battery Level Low " + info.level + "%"); }

Console 27

Cordova Console Plugin org.apache.cordova.console 28  ensure that console.log() is as useful as it can be  Ex: document.addEventListener("deviceready", onDeviceReady, false); function onDeviceReady() { console.log(“message to console – Hello there”); }