This repository was archived by the owner on Jul 16, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathangular-phonegap.min.js
More file actions
1 lines (1 loc) · 3.04 KB
/
angular-phonegap.min.js
File metadata and controls
1 lines (1 loc) · 3.04 KB
1
"use strict";angular.module("PhoneGap",[]).factory("PhoneGap",["$q","$rootScope","$document",function(a,b,c){var d=a.defer();return c.bind("deviceready",function(){b.$apply(d.resolve)}),{ready:function(){return d.promise}}}]).run(["PhoneGap",function(){}]),angular.module("PhoneGap").factory("Accelerometer",["$q","$window","PhoneGap",function(a,b,c){var d=0,e={};return{getCurrentAcceleration:function(a,d,e){c.ready().then(function(){b.navigator.accelerometer.getCurrentAcceleration(a,d,e)})},watchAcceleration:function(a,f,g){var h=(++d).toString(10);return c.ready().then(function(){e[h]=b.navigator.accelerometer.watchAcceleration(a,f,g)}),h},clearWatch:function(a){e[a]&&c.ready().then(function(){b.navigator.accelerometer.clearWatch(e[a]),delete e[a]})}}}]);var Camera=Camera||{PictureSourceType:{PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2},DestinationType:{DATA_URL:0,FILE_URI:1,NATIVE_URI:2},EncodingType:{JPEG:0,PNG:1},MediaType:{PICTURE:0,VIDEO:1,ALLMEDIA:2},Direction:{BACK:0,FRONT:1}};angular.module("PhoneGap").factory("Camera",["$q","$window","PhoneGap",function(a,b,c){return{getPicture:function(a,d,e){c.ready().then(function(){b.navigator.camera.getPicture(a,d,e)})},cleanup:function(a,d){c.ready().then(function(){b.navigator.camera.cleanup(a,d)})},PictureSourceType:Camera.PictureSourceType,DestinationType:Camera.DestinationType,EncodingType:Camera.EncodingType,MediaType:Camera.MediaType,Direction:Camera.Direction}}]),angular.module("PhoneGap").factory("Capture",["$q","$window","PhoneGap",function(a,b,c){return{captureAudio:function(a,d,e){c.ready().then(function(){b.navigator.device.capture.captureAudio(a,d,e)})},captureImage:function(a,d,e){c.ready().then(function(){b.navigator.device.capture.captureAudio(a,d,e)})},captureVideo:function(a,d,e){c.ready().then(function(){b.navigator.device.capture.captureVideo(a,d,e)})}}}]),angular.module("PhoneGap").factory("Compass",["$q","$window","PhoneGap",function(a,b,c){var d=0,e={};return{getCurrentHeading:function(a,d,e){c.ready().then(function(){b.navigator.compass.getCurrentHeading(a,d,e)})},watchHeading:function(a,f,g){var h=(++d).toString(10);return c.ready().then(function(){e[h]=b.navigator.compass.watchHeading(a,f,g)}),h},clearWatch:function(a){e[a]&&c.ready().then(function(){b.navigator.compass.clearWatch(e[a]),delete e[a]})}}}]),angular.module("PhoneGap").factory("Contacts",function(){}),angular.module("PhoneGap").factory("Geolocation",["$q","$window","PhoneGap",function(a,b,c){var d=0,e={};return{getCurrentPosition:function(a,d,e){c.ready().then(function(){b.navigator.geolocation.getCurrentPosition(a,d,e)})},watchPosition:function(a,f,g){var h=(++d).toString(10);return c.ready().then(function(){e[h]=b.navigator.geolocation.watchPosition(a,f,g)}),h},clearWatch:function(a){e[a]&&c.ready().then(function(){b.navigator.geolocation.clearWatch(e[a]),delete e[a]})}}}]),angular.module("PhoneGap").factory("Globalization",function(){}),angular.module("PhoneGap").factory("Notification",function(){}),angular.module("PhoneGap").factory("Splashscreen",function(){}),angular.module("PhoneGap").factory("Storage",function(){});