diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.bowerrc b/HybridMobile App using Ionic Framework/CodeCamp/.bowerrc
new file mode 100644
index 0000000..e28246d
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.bowerrc
@@ -0,0 +1,3 @@
+{
+ "directory": "www/lib"
+}
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.gitignore b/HybridMobile App using Ionic Framework/CodeCamp/.gitignore
new file mode 100644
index 0000000..8f7ddd3
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.gitignore
@@ -0,0 +1,6 @@
+# Specifies intentionally untracked files to ignore when using Git
+# http://git-scm.com/docs/gitignore
+
+node_modules/
+platforms/
+plugins/
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/.name b/HybridMobile App using Ionic Framework/CodeCamp/.idea/.name
new file mode 100644
index 0000000..41e9bc5
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/.name
@@ -0,0 +1 @@
+CodeCamp
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/CodeCamp.iml b/HybridMobile App using Ionic Framework/CodeCamp/.idea/CodeCamp.iml
new file mode 100644
index 0000000..4bec94e
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/CodeCamp.iml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/encodings.xml b/HybridMobile App using Ionic Framework/CodeCamp/.idea/encodings.xml
new file mode 100644
index 0000000..d821048
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/encodings.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/misc.xml b/HybridMobile App using Ionic Framework/CodeCamp/.idea/misc.xml
new file mode 100644
index 0000000..8662aa9
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/misc.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/modules.xml b/HybridMobile App using Ionic Framework/CodeCamp/.idea/modules.xml
new file mode 100644
index 0000000..e0aa97f
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/scopes/scope_settings.xml b/HybridMobile App using Ionic Framework/CodeCamp/.idea/scopes/scope_settings.xml
new file mode 100644
index 0000000..922003b
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/vcs.xml b/HybridMobile App using Ionic Framework/CodeCamp/.idea/vcs.xml
new file mode 100644
index 0000000..6564d52
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/.idea/workspace.xml b/HybridMobile App using Ionic Framework/CodeCamp/.idea/workspace.xml
new file mode 100644
index 0000000..37608e8
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/.idea/workspace.xml
@@ -0,0 +1,777 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+ $PROJECT_DIR$/gulpfile.js
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+
+
+
+
+
+
+
+
+
+
+
+
+ 1436282860868
+
+ 1436282860868
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/bower.json b/HybridMobile App using Ionic Framework/CodeCamp/bower.json
new file mode 100644
index 0000000..2995b60
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/bower.json
@@ -0,0 +1,7 @@
+{
+ "name": "HelloIonic",
+ "private": "true",
+ "devDependencies": {
+ "ionic": "driftyco/ionic-bower#1.0.1"
+ }
+}
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/config.xml b/HybridMobile App using Ionic Framework/CodeCamp/config.xml
new file mode 100644
index 0000000..c36e559
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/config.xml
@@ -0,0 +1,42 @@
+
+
+ Code Camp
+
+ An Ionic Framework and Cordova project.
+
+
+ Nimesh Chathuranga Jayaweera
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/gulpfile.js b/HybridMobile App using Ionic Framework/CodeCamp/gulpfile.js
new file mode 100644
index 0000000..3efdfc0
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/gulpfile.js
@@ -0,0 +1,52 @@
+var gulp = require('gulp');
+var gutil = require('gulp-util');
+var bower = require('bower');
+var concat = require('gulp-concat');
+var sass = require('gulp-sass');
+var minifyCss = require('gulp-minify-css');
+var rename = require('gulp-rename');
+var sh = require('shelljs');
+
+var paths = {
+ sass: ['./scss/**/*.scss']
+};
+
+gulp.task('default', ['sass']);
+
+gulp.task('sass', function(done) {
+ gulp.src('./scss/ionic.app.scss')
+ .pipe(sass({
+ errLogToConsole: true
+ }))
+ .pipe(gulp.dest('./www/css/'))
+ .pipe(minifyCss({
+ keepSpecialComments: 0
+ }))
+ .pipe(rename({ extname: '.min.css' }))
+ .pipe(gulp.dest('./www/css/'))
+ .on('end', done);
+});
+
+gulp.task('watch', function() {
+ gulp.watch(paths.sass, ['sass']);
+});
+
+gulp.task('install', ['git-check'], function() {
+ return bower.commands.install()
+ .on('log', function(data) {
+ gutil.log('bower', gutil.colors.cyan(data.id), data.message);
+ });
+});
+
+gulp.task('git-check', function(done) {
+ if (!sh.which('git')) {
+ console.log(
+ ' ' + gutil.colors.red('Git is not installed.'),
+ '\n Git, the version control system, is required to download Ionic.',
+ '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.',
+ '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.'
+ );
+ process.exit(1);
+ }
+ done();
+});
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/hooks/README.md b/HybridMobile App using Ionic Framework/CodeCamp/hooks/README.md
new file mode 100644
index 0000000..d2563ea
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/hooks/README.md
@@ -0,0 +1,83 @@
+
+# Cordova Hooks
+
+This directory may contain scripts used to customize cordova commands. This
+directory used to exist at `.cordova/hooks`, but has now been moved to the
+project root. Any scripts you add to these directories will be executed before
+and after the commands corresponding to the directory name. Useful for
+integrating your own build systems or integrating with version control systems.
+
+__Remember__: Make your scripts executable.
+
+## Hook Directories
+The following subdirectories will be used for hooks:
+
+ after_build/
+ after_compile/
+ after_docs/
+ after_emulate/
+ after_platform_add/
+ after_platform_rm/
+ after_platform_ls/
+ after_plugin_add/
+ after_plugin_ls/
+ after_plugin_rm/
+ after_plugin_search/
+ after_prepare/
+ after_run/
+ after_serve/
+ before_build/
+ before_compile/
+ before_docs/
+ before_emulate/
+ before_platform_add/
+ before_platform_rm/
+ before_platform_ls/
+ before_plugin_add/
+ before_plugin_ls/
+ before_plugin_rm/
+ before_plugin_search/
+ before_prepare/
+ before_run/
+ before_serve/
+ pre_package/ <-- Windows 8 and Windows Phone only.
+
+## Script Interface
+
+All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables:
+
+* CORDOVA_VERSION - The version of the Cordova-CLI.
+* CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios).
+* CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer)
+* CORDOVA_HOOK - Path to the hook that is being executed.
+* CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate)
+
+If a script returns a non-zero exit code, then the parent cordova command will be aborted.
+
+
+## Writing hooks
+
+We highly recommend writting your hooks using Node.js so that they are
+cross-platform. Some good examples are shown here:
+
+[http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/)
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/hooks/after_prepare/010_add_platform_class.js b/HybridMobile App using Ionic Framework/CodeCamp/hooks/after_prepare/010_add_platform_class.js
new file mode 100644
index 0000000..bda3e41
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/hooks/after_prepare/010_add_platform_class.js
@@ -0,0 +1,94 @@
+#!/usr/bin/env node
+
+// Add Platform Class
+// v1.0
+// Automatically adds the platform class to the body tag
+// after the `prepare` command. By placing the platform CSS classes
+// directly in the HTML built for the platform, it speeds up
+// rendering the correct layout/style for the specific platform
+// instead of waiting for the JS to figure out the correct classes.
+
+var fs = require('fs');
+var path = require('path');
+
+var rootdir = process.argv[2];
+
+function addPlatformBodyTag(indexPath, platform) {
+ // add the platform class to the body tag
+ try {
+ var platformClass = 'platform-' + platform;
+ var cordovaClass = 'platform-cordova platform-webview';
+
+ var html = fs.readFileSync(indexPath, 'utf8');
+
+ var bodyTag = findBodyTag(html);
+ if(!bodyTag) return; // no opening body tag, something's wrong
+
+ if(bodyTag.indexOf(platformClass) > -1) return; // already added
+
+ var newBodyTag = bodyTag;
+
+ var classAttr = findClassAttr(bodyTag);
+ if(classAttr) {
+ // body tag has existing class attribute, add the classname
+ var endingQuote = classAttr.substring(classAttr.length-1);
+ var newClassAttr = classAttr.substring(0, classAttr.length-1);
+ newClassAttr += ' ' + platformClass + ' ' + cordovaClass + endingQuote;
+ newBodyTag = bodyTag.replace(classAttr, newClassAttr);
+
+ } else {
+ // add class attribute to the body tag
+ newBodyTag = bodyTag.replace('>', ' class="' + platformClass + ' ' + cordovaClass + '">');
+ }
+
+ html = html.replace(bodyTag, newBodyTag);
+
+ fs.writeFileSync(indexPath, html, 'utf8');
+
+ process.stdout.write('add to body class: ' + platformClass + '\n');
+ } catch(e) {
+ process.stdout.write(e);
+ }
+}
+
+function findBodyTag(html) {
+ // get the body tag
+ try{
+ return html.match(/
])(.*?)>/gi)[0];
+ }catch(e){}
+}
+
+function findClassAttr(bodyTag) {
+ // get the body tag's class attribute
+ try{
+ return bodyTag.match(/ class=["|'](.*?)["|']/gi)[0];
+ }catch(e){}
+}
+
+if (rootdir) {
+
+ // go through each of the platform directories that have been prepared
+ var platforms = (process.env.CORDOVA_PLATFORMS ? process.env.CORDOVA_PLATFORMS.split(',') : []);
+
+ for(var x=0; x
+
+
+ ABOUT
+
+ This is a demo application for ngCordova .
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/adMob/adMob.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/adMob/adMob.ctrl.js
new file mode 100644
index 0000000..6e545c0
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/adMob/adMob.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.adMob.ctrl', [])
+
+ .controller('AdMobCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/adMob/adMob.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/adMob/adMob.html
new file mode 100644
index 0000000..3fe427e
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/adMob/adMob.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/app.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/app.js
new file mode 100644
index 0000000..5b8de34
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/app.js
@@ -0,0 +1,365 @@
+angular.module('demo', [
+ 'ionic',
+ 'ngCordova',
+
+ // modules
+ // 'demo.adMob.ctrl', -- not functioning right now
+ 'demo.appAvailability.ctrl',
+ 'demo.appRate.ctrl',
+ 'demo.barcodeScanner.ctrl',
+ 'demo.batteryStatus.ctrl',
+ 'demo.camera.ctrl',
+ 'demo.clipboard.ctrl',
+ 'demo.contacts.ctrl',
+ 'demo.datePicker.ctrl',
+ 'demo.device.ctrl',
+ 'demo.deviceMotion.ctrl',
+ 'demo.deviceOrientation.ctrl',
+ 'demo.dialogs.ctrl',
+ 'demo.emailComposer.ctrl',
+ 'demo.facebook.ctrl',
+ 'demo.file.ctrl',
+ 'demo.fileOpener2.ctrl',
+ 'demo.fileTransfer.ctrl',
+ 'demo.flashlight.ctrl',
+ 'demo.geolocation.ctrl',
+ 'demo.globalization.ctrl',
+ 'demo.googleAnalytics.ctrl',
+ 'demo.healthkit.ctrl',
+ 'demo.inAppBrowser.ctrl',
+ 'demo.localNotification.ctrl',
+ 'demo.media.ctrl',
+ 'demo.network.ctrl',
+ 'demo.oauth.ctrl',
+ 'demo.preferences.ctrl',
+ 'demo.printer.ctrl',
+ 'demo.pushNotifications.ctrl',
+ 'demo.socialSharing.ctrl',
+ 'demo.sqlite.ctrl',
+ 'demo.statusbar.ctrl',
+ 'demo.toast.ctrl',
+ 'demo.touchid.ctrl',
+ 'demo.vibration.ctrl'
+])
+
+ .run(function ($rootScope, $ionicPlatform, $cordovaNetwork, $cordovaBatteryStatus, $cordovaLocalNotification, $cordovaPush) {
+
+ $ionicPlatform.ready(function () {
+ if (window.cordova && window.cordova.plugins.Keyboard) {
+ cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true);
+ }
+ if (window.StatusBar) {
+ StatusBar.styleDefault();
+ }
+
+ $cordovaLocalNotification.registerPermission().then(function () {
+ //alert("registered");
+ }, function () {
+ //alert("denied registration");
+ });
+
+ var iosConfig = {
+ "badge": true,
+ "sound": true,
+ "alert": true
+ };
+ $cordovaPush.register(iosConfig).then(function (result) {
+ //alert("device token: " + result.deviceToken);
+ }, function (error) {
+ //alert("error " + error);
+ });
+
+ $rootScope.$on('$cordovaPush:notificationReceived', function (event, notification) {
+ if (notification.alert) {
+ navigator.notification.alert(notification.alert);
+ }
+ if (notification.sound) {
+ var snd = new Media(event.sound);
+ snd.play();
+ }
+ if (notification.badge) {
+ $cordovaPush.setBadgeNumber(notification.badge).then(function (result) {
+ // Success!
+ }, function (err) {
+ // An error occurred. Show a message to the user
+ });
+ }
+ });
+
+
+ $rootScope.$on("$cordovaNetwork:offline", function (event, result) {
+ alert("Device is now Offline!");
+ });
+
+
+ $rootScope.$on("$cordovaNetwork:online", function (event, result) {
+ alert("Device is Online!");
+ });
+
+ $rootScope.$on("$cordovaBatteryStatus:status", function (event, status) {
+ //alert("status: " + status);
+ })
+ })
+ })
+
+ .config(function ($stateProvider, $urlRouterProvider, $cordovaFacebookProvider, $cordovaAppRateProvider, $cordovaInAppBrowserProvider) {
+
+ if (!window.cordova) {
+ var appID = 1234567890;
+ var version = "v2.0"; // or leave blank and default is v2.0
+ //$cordovaFacebookProvider.browserInit(appID, version);
+ }
+
+ var browserOptions = {
+ location: "yes",
+ toolbar: "yes"
+ };
+
+
+ document.addEventListener("deviceready", function () {
+ var preferences = {
+ iosURL: "some URL",
+ appName: 'APP NAME',
+ language: 'fr'
+ };
+ $cordovaAppRateProvider.setPreferences(preferences);
+ }, false);
+
+ $cordovaInAppBrowserProvider.setDefaultOptions(browserOptions);
+
+ $stateProvider
+
+ .state('menu', {
+ url: "/menu",
+ templateUrl: "app/menu.html"
+ })
+
+ .state('about', {
+ url: "/about",
+ templateUrl: "app/about.html"
+ })
+
+ .state('appAvailability', {
+ url: '/appAvailability',
+ templateUrl: 'app/appAvailability/appAvailability.html',
+ controller: "AppAvailabilityCtrl"
+ })
+
+ .state('appRate', {
+ url: '/appRate',
+ templateUrl: 'app/appRate/appRate.html',
+ controller: "AppRateCtrl"
+ })
+
+
+ .state('barcodeScanner', {
+ url: '/barcodeScanner',
+ templateUrl: 'app/barcodeScanner/barcodeScanner.html',
+ controller: "BarcodeScannerCtrl"
+ })
+
+ .state('batteryStatus', {
+ url: '/batteryStatus',
+ templateUrl: 'app/batteryStatus/batteryStatus.html',
+ controller: "BatteryStatusCtrl"
+ })
+
+ .state('camera', {
+ url: '/camera',
+ templateUrl: 'app/camera/camera.html',
+ controller: "CameraCtrl"
+ })
+
+ .state('clipboard', {
+ url: '/clipboard',
+ templateUrl: 'app/clipboard/clipboard.html',
+ controller: "ClipboardCtrl"
+ })
+
+ .state('contacts', {
+ url: '/contacts',
+ templateUrl: 'app/contacts/contacts.html',
+ controller: "ContactsCtrl"
+ })
+
+
+ .state('datePicker', {
+ url: '/datePicker',
+ templateUrl: 'app/datePicker/datePicker.html',
+ controller: "DatePickerCtrl"
+ })
+
+ .state('device', {
+ url: '/device',
+ templateUrl: 'app/device/device.html',
+ controller: "DeviceCtrl"
+ })
+
+ .state('deviceMotion', {
+ url: '/deviceMotion',
+ templateUrl: 'app/deviceMotion/deviceMotion.html',
+ controller: "DeviceMotionCtrl"
+ })
+
+
+ .state('deviceOrientation', {
+ url: '/deviceOrientation',
+ templateUrl: 'app/deviceOrientation/deviceOrientation.html',
+ controller: "DeviceOrientationCtrl"
+ })
+
+ .state('dialogs', {
+ url: '/dialogs',
+ templateUrl: 'app/dialogs/dialogs.html',
+ controller: "DialogsCtrl"
+ })
+
+ .state('emailComposer', {
+ url: '/emailComposer',
+ templateUrl: 'app/emailComposer/emailComposer.html',
+ controller: "EmailComposerCtrl"
+ })
+
+ .state('facebook', {
+ url: '/facebook',
+ templateUrl: 'app/facebook/facebook.html',
+ controller: "FacebookCtrl"
+ })
+
+ .state('file', {
+ url: '/file',
+ templateUrl: 'app/file/file.html',
+ controller: "FileCtrl"
+ })
+
+ .state('fileTransfer', {
+ url: '/fileTransfer',
+ templateUrl: 'app/fileTransfer/fileTransfer.html',
+ controller: "FileTransferCtrl"
+ })
+
+ .state('fileOpener2', {
+ url: '/fileOpener2',
+ templateUrl: 'app/fileOpener2/fileOpener2.html',
+ controller: "FileOpener2Ctrl"
+ })
+
+ .state('flashlight', {
+ url: '/flashlight',
+ templateUrl: 'app/flashlight/flashlight.html',
+ controller: "FlashlightCtrl"
+ })
+
+ .state('geolocation', {
+ url: '/geolocation',
+ templateUrl: 'app/geolocation/geolocation.html',
+ controller: "GeolocationCtrl"
+ })
+
+ .state('globalization', {
+ url: '/global',
+ templateUrl: 'app/globalization/globalization.html',
+ controller: "GlobalizationCtrl"
+ })
+
+ .state('googleAnalytics', {
+ url: '/googleAnalytics',
+ templateUrl: 'app/googleAnalytics/googleAnalytics.html',
+ controller: "GoogleAnalyticsCtrl"
+ })
+
+ .state('healthkit', {
+ url: '/healthkit',
+ templateUrl: 'app/healthkit/healthkit.html',
+ controller: "HealthKitCtrl"
+ })
+
+ .state('inAppBrowser', {
+ url: '/inAppBrowser',
+ templateUrl: 'app/inAppBrowser/inAppBrowser.html',
+ controller: "InAppBrowserCtrl"
+ })
+
+ .state('localNotification', {
+ url: '/localNotification',
+ templateUrl: 'app/localNotification/localNotification.html',
+ controller: "LocalNotificationCtrl"
+ })
+
+ .state('media', {
+ url: '/media',
+ templateUrl: 'app/media/media.html',
+ controller: "MediaCtrl"
+ })
+
+ .state('network', {
+ url: '/network',
+ templateUrl: 'app/network/network.html',
+ controller: "NetworkCtrl"
+ })
+
+ .state('oauth', {
+ url: '/oauth',
+ templateUrl: 'app/oauth/oauth.html',
+ controller: "OauthCtrl"
+ })
+
+ .state('preferences', {
+ url: '/preferences',
+ templateUrl: 'app/preferences/preferences.html',
+ controller: "PreferencesCtrl"
+ })
+
+ .state('printer', {
+ url: '/printer',
+ templateUrl: 'app/printer/printer.html',
+ controller: "PrinterCtrl"
+ })
+
+ .state('pushNotifications', {
+ url: '/pushNotifications',
+ templateUrl: 'app/pushNotifications/pushNotifications.html',
+ controller: "PushNotificationsCtrl"
+ })
+
+ .state('socialSharing', {
+ url: '/socialSharing',
+ templateUrl: 'app/socialSharing/socialSharing.html',
+ controller: "SocialSharingCtrl"
+ })
+
+ .state('sqlite', {
+ url: '/sqlite',
+ templateUrl: 'app/sqlite/sqlite.html',
+ controller: "SqliteCtrl"
+ })
+
+
+ .state('statusbar', {
+ url: '/statusbar',
+ templateUrl: 'app/statusbar/statusbar.html',
+ controller: "StatusbarCtrl"
+ })
+
+
+ .state('toast', {
+ url: '/toast',
+ templateUrl: 'app/toast/toast.html',
+ controller: "ToastCtrl"
+ })
+
+ .state('touchid', {
+ url: '/touchid',
+ templateUrl: 'app/touchid/touchid.html',
+ controller: "TouchIDCtrl"
+ })
+
+ .state('vibration', {
+ url: '/vibration',
+ templateUrl: 'app/vibration/vibration.html',
+ controller: "VibrationCtrl"
+ });
+
+
+ $urlRouterProvider.otherwise('/menu');
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/appAvailability/appAvailability.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appAvailability/appAvailability.ctrl.js
new file mode 100644
index 0000000..a8e1568
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appAvailability/appAvailability.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.appAvailability.ctrl', [])
+
+ .controller('AppAvailabilityCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/appAvailability/appAvailability.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appAvailability/appAvailability.html
new file mode 100644
index 0000000..ef38ef9
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appAvailability/appAvailability.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/appRate/appRate.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appRate/appRate.ctrl.js
new file mode 100644
index 0000000..3708af9
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appRate/appRate.ctrl.js
@@ -0,0 +1,12 @@
+angular.module('demo.appRate.ctrl', [])
+
+ .controller('AppRateCtrl', function ($scope, $log, $cordovaAppRate) {
+
+ $scope.promptRating = function () {
+ $cordovaAppRate.promptForRating(true).then(function (result) {
+ console.log("result: " + result);
+ }, function (error) {
+ console.log("ERROR: " + error);
+ })
+ };
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/appRate/appRate.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appRate/appRate.html
new file mode 100644
index 0000000..a7c8c94
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/appRate/appRate.html
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+ Show rating reminder
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/barcodeScanner/barcodeScanner.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/barcodeScanner/barcodeScanner.ctrl.js
new file mode 100644
index 0000000..f913f80
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/barcodeScanner/barcodeScanner.ctrl.js
@@ -0,0 +1,15 @@
+angular.module('demo.barcodeScanner.ctrl', [])
+
+ .controller('BarcodeScannerCtrl', function ($scope, $cordovaBarcodeScanner) {
+
+ $scope.scan = function () {
+ $cordovaBarcodeScanner
+ .scan()
+ .then(function (result) {
+ $scope.scanResult = result;
+ }, function (err) {
+ $scope.scanResult = 'SCAN ERROR (see console)';
+ console.error(err);
+ });
+ };
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/barcodeScanner/barcodeScanner.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/barcodeScanner/barcodeScanner.html
new file mode 100644
index 0000000..e1e5467
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/barcodeScanner/barcodeScanner.html
@@ -0,0 +1,12 @@
+
+
+
+ Scan
+
+
Barcode Results
+
Text: {{scanResult.text}}
+
Format: {{scanResult.format}}
+
Cancelled: {{scanResult.cancelled}}
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/batteryStatus/batteryStatus.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/batteryStatus/batteryStatus.ctrl.js
new file mode 100644
index 0000000..86b3bc6
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/batteryStatus/batteryStatus.ctrl.js
@@ -0,0 +1,32 @@
+angular.module('demo.batteryStatus.ctrl', [])
+
+ .controller('BatteryStatusCtrl', function ($scope, $timeout, $cordovaBatteryStatus) {
+
+ console.log("battery status init");
+
+ document.addEventListener("deviceready", function () {
+ $scope.watch = function () {
+ console.log("watching battery");
+ $cordovaBatteryStatus.$on('batterystatus', function (result, info) {
+ $timeout(function () {
+ $scope.batteryLevel = info.level; // (0 - 100)
+ $scope.isPluggedIn = info.isPlugged; // bool
+ });
+ alert("Info " + info.level + " " + info.isPlugged);
+ });
+ };
+ }, false);
+
+
+ /*
+ $cordovaBatteryStatus.$on('batterycritical', function (result) {
+ $scope.batteryLevel = result.level; // (0 - 100)
+ $scope.isPluggedIn = result.isPlugged; // bool
+ });
+
+ $cordovaBatteryStatus.$on('batterylow', function (result) {
+ $scope.batteryLevel = result.level; // (0 - 100)
+ $scope.isPluggedIn = result.isPlugged; // bool
+ });
+ */
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/batteryStatus/batteryStatus.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/batteryStatus/batteryStatus.html
new file mode 100644
index 0000000..bd8edbb
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/batteryStatus/batteryStatus.html
@@ -0,0 +1,23 @@
+
+
+ Start Watch
+
+
+
+ Battery Level
+
+
+ {{batteryLevel}}
+
+
+
+
+
+ is Plugged in
+
+
+ {{isPluggedIn}}
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/camera/camera.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/camera/camera.ctrl.js
new file mode 100644
index 0000000..e88ca32
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/camera/camera.ctrl.js
@@ -0,0 +1,19 @@
+angular.module('demo.camera.ctrl', [])
+
+ .controller('CameraCtrl', function ($scope, $cordovaCamera) {
+ $scope.takePicture = function () {
+ var options = {
+ quality: 50,
+ destinationType: Camera.DestinationType.DATA_URL,
+ sourceType: Camera.PictureSourceType.CAMERA
+ };
+
+ // udpate camera image directive
+ $cordovaCamera.getPicture(options).then(function (imageData) {
+ $scope.cameraimage = "data:image/jpeg;base64," + imageData;
+ }, function (err) {
+ console.log('Failed because: ');
+ console.log(err);
+ });
+ };
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/camera/camera.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/camera/camera.html
new file mode 100644
index 0000000..e9b45e2
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/camera/camera.html
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+ Take a picture
+
+
+
+
+
+
+
+
+ Take Photo
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/clipboard/clipboard.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/clipboard/clipboard.ctrl.js
new file mode 100644
index 0000000..b142bc2
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/clipboard/clipboard.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.clipboard.ctrl', [])
+
+ .controller('ClipboardCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/clipboard/clipboard.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/clipboard/clipboard.html
new file mode 100644
index 0000000..a2981cb
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/clipboard/clipboard.html
@@ -0,0 +1,30 @@
+
+
+
+
+
This is some text to be copied
+
+
+
+
+
+ Copy!
+
+
+
+
+
+
+
+
+
+
+
+
+ Paste!
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/contacts/contacts.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/contacts/contacts.ctrl.js
new file mode 100644
index 0000000..891fd4d
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/contacts/contacts.ctrl.js
@@ -0,0 +1,31 @@
+angular.module('demo.contacts.ctrl', [])
+
+ .controller('ContactsCtrl', function ($scope, $log, $cordovaContacts) {
+
+ $scope.pickContact = function () {
+ document.addEventListener("deviceready", function () {
+ $cordovaContacts.pickContact().then(function (result) {
+ console.log(JSON.stringify(result));
+ $scope.selectedContact = result;
+ })
+ }, false);
+ };
+
+ $scope.saveContact = function (contact) {
+ document.addEventListener("deviceready", function () {
+ $cordovaContacts.save(contact).then(function (result) {
+ console.log(JSON.stringify(result));
+ })
+ }, false);
+ };
+
+
+ $scope.removeContact = function (contact) {
+ document.addEventListener("deviceready", function () {
+ $cordovaContacts.remove(contact).then(function (result) {
+ console.log(JSON.stringify(result));
+ })
+ }, false);
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/contacts/contacts.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/contacts/contacts.html
new file mode 100644
index 0000000..ffcb4e7
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/contacts/contacts.html
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
+ Pick a Contact from Phone
+
+
+
+
+
+
NAME: {{selectedContact.name.givenName}} {{selectedContact.name.familyName}}
+
+
+
+
+
+ Create new Contact
+
+
+
+
+
+
+ Create new Contact
+
+
+
+
+
+
+ Remove a Contact
+
+
+
+
+
+
+ Remove Contact
+
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/datePicker/datePicker.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/datePicker/datePicker.ctrl.js
new file mode 100644
index 0000000..968d256
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/datePicker/datePicker.ctrl.js
@@ -0,0 +1,27 @@
+angular.module('demo.datePicker.ctrl', [])
+
+ .controller('DatePickerCtrl', function ($scope, $cordovaDatePicker) {
+
+ var options,
+ dateType,
+ msg = 'not picked yet',
+ handleDatePicker = function (date) {
+ $scope.data[dateType] = date;
+ $scope.$apply();
+ };
+
+ $scope.data = {
+ date: msg,
+ time: msg
+ };
+
+ $scope.pick = function (type) {
+ options = {
+ date: new Date(),
+ mode: type
+ };
+ dateType = type;
+ $cordovaDatePicker.show(options, handleDatePicker);
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/datePicker/datePicker.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/datePicker/datePicker.html
new file mode 100644
index 0000000..ef87ae1
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/datePicker/datePicker.html
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+ {{ data.date }}
+
+ pick date
+
+
+
+
+ {{ data.time }}
+
+ pick time
+
+
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/device/device.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/device/device.ctrl.js
new file mode 100644
index 0000000..e7af9b1
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/device/device.ctrl.js
@@ -0,0 +1,24 @@
+angular.module('demo.device.ctrl', [])
+
+ .controller('DeviceCtrl', function ($scope, $state, $cordovaDevice) {
+
+ var init = function () {
+ console.log("initializing device");
+ try {
+ document.addEventListener("deviceready", function () {
+ $scope.available = $cordovaDevice.getDevice().available;
+ $scope.cordova = $cordovaDevice.getCordova();
+ $scope.model = $cordovaDevice.getModel();
+ $scope.platform = $cordovaDevice.getPlatform();
+ $scope.uuid = $cordovaDevice.getUUID();
+ $scope.version = $cordovaDevice.getVersion();
+ }, false);
+ }
+ catch (err) {
+ console.log("Error " + err.message);
+ alert("error " + err.$$failure.message);
+ }
+ };
+
+ init();
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/device/device.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/device/device.html
new file mode 100644
index 0000000..e1c90cf
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/device/device.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
Available
+
+
{{available}}
+
+
+
+
+
Platform
+
+
{{platform}}
+
+
+
Version
+
+
{{version}}
+
+
+
+
Cordova Version
+
+
{{cordova}}
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceMotion/deviceMotion.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceMotion/deviceMotion.ctrl.js
new file mode 100644
index 0000000..3e6ea37
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceMotion/deviceMotion.ctrl.js
@@ -0,0 +1,38 @@
+angular.module('demo.deviceMotion.ctrl', [])
+
+ .controller('DeviceMotionCtrl', function ($scope, $cordovaDeviceMotion) {
+ var watchID;
+
+ $cordovaDeviceMotion
+ .getCurrentAcceleration()
+ .then(function (motion) {
+ $scope.motion = motion;
+ console.log(motion);
+ }, function (err) {
+ $scope.msg = err.message;
+ console.log(err);
+ });
+
+
+ $scope.watchAcceleration = function () {
+ var options = { frequency: 3000 }; // Update every 3 seconds
+
+ $scope.this_watch = $cordovaDeviceMotion.watchAcceleration(options);
+
+ $scope.this_watch.promise.then(
+ function () { /* unused */
+ },
+ function (err) {
+ $scope.msg = err.message;
+ },
+ function (motion) {
+ $scope.motion = motion;
+ });
+ };
+
+ $scope.clearWatch = function () {
+ // use watchID from watchAccelaration()
+ $cordovaDeviceMotion.clearWatch($scope.this_watch.watchId);
+ };
+ });
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceMotion/deviceMotion.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceMotion/deviceMotion.html
new file mode 100644
index 0000000..c17e034
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceMotion/deviceMotion.html
@@ -0,0 +1,43 @@
+
+
+
+
+
+ Acceleration
+
+
+ {{msg}}
+
+
+ X   {{motion.x}}
+
+
+ Y   {{motion.y}}
+
+
+
+ Z   {{motion.z}}
+
+
+ Time   {{motion.timestamp}}
+
+
+
+
+
+ Get Device Motion
+
+
+
+
+ Watch
+
+
+
+ Clear
+
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceOrientation/deviceOrientation.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceOrientation/deviceOrientation.ctrl.js
new file mode 100644
index 0000000..c3c562f
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceOrientation/deviceOrientation.ctrl.js
@@ -0,0 +1,41 @@
+angular.module('demo.deviceOrientation.ctrl', [])
+
+ .controller('DeviceOrientationCtrl', function ($scope, $timeout, $cordovaDeviceOrientation) {
+
+ var options = {frequency: 1000}; // Update every 1 seconds
+
+ $scope.getHeading = function () {
+ $cordovaDeviceOrientation
+ .getCurrentHeading()
+ .then(function (position) {
+ $scope.heading = position;
+ }, function (err) {
+ $scope.msg = err.message;
+ });
+ };
+
+
+ $scope.watchHeading = function () {
+ $scope.this_watch = $cordovaDeviceOrientation.watchHeading(options);
+
+ $scope.this_watch.then(
+ function () {
+ /* unused */
+ },
+ function (err) {
+ $scope.msg = err.message;
+ },
+ function (position) {
+ $timeout(function () {
+ $scope.heading = position;
+ });
+ }
+ );
+
+ };
+
+ $scope.clearWatch = function () {
+ $cordovaDeviceOrientation.clearWatch($scope.this_watch.watchID);
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceOrientation/deviceOrientation.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceOrientation/deviceOrientation.html
new file mode 100644
index 0000000..e4f8e01
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/deviceOrientation/deviceOrientation.html
@@ -0,0 +1,40 @@
+
+
+
+
+
+ Compass Tool
+
+
+
+ Magnetic Heading   {{heading.magneticHeading}}
+
+
+ True Heading   {{heading.trueHeading}}
+
+
+ Accuracy   {{heading.headingAccuracy}}
+
+
+ Timestamp   {{heading.timestamp}}
+
+
+
+
+
+
+ Get Current Heading
+
+
+
+
+ Watch
+
+
+
+ Clear
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/dialogs/dialogs.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/dialogs/dialogs.ctrl.js
new file mode 100644
index 0000000..3f3370c
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/dialogs/dialogs.ctrl.js
@@ -0,0 +1,33 @@
+angular.module('demo.dialogs.ctrl', [])
+
+ .controller('DialogsCtrl', function ($scope, $cordovaDialogs) {
+
+ $scope.action = "Press any button";
+
+ $scope.alert = function () {
+ $scope.action = "Alert";
+ $cordovaDialogs.alert('Wow!');
+ };
+
+ $scope.confirm = function () {
+ $scope.action = "Confirm";
+ $cordovaDialogs.confirm('Are you sure?', "Custom title").then(function (buttonIndex) {
+ $cordovaDialogs.alert("Button index : " + buttonIndex);
+ });
+ };
+
+ $scope.prompt = function () {
+ $scope.action = "Prompt";
+ $cordovaDialogs.prompt('Please Login', "Custom title").then(function (result) {
+ $cordovaDialogs.alert("Input: " + result.input1 + "\n Button index : " + result.buttonIndex);
+ });
+ };
+
+ $scope.beep = function () {
+ $scope.action = "Beep";
+ $cordovaDialogs.beep(3);
+ };
+
+
+ });
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/dialogs/dialogs.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/dialogs/dialogs.html
new file mode 100644
index 0000000..d139410
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/dialogs/dialogs.html
@@ -0,0 +1,32 @@
+
+
+
+
+
+ {{action}}
+
+
+
+ Alert
+
+
+
+
+
+ Confirm
+
+
+
+
+
+ Prompt
+
+
+
+
+ Beep
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/emailComposer/emailComposer.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/emailComposer/emailComposer.ctrl.js
new file mode 100644
index 0000000..fd0d225
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/emailComposer/emailComposer.ctrl.js
@@ -0,0 +1,41 @@
+angular.module('demo.emailComposer.ctrl', [])
+
+ .controller('EmailComposerCtrl', function ($scope, $cordovaEmailComposer) {
+
+ document.addEventListener("deviceready", function () {
+ $cordovaEmailComposer.isAvailable().then(function () {
+ alert("Email composer is available")
+ }, function () {
+ alert("Email composer is NOT available")
+ });
+ }, false);
+
+
+
+ $cordovaEmailComposer.isAvailable().then(function () {
+ // is available
+ }, function () {
+ // not available
+ });
+
+ var email = {
+ to: 'max@mustermann.de',
+ cc: 'erika@mustermann.de',
+ bcc: ['john@doe.com', 'jane@doe.com'],
+ attachments: [
+ 'file://img/logo.png',
+ 'res://icon.png',
+ 'base64:icon.png//iVBORw0KGgoAAAANSUhEUg...',
+ 'file://README.pdf'
+ ],
+ subject: 'Cordova Icons',
+ body: 'How are you? Nice greetings from Leipzig',
+ isHtml: true
+ };
+
+ $cordovaEmailComposer.open(email).then(null, function () {
+ // user cancelled email
+ });
+
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/emailComposer/emailComposer.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/emailComposer/emailComposer.html
new file mode 100644
index 0000000..2f041b0
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/emailComposer/emailComposer.html
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/facebook/facebook.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/facebook/facebook.ctrl.js
new file mode 100644
index 0000000..4b10b21
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/facebook/facebook.ctrl.js
@@ -0,0 +1,42 @@
+angular.module('demo.facebook.ctrl', [])
+
+ .controller('FacebookCtrl', function ($scope, $log, $cordovaFacebook) {
+
+
+ $scope.getLoginStatus = function () {
+ $cordovaFacebook.getLoginStatus().then(function (status) {
+ $scope.status = status;
+ }, function (error) {
+ $scope.status = error;
+ })
+ };
+
+ $scope.login = function () {
+ $cordovaFacebook.login(["public_profile"]).then(function (success) {
+ $scope.loginInfo = success;
+ }, function (error) {
+ $scope.error = error;
+ alert(error);
+ })
+ };
+
+
+ $scope.logout = function () {
+ $cordovaFacebook.logout().then(function (success) {
+ console.log(success);
+ }, function (error) {
+ $scope.error = error;
+ alert(error);
+ })
+ };
+
+ $scope.getMe = function () {
+ $scope.me = ["refreshing..."];
+ $cordovaFacebook.api("me", null).then(function (success) {
+ $scope.me = success;
+ }, function (error) {
+ $scope.error = error;
+ })
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/facebook/facebook.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/facebook/facebook.html
new file mode 100644
index 0000000..d1d8d9d
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/facebook/facebook.html
@@ -0,0 +1,36 @@
+
+
+
+ Login
+
+ Login info
+
+ {{info}}
+
+
+
+
Login Info
+
{{info}}
+
+
+ Check Login Status
+
+
+
Login Status
+
{{info}}
+
+
+ API - get Me
+
+ Api Me info
+
+
+
Api Me info
+
{{info}}
+
+
+ Logout
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/file/file.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/file/file.ctrl.js
new file mode 100644
index 0000000..3b27f3f
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/file/file.ctrl.js
@@ -0,0 +1,234 @@
+angular.module('demo.file.ctrl', [])
+
+ .controller('FileCtrl', function ($scope, $log, $cordovaFile, $window, $q, $cordovaFileError) {
+
+ $scope.inputs = {
+ checkDir: "test_directory",
+ checkFile: "test_file.txt",
+ createDirectory: "test_directory",
+ createFile: "test_file.txt",
+ removeDirectory: "test_directory",
+ removeFile: "test_file.txt",
+ removeRecursively: "test_directory/test_file.txt",
+ writeText: "THIS TEXT IS WRITTEN TO THIS FILE",
+ writeFile: "test_file.txt",
+ writeExistingText: "Write this text to an existing file",
+ writeExistingFile: "test_file.txt",
+ readFile: "test_file.txt",
+ moveDirectory: "test_directory",
+ moveFile: "test_file.txt",
+ copyDirectory: "test_directory",
+ copyFile: "test_file.txt"
+ };
+
+ $scope.test = function () {
+ document.addEventListener('deviceready', function () {
+
+ var newPath = cordova.file.applicationDirectory;
+ var test = DirectoryEntry(newPath);
+
+ console.log(test);
+ console.log(DirectoryEntry);
+ /*
+ try {
+ var path = cordova.file.applicationDirectory;
+ var newFileName;
+ var fileName = newFileName = "test_file.txt";
+ var newPath = cordova.file.tempDirectory;
+
+ var q = $q.defer();
+ $window.resolveLocalFileSystemURL(path, function (fileSystem) {
+ fileSystem.getFile(fileName, {create: false}, function (fileEntry) {
+
+ var newPathName = newPath.substring(newPath.lastIndexOf('/'));
+
+ console.log(newPathName);
+
+ //var parentEntry = new DirectoryEntry(newPathName, newPath);
+ fileEntry.moveTo(newPath, newFileName, function (result) {
+ console.log(result)
+ }, function (error) {
+ console.log(error)
+ });
+
+ }, function (err) {
+ console.log(err);
+ });
+ }, function (er) {
+ console.log(er);
+ });
+ } catch (e) {
+ console.log(e);
+ }
+
+ */
+ });
+ };
+
+
+ $scope.checkDir = function () {
+ document.addEventListener('deviceready', function () {
+ // path, directory
+ $cordovaFile.checkDir(cordova.file.dataDirectory, $scope.inputs.checkDir).then(function (success) {
+ $scope.checkDirResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.checkDirResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.checkFile = function () {
+ document.addEventListener('deviceready', function () {
+ // path, file
+ $cordovaFile.checkFile(cordova.file.dataDirectory, $scope.inputs.checkFile).then(function (success) {
+ $scope.checkFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.checkFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.createDirectory = function () {
+ document.addEventListener('deviceready', function () {
+ // path, dirName, replace?
+ $cordovaFile.createDir(cordova.file.dataDirectory, $scope.inputs.createDirectory, false).then(function (success) {
+ $scope.createDirectoryResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.createDirectoryResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+ $scope.createFile = function () {
+ document.addEventListener('deviceready', function () {
+ // path, fileName, replace?
+ $cordovaFile.createFile(cordova.file.dataDirectory, $scope.inputs.createFile, true).then(function (success) {
+ $scope.createFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.createFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.removeFile = function () {
+ document.addEventListener('deviceready', function () {
+ // path, fileName
+ $cordovaFile.removeFile(cordova.file.dataDirectory, $scope.inputs.removeFile).then(function (success) {
+ $scope.removeFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.removeFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.removeDirectory = function () {
+ document.addEventListener('deviceready', function () {
+ // path, dirName
+ $cordovaFile.removeDir(cordova.file.dataDirectory, $scope.inputs.removeDirectory).then(function (success) {
+ $scope.removeDirectoryResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.removeDirectoryResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.removeRecursively = function () {
+ document.addEventListener('deviceready', function () {
+ // path, dirName
+ $cordovaFile.removeRecursively(cordova.file.dataDirectory, $scope.inputs.removeDirectory).then(function (success) {
+ $scope.removeRecursivelyResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.removeRecursivelyResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.writeFile = function () {
+ document.addEventListener('deviceready', function () {
+ // path, fileName, text, replace?
+ $cordovaFile.writeFile(cordova.file.dataDirectory, $scope.inputs.writeFile, $scope.inputs.writeText, true).then(function (success) {
+ $scope.writeFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.writeFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.writeExistingFile = function () {
+ document.addEventListener('deviceready', function () {
+ // path, fileName, text
+ $cordovaFile.writeExistingFile(cordova.file.dataDirectory, $scope.inputs.writeExistingFile, $scope.inputs.writeExistingText).then(function (success) {
+ $scope.writeExistingFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.writeExistingFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.readFileAsText = function () {
+ document.addEventListener('deviceready', function () {
+ // path, fileName
+ $cordovaFile.readAsText(cordova.file.dataDirectory, $scope.inputs.readFile).then(function (success) {
+ $scope.readFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.readFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+ $scope.moveDir = function () {
+ document.addEventListener('deviceready', function () {
+ // path, DirName, newPath, newDirName
+ $cordovaFile.moveDir(cordova.file.dataDirectory, $scope.inputs.moveDirectory, cordova.file.tempDirectory, "new_directory").then(function (success) {
+ $scope.moveDirectoryResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.moveDirectoryResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.moveFile = function () {
+ document.addEventListener('deviceready', function () {
+ // path, fileName, newPath, newFileName
+ $cordovaFile.moveFile(cordova.file.dataDirectory, $scope.inputs.moveFile, cordova.file.tempDirectory, "new_file.txt").then(function (success) {
+ $scope.moveFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.moveFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.copyDir = function () {
+ document.addEventListener('deviceready', function () {
+ // path, dirName, newPath, dirFileName
+ $cordovaFile.copyDir(cordova.file.dataDirectory, $scope.inputs.copyDirectory, cordova.file.tempDirectory, "new_directory").then(function (success) {
+ $scope.copyDirectoryResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.copyDirectoryResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+
+ $scope.copyFile = function () {
+ document.addEventListener('deviceready', function () {
+ // path, fileName, newPath, newFileName
+ $cordovaFile.copyFile(cordova.file.dataDirectory, $scope.inputs.copyFile, cordova.file.tempDirectory, "new_file.txt").then(function (success) {
+ $scope.copyFileResult = 'success ' + JSON.stringify(success);
+ }, function (error) {
+ $scope.copyFileResult = 'error ' + JSON.stringify(error);
+ });
+ });
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/file/file.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/file/file.html
new file mode 100644
index 0000000..b94d010
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/file/file.html
@@ -0,0 +1,283 @@
+
+
+
+ test
+
+
+ CHECK
+
+
+
+ Check Directory
+
+
+
+
+
+
+ Check Directory
+
+
+
+ {{checkDirResult}}
+
+
+
+
+
+
+ Check File
+
+
+
+
+
+
+ Check File
+
+
+
+ {{checkFileResult}}
+
+
+
+ CREATE
+
+
+
+ Create Directory
+
+
+
+
+
+
+ Create Directory
+
+
+
+ {{createDirectoryResult}}
+
+
+
+
+
+
+ Create File
+
+
+
+
+
+
+ Create File
+
+
+
+ {{createFileResult}}
+
+
+
+
+ REMOVE
+
+
+
+
+ Remove File
+
+
+
+
+
+
+ Remove File
+
+
+
+ {{removeFileResult}}
+
+
+
+
+
+
+ Remove Directory
+
+
+
+
+
+
+ Remove Directory
+
+
+
+ {{removeDirectoryResult}}
+
+
+
+
+
+
+ Remove Recursively
+
+
+
+
+
+
+ Remove Recursive
+
+
+
+ {{removeRecursivelyResult}}
+
+
+
+
+ WRITE
+
+
+
+
+ Write File
+
+
+
+
+
+
+
+
+
+
+
+ Write File
+
+
+
+ {{writeFileResult}}
+
+
+
+
+
+
+ Write Existing File
+
+
+
+
+
+
+
+
+
+
+
+ Write Existing File
+
+
+
+ {{writeExistingFileResult}}
+
+
+
+ READ
+
+
+
+
+ Read File As Text
+
+
+
+
+
+
+ Read File
+
+
+
+ {{readFileResult}}
+
+
+
+
+ MOVE
+
+
+
+
+ Move Directory
+
+
+
+
+
+
+ Move File
+
+
+
+ {{moveDirectoryResult}}
+
+
+
+
+
+
+ Move File
+
+
+
+
+
+
+ Move File
+
+
+
+ {{moveFileResult}}
+
+
+
+ COPY
+
+
+
+ Copy Directory
+
+
+
+
+
+
+ Copy Directory
+
+
+
+ {{copyDirectoryResult}}
+
+
+
+
+
+ Copy File
+
+
+
+
+
+
+ Copy File
+
+
+
+ {{copyFileResult}}
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileOpener2/fileOpener2.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileOpener2/fileOpener2.ctrl.js
new file mode 100644
index 0000000..e8e5562
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileOpener2/fileOpener2.ctrl.js
@@ -0,0 +1,25 @@
+angular.module('demo.fileOpener2.ctrl', [])
+
+ .controller('FileOpener2Ctrl', function ($scope, $log, $cordovaFileOpener2) {
+
+ $scope.packageId = '';
+ $scope.type = '';
+
+ $scope.logs = '';
+
+ $scope.open = function() {
+ $cordovaFileOpener2.open(
+ $scope.packageId,
+ $scope.type
+ ).then(
+ function(){
+ $scope.logs = 'Success';
+ },
+ function(error) {
+ alert('error code: '+error.code+' , message: '+error.message);
+ $scope.logs = 'error code: '+error.code+' , message: '+error.message;
+ }
+ );
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileOpener2/fileOpener2.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileOpener2/fileOpener2.html
new file mode 100644
index 0000000..f8f0908
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileOpener2/fileOpener2.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+ Open
+
+
+
+ {{ logs }}
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileTransfer/fileTransfer.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileTransfer/fileTransfer.ctrl.js
new file mode 100644
index 0000000..8463bae
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileTransfer/fileTransfer.ctrl.js
@@ -0,0 +1,32 @@
+angular.module('demo.fileTransfer.ctrl', [])
+
+ .controller('FileTransferCtrl', function ($scope, $rootScope, $cordovaFileTransfer, $timeout) {
+
+ $scope.downloadFile = function () {
+ document.addEventListener('deviceready', function () {
+ var url = "http://cdn.wall-pix.net/albums/art-space/00030109.jpg";
+ var fileDir = cordova.file.documentsDirectory + "testImage.png";
+
+ var download = $cordovaFileTransfer.download(url, fileDir).then(function (success) {
+ console.log("success " + JSON.stringify(success));
+ $timeout(function () {
+ $scope.downloadProgress = 100
+ }, 1000);
+ }, function (error) {
+ console.log("Error " + JSON.stringify(error));
+ }, function (progress) {
+ $timeout(function () {
+ $scope.downloadProgress = (progress.loaded / progress.total) * 100;
+
+ });
+ });
+
+
+ if ($scope.downloadProgress > 0.1) {
+ download.abort();
+ }
+ })
+ };
+
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileTransfer/fileTransfer.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileTransfer/fileTransfer.html
new file mode 100644
index 0000000..ce3d90b
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/fileTransfer/fileTransfer.html
@@ -0,0 +1,12 @@
+
+
+
+ Download File
+
+
+
+ Progress : {{downloadProgress}}%
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/flashlight/flashlight.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/flashlight/flashlight.ctrl.js
new file mode 100644
index 0000000..b19db3b
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/flashlight/flashlight.ctrl.js
@@ -0,0 +1,11 @@
+angular.module('demo.flashlight.ctrl', [])
+
+ .controller('FlashlightCtrl', function ($scope, $cordovaFlashlight) {
+ $scope.on = function () {
+ $cordovaFlashlight.switchOn();
+ };
+ $scope.off = function () {
+ $cordovaFlashlight.switchOff();
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/flashlight/flashlight.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/flashlight/flashlight.html
new file mode 100644
index 0000000..098c71a
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/flashlight/flashlight.html
@@ -0,0 +1,11 @@
+
+
+
+
+
+ On
+
+ Off
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/geolocation/geolocation.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/geolocation/geolocation.ctrl.js
new file mode 100644
index 0000000..bf8bc11
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/geolocation/geolocation.ctrl.js
@@ -0,0 +1,20 @@
+angular.module('demo.geolocation.ctrl', [])
+
+ .controller('GeolocationCtrl', function ($scope, $cordovaGeolocation) {
+
+ $scope.getLocation = function () {
+
+ $cordovaGeolocation
+ .getCurrentPosition({timeout: 10000, enableHighAccuracy: false})
+ .then(function (position) {
+ console.log("position found");
+ $scope.position = position;
+ // long = position.coords.longitude
+ // lat = position.coords.latitude
+ }, function (err) {
+ console.log("unable to find location");
+ $scope.errorMsg = "Error : " + err.message;
+ });
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/geolocation/geolocation.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/geolocation/geolocation.html
new file mode 100644
index 0000000..cf721ba
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/geolocation/geolocation.html
@@ -0,0 +1,27 @@
+
+
+
+
+
+ Get My Current Location
+
+
+ Longitude   {{position.coords.longitude}}
+
+
+
+ Latitude   {{position.coords.latitude}}
+
+
+
+
+
+
+ Get My Location
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/globalization/globalization.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/globalization/globalization.ctrl.js
new file mode 100644
index 0000000..6e94757
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/globalization/globalization.ctrl.js
@@ -0,0 +1,50 @@
+angular.module('demo.globalization.ctrl', [])
+
+ .controller('GlobalizationCtrl', function ($scope, $cordovaGlobalization) {
+
+
+ function init() {
+ $cordovaGlobalization.getPreferredLanguage().then(
+ function (result) {
+ $scope.language = result.value;
+ },
+ function (error) {
+ $scope.language = err.message;
+ });
+
+ $cordovaGlobalization.getLocaleName().then(
+ function (result) {
+ $scope.locale = result.value;
+ },
+ function (error) {
+ $scope.locale = err.message;
+ });
+
+ $cordovaGlobalization.getFirstDayOfWeek().then(
+ function (result) {
+ $scope.fdow = result.value;
+ },
+ function (error) {
+ $scope.fdow = err.message;
+ });
+ }
+
+ $scope.refresh = function () {
+ init();
+ };
+
+
+ init();
+
+
+ // Soon implemented:
+ // dateToString
+ // stringToDate
+ // getDatePattern
+ // getDateNames
+ // isDayLightSavingsTime
+ // numberToString
+ // stringToNumber
+ // getNumberPattern
+ // getCurrencyPattern
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/globalization/globalization.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/globalization/globalization.html
new file mode 100644
index 0000000..cb214ed
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/globalization/globalization.html
@@ -0,0 +1,25 @@
+
+
+
+
+ Globalization Values
+
+
+ Language   {{language}}
+
+
+ Locale   {{locale}}
+
+
+ First Day of Week   {{fdow}}
+
+
+
+
+
+
+ Refresh
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/googleAnalytics/googleAnalytics.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/googleAnalytics/googleAnalytics.ctrl.js
new file mode 100644
index 0000000..8d4dc12
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/googleAnalytics/googleAnalytics.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.googleAnalytics.ctrl', [])
+
+ .controller('GoogleAnalyticsCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/googleAnalytics/googleAnalytics.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/googleAnalytics/googleAnalytics.html
new file mode 100644
index 0000000..ace262c
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/googleAnalytics/googleAnalytics.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/healthkit/healthkit.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/healthkit/healthkit.ctrl.js
new file mode 100644
index 0000000..d9f44ee
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/healthkit/healthkit.ctrl.js
@@ -0,0 +1,53 @@
+angular.module('demo.healthkit.ctrl', [])
+
+ .controller('HealthKitCtrl', function($scope, $cordovaHealthKit) {
+
+ $cordovaHealthKit.isAvailable().then(function(success) {
+ alert('HealthKit Available');
+ }, function(err) {
+ alert('HealthKit NOT Available');
+ });
+
+ $scope.request = function() {
+ $cordovaHealthKit.requestAuthorization().then(function(success) {
+ $scope.granted = true;
+ }, function(err) {
+ $scope.granted = false;
+ });
+ };
+ $scope.checkAuth = function() {
+ $cordovaHealthKit.checkAuthStatus().then(function(success) {
+ $scope.granted = true;
+ }, function(err) {
+ $scope.granted = false;
+ });
+ };
+ $scope.readDOB = function() {
+ $cordovaHealthKit.readDateOfBirth().then(function(dob) {
+ alert('DOB ' + dob);
+ }, function(err) {
+ alert(err);
+ });
+ };
+ $scope.readGender = function() {
+ $cordovaHealthKit.readGender().then(function(gender) {
+ alert('Gender ' + gender);
+ }, function(err) {
+ alert(err);
+ });
+ };
+ $scope.readWeight = function() {
+ $cordovaHealthKit.readWeight().then(function(v) {
+ alert('Weight ' + JSON.stringify(v));
+ }, function(err) {
+ alert(err);
+ });
+ };
+ $scope.readHeight = function() {
+ $cordovaHealthKit.readHeight().then(function(v) {
+ alert('Height ' + JSON.stringify(v));
+ }, function(err) {
+ alert(err);
+ });
+ }
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/healthkit/healthkit.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/healthkit/healthkit.html
new file mode 100644
index 0000000..f6f75af
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/healthkit/healthkit.html
@@ -0,0 +1,14 @@
+
+
+ HealthKit
+
+ Authorization: Granted Not granted
+
+ Check Authorization
+ Request Authorization
+ DOB
+ Gender
+ Weight
+ Height
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/inAppBrowser/inAppBrowser.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/inAppBrowser/inAppBrowser.ctrl.js
new file mode 100644
index 0000000..98da39e
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/inAppBrowser/inAppBrowser.ctrl.js
@@ -0,0 +1,34 @@
+angular.module('demo.inAppBrowser.ctrl', [])
+
+ .controller('InAppBrowserCtrl', function ($scope, $rootScope, $cordovaInAppBrowser) {
+ $scope.openBrowser = function () {
+ document.addEventListener('deviceready', function () {
+
+ var options = {
+ location: "no"
+ };
+
+ $cordovaInAppBrowser.open('http://ngcordova.com', '_blank', options).then(function () {
+ console.log("InAppBrowser opened http://ngcordova.com successfully");
+ }, function (error) {
+ console.log("Error: " + error);
+ });
+
+ }, false);
+ };
+
+ document.addEventListener('deviceready', function () {
+
+ $rootScope.$on("$cordovaInAppBrowser:exit", function (event, result) {
+ alert("Exited Browser");
+ console.log(JSON.stringify(result));
+ });
+
+
+ $rootScope.$on("$cordovaInAppBrowser:loadstop", function (event, result) {
+ alert("Load Stop event");
+ console.log(JSON.stringify(result));
+ })
+ }, false);
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/inAppBrowser/inAppBrowser.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/inAppBrowser/inAppBrowser.html
new file mode 100644
index 0000000..9afe3e9
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/inAppBrowser/inAppBrowser.html
@@ -0,0 +1,6 @@
+
+
+
+ Open Browser
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/insomnia/insomnia.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/insomnia/insomnia.ctrl.js
new file mode 100644
index 0000000..b84645c
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/insomnia/insomnia.ctrl.js
@@ -0,0 +1,9 @@
+module.controller('MyCtrl', function($cordovaInsomnia) {
+
+ //Keep Screen on | prevent screen sleep
+ $cordovaInsomnia.keepAwake();
+
+ //return to standard. Aloow Sleep Again
+ $cordovaInsomnia.allowSleepAgain();
+
+});
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/localNotification/localNotification.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/localNotification/localNotification.ctrl.js
new file mode 100644
index 0000000..5a6d721
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/localNotification/localNotification.ctrl.js
@@ -0,0 +1,30 @@
+angular.module('demo.localNotification.ctrl', [])
+
+ .controller('LocalNotificationCtrl', function ($scope, $rootScope, $cordovaLocalNotification) {
+
+ $scope.addNotification = function () {
+ var now = new Date();
+ var _60_seconds_from_now = new Date(now + 60 * 1000);
+ var event = {
+ id: 1,
+ at: _60_seconds_from_now,
+ title: "Test Event",
+ text: "this is a message about the event"
+ };
+
+ document.addEventListener("deviceready", function () {
+ $cordovaLocalNotification.schedule(event).then(function () {
+ console.log("local add : success");
+ });
+
+ }, false);
+
+ };
+
+ document.addEventListener("deviceready", function () {
+ $rootScope.$on("$cordovaLocalNotification:trigger", function (event, notification, state) {
+ console.log("notification id:" + notification.id + " state: " + state);
+ });
+ }, false);
+ });
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/localNotification/localNotification.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/localNotification/localNotification.html
new file mode 100644
index 0000000..57b9619
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/localNotification/localNotification.html
@@ -0,0 +1,6 @@
+
+
+
+ Add Notification
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/media.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/media.ctrl.js
new file mode 100644
index 0000000..31f04fd
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/media.ctrl.js
@@ -0,0 +1,20 @@
+angular.module('demo.media.ctrl', [])
+
+ .controller('MediaCtrl', function ($scope, $ionicPlatform, $cordovaMedia) {
+ var thisMedia;
+
+ $ionicPlatform.ready(function () {
+ thisMedia = $cordovaMedia.newMedia('/sample.mp3');
+ });
+
+
+ $scope.playMedia = function () {
+ thisMedia.play();
+ console.log("play media");
+ };
+
+ $scope.stopMedia = function () {
+ thisMedia.pause();
+ };
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/media.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/media.html
new file mode 100644
index 0000000..3fe8a5b
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/media.html
@@ -0,0 +1,11 @@
+
+
+
+
+ Play
+
+
+ {{media}}
+ Stop
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/sample.mp3 b/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/sample.mp3
new file mode 100644
index 0000000..44fc533
Binary files /dev/null and b/HybridMobile App using Ionic Framework/CodeCamp/www/app/media/sample.mp3 differ
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/menu.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/menu.html
new file mode 100644
index 0000000..b238683
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/menu.html
@@ -0,0 +1,187 @@
+
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/network/network.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/network/network.ctrl.js
new file mode 100644
index 0000000..5f2b5dc
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/network/network.ctrl.js
@@ -0,0 +1,22 @@
+angular.module('demo.network.ctrl', [])
+
+ .controller('NetworkCtrl', function ($scope, $cordovaNetwork) {
+ $scope.networkType = null;
+ $scope.connectionType = null;
+
+ document.addEventListener("deviceready", function () {
+ $scope.networkType = $cordovaNetwork.getNetwork();
+
+ if ($cordovaNetwork.isOnline()) {
+ $scope.connectionType = 'Online';
+ }
+ else if ($cordovaNetwork.isOffline()) {
+ $scope.connectionType = 'Offline';
+ }
+ else {
+ $scope.errorMsg = 'Error getting isOffline / isOnline methods';
+ }
+ }, false);
+
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/network/network.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/network/network.html
new file mode 100644
index 0000000..a5e9774
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/network/network.html
@@ -0,0 +1,19 @@
+
+
+
+
+
+ You are currently   {{connectionType}}
+
+
+ Network Type   {{networkType}}
+
+
+
+
+
+ Refresh
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/oauth/oauth.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/oauth/oauth.ctrl.js
new file mode 100644
index 0000000..7083a74
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/oauth/oauth.ctrl.js
@@ -0,0 +1,132 @@
+angular.module('demo.oauth.ctrl', [])
+
+ .controller('OauthCtrl', function ($scope, $cordovaOauth) {
+
+ $scope.instagramLogin = function () {
+ $cordovaOauth.instagram("CLIENT_ID_HERE", ["basic", "likes"]).then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.digitalOceanLogin = function () {
+ $cordovaOauth.digitalOcean("CLIENT_ID_HERE", "CLIENT_SECRET_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.dropboxLogin = function () {
+ $cordovaOauth.dropbox("APP_ID_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.googleLogin = function () {
+ $cordovaOauth.google("CLIENT_ID_HERE", ["https://www.googleapis.com/auth/urlshortener", "https://www.googleapis.com/auth/userinfo.email"]).then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.githubLogin = function () {
+ $cordovaOauth.github("CLIENT_ID_HERE", "CLIENT_SECRET_HERE", ["user"]).then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.facebookLogin = function () {
+ $cordovaOauth.facebook("CLIENT_ID_HERE", ["email"]).then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.linkedinLogin = function () {
+ $cordovaOauth.linkedin("CLIENT_ID_HERE", "CLIENT_SECRET_HERE", ["r_emailaddress"], "RANDOM_STATE_STRING_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.boxLogin = function () {
+ $cordovaOauth.box("CLIENT_ID_HERE", "CLIENT_SECRET_HERE", "RANDOM_STATE_STRING_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.redditLogin = function () {
+ $cordovaOauth.reddit("CLIENT_ID_HERE", "CLIENT_SECRET_HERE", ["edit"]).then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.twitterLogin = function () {
+ $cordovaOauth.twitter("CONSUMER_ID_HERE", "CONSUMER_SECRET_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.meetupLogin = function () {
+ $cordovaOauth.meetup("CONSUMER_ID_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.foursquareLogin = function () {
+ $cordovaOauth.foursquare("CLIENT_ID_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.salesforceLogin = function () {
+ $cordovaOauth.salesforce("LOGIN_URL_HERE", "CLIENT_ID_HERE").then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+ $scope.stravaLogin = function () {
+ $cordovaOauth.strava("CLIENT_ID_HERE", "CLIENT_SECRET_HERE", ["SCOPE1", "SCOPE2"]).then(function (result) {
+ $scope.oauthResult = result;
+ }, function (error) {
+ $scope.oauthResult = "OAUTH ERROR (see console)";
+ console.log(error);
+ });
+ };
+
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/oauth/oauth.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/oauth/oauth.html
new file mode 100644
index 0000000..3eab998
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/oauth/oauth.html
@@ -0,0 +1,22 @@
+
+
+
+ Instagram
+ Facebook
+ Google
+ LinkedIn
+ Dropbox
+ Digital Ocean
+ GitHub
+ Box
+ Reddit
+ Twitter
+ Meetup
+ Foursquare
+ Salesforce
+ Strava
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/preferences/preferences.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/preferences/preferences.ctrl.js
new file mode 100644
index 0000000..e9bde1a
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/preferences/preferences.ctrl.js
@@ -0,0 +1,33 @@
+angular.module('demo.preferences.ctrl', [])
+
+ .controller('PreferencesCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ var key = 'exampleKey';
+ $scope.data = {};
+ $scope.data.showMore = false;
+ $scope.data.key = key;
+
+ $scope.preferencesSet = function () {
+ $cordovaPreferences.set(key, $scope.data.value)
+ .then(function (result) {
+ if (result) {
+ $log.log(key + ' was succesfully set to:', $scope.data.value);
+ $scope.data.showMore = true;
+ } else {
+ $log.log(key + ' was not set to: ' + $scope.data.value + ' we got ', result);
+ }
+ }, function (err) {
+ $log.log(key + ' was not set to: ' + $scope.data.value + ' due to', err);
+ });
+ };
+
+ $scope.preferencesGet = function () {
+ $cordovaPreferences.get(key)
+ .then(function (value) {
+ $log.log(key + ' get was succesfully:', value);
+ $scope.data.pref = value;
+ }, function (err) {
+ $log.log(key + ' get was not succesfully: ' + $scope.data.value + ' due to', err);
+ });
+ };
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/preferences/preferences.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/preferences/preferences.html
new file mode 100644
index 0000000..f0dc2bd
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/preferences/preferences.html
@@ -0,0 +1,38 @@
+
+
+
+
+
+
+
+
+
+
+
+ {{ data.pref }}
+
+
+
+
+ $cordovaPreferences
+ .get('{{ data.key }}')
+
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/printer/printer.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/printer/printer.ctrl.js
new file mode 100644
index 0000000..aac91fb
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/printer/printer.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.printer.ctrl', [])
+
+ .controller('PrinterCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/printer/printer.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/printer/printer.html
new file mode 100644
index 0000000..50840c7
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/printer/printer.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/pushNotifications/pushNotifications.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/pushNotifications/pushNotifications.ctrl.js
new file mode 100644
index 0000000..1698f0f
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/pushNotifications/pushNotifications.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.pushNotifications.ctrl', [])
+
+ .controller('PushNotificationsCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/pushNotifications/pushNotifications.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/pushNotifications/pushNotifications.html
new file mode 100644
index 0000000..8e99a65
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/pushNotifications/pushNotifications.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/socialSharing/socialSharing.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/socialSharing/socialSharing.ctrl.js
new file mode 100644
index 0000000..7c6c48b
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/socialSharing/socialSharing.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.socialSharing.ctrl', [])
+
+ .controller('SocialSharingCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/socialSharing/socialSharing.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/socialSharing/socialSharing.html
new file mode 100644
index 0000000..9762e84
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/socialSharing/socialSharing.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/sqlite/sqlite.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/sqlite/sqlite.ctrl.js
new file mode 100644
index 0000000..d95efe6
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/sqlite/sqlite.ctrl.js
@@ -0,0 +1,5 @@
+angular.module('demo.sqlite.ctrl', [])
+
+ .controller('SqliteCtrl', function ($scope, $log, $cordovaPreferences) {
+
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/sqlite/sqlite.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/sqlite/sqlite.html
new file mode 100644
index 0000000..1cee519
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/sqlite/sqlite.html
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/statusbar/statusbar.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/statusbar/statusbar.ctrl.js
new file mode 100644
index 0000000..27789a0
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/statusbar/statusbar.ctrl.js
@@ -0,0 +1,12 @@
+angular.module('demo.statusbar.ctrl', [])
+
+
+ .controller('StatusbarCtrl', function ($scope, $cordovaStatusbar) {
+ $scope.toggleBar = function () {
+ if ($cordovaStatusbar.isVisible()) {
+ $cordovaStatusbar.hide();
+ } else {
+ $cordovaStatusbar.show();
+ }
+ };
+ });
\ No newline at end of file
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/statusbar/statusbar.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/statusbar/statusbar.html
new file mode 100644
index 0000000..ba576bb
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/statusbar/statusbar.html
@@ -0,0 +1,5 @@
+
+
+ Toggle
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/toast/toast.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/toast/toast.ctrl.js
new file mode 100644
index 0000000..2a07fe4
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/toast/toast.ctrl.js
@@ -0,0 +1,38 @@
+angular.module('demo.toast.ctrl', [])
+
+
+ .controller('ToastCtrl', function ($scope, $cordovaToast) {
+
+ $scope.toastMessage = 'enter a message';
+
+ $scope.center = function (message) {
+ $cordovaToast.show(message, 'long', 'center')
+ .then(function (success) {
+ console.log("center msg displayed");
+ }, function (error) {
+ $scope.msg = error.message;
+ });
+ };
+
+ $scope.top = function (message) {
+
+ $cordovaToast
+ .showShortTop(message)
+ .then(function (success) {
+ console.log("short top displayed ");
+ }, function (error) {
+ $scope.msg = error.message;
+ });
+ };
+
+
+ $scope.bottom = function (message) {
+ $cordovaToast
+ .showLongBottom(message)
+ .then(function (success) {
+ console.log("long bottom displayed");
+ }, function (error) {
+ $scope.msg = error.message;
+ });
+ }
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/toast/toast.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/toast/toast.html
new file mode 100644
index 0000000..a603fe6
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/toast/toast.html
@@ -0,0 +1,29 @@
+
+
+
+ Toast
+
+
+
+ Toast Message
+
+
+
+
+
+
+
+ Center
+
+
+
+ Top
+
+
+
+ Bottom
+
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/touchid/touchid.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/touchid/touchid.ctrl.js
new file mode 100644
index 0000000..249c72d
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/touchid/touchid.ctrl.js
@@ -0,0 +1,26 @@
+
+angular.module('demo.touchid.ctrl', [])
+
+
+.controller('TouchIDCtrl', function ($scope, $cordovaTouchID) {
+ var supported = false;
+ $cordovaTouchID.checkSupport().then(function(val) {
+ supported = true;
+ }, function(err) {
+ supported = false;
+ });
+
+ $scope.prompt = function() {
+ if(!supported) {
+ alert('TouchID is not supported on your device.');
+ } else {
+ $cordovaTouchID.authenticate('Please authenticate').then(function(authVal) {
+ alert('Success!');
+ console.log(authVal);
+ }, function(err) {
+ alert(err);
+ console.log(err);
+ });
+ }
+ };
+});
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/touchid/touchid.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/touchid/touchid.html
new file mode 100644
index 0000000..489307a
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/touchid/touchid.html
@@ -0,0 +1,11 @@
+
+
+
+ Touch ID
+
+
+ Authenticate
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/vibration/vibration.ctrl.js b/HybridMobile App using Ionic Framework/CodeCamp/www/app/vibration/vibration.ctrl.js
new file mode 100644
index 0000000..c73be4f
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/vibration/vibration.ctrl.js
@@ -0,0 +1,11 @@
+angular.module('demo.vibration.ctrl', [])
+
+ .controller('VibrationCtrl', function($scope, $cordovaVibration) {
+
+ $scope.duration = 100;
+
+ $scope.vibrate = function(){
+ console.log("vibrating");
+ $cordovaVibration.vibrate($scope.duration);
+ }
+ });
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/app/vibration/vibration.html b/HybridMobile App using Ionic Framework/CodeCamp/www/app/vibration/vibration.html
new file mode 100644
index 0000000..f24a85c
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/app/vibration/vibration.html
@@ -0,0 +1,11 @@
+
+
+
+ Vibration
+
+
+ Vibrate me!
+
+
+
+
diff --git a/HybridMobile App using Ionic Framework/CodeCamp/www/cordova.js b/HybridMobile App using Ionic Framework/CodeCamp/www/cordova.js
new file mode 100644
index 0000000..70912ad
--- /dev/null
+++ b/HybridMobile App using Ionic Framework/CodeCamp/www/cordova.js
@@ -0,0 +1,1776 @@
+// Platform: ios
+// 3.6.3
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+ */
+;(function() {
+ var CORDOVA_JS_BUILD_LABEL = '3.6.3';
+// file: src/scripts/require.js
+
+ /*jshint -W079 */
+ /*jshint -W020 */
+
+ var require,
+ define;
+
+ (function () {
+ var modules = {},
+ // Stack of moduleIds currently being built.
+ requireStack = [],
+ // Map of module ID -> index into requireStack of modules currently being built.
+ inProgressModules = {},
+ SEPARATOR = ".";
+
+
+
+ function build(module) {
+ var factory = module.factory,
+ localRequire = function (id) {
+ var resultantId = id;
+ //Its a relative path, so lop off the last portion and add the id (minus "./")
+ if (id.charAt(0) === ".") {
+ resultantId = module.id.slice(0, module.id.lastIndexOf(SEPARATOR)) + SEPARATOR + id.slice(2);
+ }
+ return require(resultantId);
+ };
+ module.exports = {};
+ delete module.factory;
+ factory(localRequire, module.exports, module);
+ return module.exports;
+ }
+
+ require = function (id) {
+ if (!modules[id]) {
+ throw "module " + id + " not found";
+ } else if (id in inProgressModules) {
+ var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;
+ throw "Cycle in require graph: " + cycle;
+ }
+ if (modules[id].factory) {
+ try {
+ inProgressModules[id] = requireStack.length;
+ requireStack.push(id);
+ return build(modules[id]);
+ } finally {
+ delete inProgressModules[id];
+ requireStack.pop();
+ }
+ }
+ return modules[id].exports;
+ };
+
+ define = function (id, factory) {
+ if (modules[id]) {
+ throw "module " + id + " already defined";
+ }
+
+ modules[id] = {
+ id: id,
+ factory: factory
+ };
+ };
+
+ define.remove = function (id) {
+ delete modules[id];
+ };
+
+ define.moduleMap = modules;
+ })();
+
+//Export for use in node
+ if (typeof module === "object" && typeof require === "function") {
+ module.exports.require = require;
+ module.exports.define = define;
+ }
+
+// file: src/cordova.js
+ define("cordova", function(require, exports, module) {
+
+
+ var channel = require('cordova/channel');
+ var platform = require('cordova/platform');
+
+ /**
+ * Intercept calls to addEventListener + removeEventListener and handle deviceready,
+ * resume, and pause events.
+ */
+ var m_document_addEventListener = document.addEventListener;
+ var m_document_removeEventListener = document.removeEventListener;
+ var m_window_addEventListener = window.addEventListener;
+ var m_window_removeEventListener = window.removeEventListener;
+
+ /**
+ * Houses custom event handlers to intercept on document + window event listeners.
+ */
+ var documentEventHandlers = {},
+ windowEventHandlers = {};
+
+ document.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof documentEventHandlers[e] != 'undefined') {
+ documentEventHandlers[e].subscribe(handler);
+ } else {
+ m_document_addEventListener.call(document, evt, handler, capture);
+ }
+ };
+
+ window.addEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ if (typeof windowEventHandlers[e] != 'undefined') {
+ windowEventHandlers[e].subscribe(handler);
+ } else {
+ m_window_addEventListener.call(window, evt, handler, capture);
+ }
+ };
+
+ document.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubscribing from an event that is handled by a plugin
+ if (typeof documentEventHandlers[e] != "undefined") {
+ documentEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_document_removeEventListener.call(document, evt, handler, capture);
+ }
+ };
+
+ window.removeEventListener = function(evt, handler, capture) {
+ var e = evt.toLowerCase();
+ // If unsubscribing from an event that is handled by a plugin
+ if (typeof windowEventHandlers[e] != "undefined") {
+ windowEventHandlers[e].unsubscribe(handler);
+ } else {
+ m_window_removeEventListener.call(window, evt, handler, capture);
+ }
+ };
+
+ function createEvent(type, data) {
+ var event = document.createEvent('Events');
+ event.initEvent(type, false, false);
+ if (data) {
+ for (var i in data) {
+ if (data.hasOwnProperty(i)) {
+ event[i] = data[i];
+ }
+ }
+ }
+ return event;
+ }
+
+
+ var cordova = {
+ define:define,
+ require:require,
+ version:CORDOVA_JS_BUILD_LABEL,
+ platformId:platform.id,
+ /**
+ * Methods to add/remove your own addEventListener hijacking on document + window.
+ */
+ addWindowEventHandler:function(event) {
+ return (windowEventHandlers[event] = channel.create(event));
+ },
+ addStickyDocumentEventHandler:function(event) {
+ return (documentEventHandlers[event] = channel.createSticky(event));
+ },
+ addDocumentEventHandler:function(event) {
+ return (documentEventHandlers[event] = channel.create(event));
+ },
+ removeWindowEventHandler:function(event) {
+ delete windowEventHandlers[event];
+ },
+ removeDocumentEventHandler:function(event) {
+ delete documentEventHandlers[event];
+ },
+ /**
+ * Retrieve original event handlers that were replaced by Cordova
+ *
+ * @return object
+ */
+ getOriginalHandlers: function() {
+ return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},
+ 'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};
+ },
+ /**
+ * Method to fire event from native code
+ * bNoDetach is required for events which cause an exception which needs to be caught in native code
+ */
+ fireDocumentEvent: function(type, data, bNoDetach) {
+ var evt = createEvent(type, data);
+ if (typeof documentEventHandlers[type] != 'undefined') {
+ if( bNoDetach ) {
+ documentEventHandlers[type].fire(evt);
+ }
+ else {
+ setTimeout(function() {
+ // Fire deviceready on listeners that were registered before cordova.js was loaded.
+ if (type == 'deviceready') {
+ document.dispatchEvent(evt);
+ }
+ documentEventHandlers[type].fire(evt);
+ }, 0);
+ }
+ } else {
+ document.dispatchEvent(evt);
+ }
+ },
+ fireWindowEvent: function(type, data) {
+ var evt = createEvent(type,data);
+ if (typeof windowEventHandlers[type] != 'undefined') {
+ setTimeout(function() {
+ windowEventHandlers[type].fire(evt);
+ }, 0);
+ } else {
+ window.dispatchEvent(evt);
+ }
+ },
+
+ /**
+ * Plugin callback mechanism.
+ */
+ // Randomize the starting callbackId to avoid collisions after refreshing or navigating.
+ // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.
+ callbackId: Math.floor(Math.random() * 2000000000),
+ callbacks: {},
+ callbackStatus: {
+ NO_RESULT: 0,
+ OK: 1,
+ CLASS_NOT_FOUND_EXCEPTION: 2,
+ ILLEGAL_ACCESS_EXCEPTION: 3,
+ INSTANTIATION_EXCEPTION: 4,
+ MALFORMED_URL_EXCEPTION: 5,
+ IO_EXCEPTION: 6,
+ INVALID_ACTION: 7,
+ JSON_EXCEPTION: 8,
+ ERROR: 9
+ },
+
+ /**
+ * Called by native code when returning successful result from an action.
+ */
+ callbackSuccess: function(callbackId, args) {
+ try {
+ cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);
+ } catch (e) {
+ console.log("Error in success callback: " + callbackId + " = "+e);
+ }
+ },
+
+ /**
+ * Called by native code when returning error result from an action.
+ */
+ callbackError: function(callbackId, args) {
+ // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.
+ // Derive success from status.
+ try {
+ cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);
+ } catch (e) {
+ console.log("Error in error callback: " + callbackId + " = "+e);
+ }
+ },
+
+ /**
+ * Called by native code when returning the result from an action.
+ */
+ callbackFromNative: function(callbackId, success, status, args, keepCallback) {
+ var callback = cordova.callbacks[callbackId];
+ if (callback) {
+ if (success && status == cordova.callbackStatus.OK) {
+ callback.success && callback.success.apply(null, args);
+ } else if (!success) {
+ callback.fail && callback.fail.apply(null, args);
+ }
+
+ // Clear callback if not expecting any more results
+ if (!keepCallback) {
+ delete cordova.callbacks[callbackId];
+ }
+ }
+ },
+ addConstructor: function(func) {
+ channel.onCordovaReady.subscribe(function() {
+ try {
+ func();
+ } catch(e) {
+ console.log("Failed to run constructor: " + e);
+ }
+ });
+ }
+ };
+
+
+ module.exports = cordova;
+
+ });
+
+// file: src/common/argscheck.js
+ define("cordova/argscheck", function(require, exports, module) {
+
+ var exec = require('cordova/exec');
+ var utils = require('cordova/utils');
+
+ var moduleExports = module.exports;
+
+ var typeMap = {
+ 'A': 'Array',
+ 'D': 'Date',
+ 'N': 'Number',
+ 'S': 'String',
+ 'F': 'Function',
+ 'O': 'Object'
+ };
+
+ function extractParamName(callee, argIndex) {
+ return (/.*?\((.*?)\)/).exec(callee)[1].split(', ')[argIndex];
+ }
+
+ function checkArgs(spec, functionName, args, opt_callee) {
+ if (!moduleExports.enableChecks) {
+ return;
+ }
+ var errMsg = null;
+ var typeName;
+ for (var i = 0; i < spec.length; ++i) {
+ var c = spec.charAt(i),
+ cUpper = c.toUpperCase(),
+ arg = args[i];
+ // Asterix means allow anything.
+ if (c == '*') {
+ continue;
+ }
+ typeName = utils.typeName(arg);
+ if ((arg === null || arg === undefined) && c == cUpper) {
+ continue;
+ }
+ if (typeName != typeMap[cUpper]) {
+ errMsg = 'Expected ' + typeMap[cUpper];
+ break;
+ }
+ }
+ if (errMsg) {
+ errMsg += ', but got ' + typeName + '.';
+ errMsg = 'Wrong type for parameter "' + extractParamName(opt_callee || args.callee, i) + '" of ' + functionName + ': ' + errMsg;
+ // Don't log when running unit tests.
+ if (typeof jasmine == 'undefined') {
+ console.error(errMsg);
+ }
+ throw TypeError(errMsg);
+ }
+ }
+
+ function getValue(value, defaultValue) {
+ return value === undefined ? defaultValue : value;
+ }
+
+ moduleExports.checkArgs = checkArgs;
+ moduleExports.getValue = getValue;
+ moduleExports.enableChecks = true;
+
+
+ });
+
+// file: src/common/base64.js
+ define("cordova/base64", function(require, exports, module) {
+
+ var base64 = exports;
+
+ base64.fromArrayBuffer = function(arrayBuffer) {
+ var array = new Uint8Array(arrayBuffer);
+ return uint8ToBase64(array);
+ };
+
+ base64.toArrayBuffer = function(str) {
+ var decodedStr = typeof atob != 'undefined' ? atob(str) : new Buffer(str,'base64').toString('binary');
+ var arrayBuffer = new ArrayBuffer(decodedStr.length);
+ var array = new Uint8Array(arrayBuffer);
+ for (var i=0, len=decodedStr.length; i < len; i++) {
+ array[i] = decodedStr.charCodeAt(i);
+ }
+ return arrayBuffer;
+ };
+
+//------------------------------------------------------------------------------
+
+ /* This code is based on the performance tests at http://jsperf.com/b64tests
+ * This 12-bit-at-a-time algorithm was the best performing version on all
+ * platforms tested.
+ */
+
+ var b64_6bit = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+ var b64_12bit;
+
+ var b64_12bitTable = function() {
+ b64_12bit = [];
+ for (var i=0; i<64; i++) {
+ for (var j=0; j<64; j++) {
+ b64_12bit[i*64+j] = b64_6bit[i] + b64_6bit[j];
+ }
+ }
+ b64_12bitTable = function() { return b64_12bit; };
+ return b64_12bit;
+ };
+
+ function uint8ToBase64(rawData) {
+ var numBytes = rawData.byteLength;
+ var output="";
+ var segment;
+ var table = b64_12bitTable();
+ for (var i=0;i> 12];
+ output += table[segment & 0xfff];
+ }
+ if (numBytes - i == 2) {
+ segment = (rawData[i] << 16) + (rawData[i+1] << 8);
+ output += table[segment >> 12];
+ output += b64_6bit[(segment & 0xfff) >> 6];
+ output += '=';
+ } else if (numBytes - i == 1) {
+ segment = (rawData[i] << 16);
+ output += table[segment >> 12];
+ output += '==';
+ }
+ return output;
+ }
+
+ });
+
+// file: src/common/builder.js
+ define("cordova/builder", function(require, exports, module) {
+
+ var utils = require('cordova/utils');
+
+ function each(objects, func, context) {
+ for (var prop in objects) {
+ if (objects.hasOwnProperty(prop)) {
+ func.apply(context, [objects[prop], prop]);
+ }
+ }
+ }
+
+ function clobber(obj, key, value) {
+ exports.replaceHookForTesting(obj, key);
+ obj[key] = value;
+ // Getters can only be overridden by getters.
+ if (obj[key] !== value) {
+ utils.defineGetter(obj, key, function() {
+ return value;
+ });
+ }
+ }
+
+ function assignOrWrapInDeprecateGetter(obj, key, value, message) {
+ if (message) {
+ utils.defineGetter(obj, key, function() {
+ console.log(message);
+ delete obj[key];
+ clobber(obj, key, value);
+ return value;
+ });
+ } else {
+ clobber(obj, key, value);
+ }
+ }
+
+ function include(parent, objects, clobber, merge) {
+ each(objects, function (obj, key) {
+ try {
+ var result = obj.path ? require(obj.path) : {};
+
+ if (clobber) {
+ // Clobber if it doesn't exist.
+ if (typeof parent[key] === 'undefined') {
+ assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+ } else if (typeof obj.path !== 'undefined') {
+ // If merging, merge properties onto parent, otherwise, clobber.
+ if (merge) {
+ recursiveMerge(parent[key], result);
+ } else {
+ assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+ }
+ }
+ result = parent[key];
+ } else {
+ // Overwrite if not currently defined.
+ if (typeof parent[key] == 'undefined') {
+ assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);
+ } else {
+ // Set result to what already exists, so we can build children into it if they exist.
+ result = parent[key];
+ }
+ }
+
+ if (obj.children) {
+ include(result, obj.children, clobber, merge);
+ }
+ } catch(e) {
+ utils.alert('Exception building Cordova JS globals: ' + e + ' for key "' + key + '"');
+ }
+ });
+ }
+
+ /**
+ * Merge properties from one object onto another recursively. Properties from
+ * the src object will overwrite existing target property.
+ *
+ * @param target Object to merge properties into.
+ * @param src Object to merge properties from.
+ */
+ function recursiveMerge(target, src) {
+ for (var prop in src) {
+ if (src.hasOwnProperty(prop)) {
+ if (target.prototype && target.prototype.constructor === target) {
+ // If the target object is a constructor override off prototype.
+ clobber(target.prototype, prop, src[prop]);
+ } else {
+ if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {
+ recursiveMerge(target[prop], src[prop]);
+ } else {
+ clobber(target, prop, src[prop]);
+ }
+ }
+ }
+ }
+ }
+
+ exports.buildIntoButDoNotClobber = function(objects, target) {
+ include(target, objects, false, false);
+ };
+ exports.buildIntoAndClobber = function(objects, target) {
+ include(target, objects, true, false);
+ };
+ exports.buildIntoAndMerge = function(objects, target) {
+ include(target, objects, true, true);
+ };
+ exports.recursiveMerge = recursiveMerge;
+ exports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;
+ exports.replaceHookForTesting = function() {};
+
+ });
+
+// file: src/common/channel.js
+ define("cordova/channel", function(require, exports, module) {
+
+ var utils = require('cordova/utils'),
+ nextGuid = 1;
+
+ /**
+ * Custom pub-sub "channel" that can have functions subscribed to it
+ * This object is used to define and control firing of events for
+ * cordova initialization, as well as for custom events thereafter.
+ *
+ * The order of events during page load and Cordova startup is as follows:
+ *
+ * onDOMContentLoaded* Internal event that is received when the web page is loaded and parsed.
+ * onNativeReady* Internal event that indicates the Cordova native side is ready.
+ * onCordovaReady* Internal event fired when all Cordova JavaScript objects have been created.
+ * onDeviceReady* User event fired to indicate that Cordova is ready
+ * onResume User event fired to indicate a start/resume lifecycle event
+ * onPause User event fired to indicate a pause lifecycle event
+ * onDestroy* Internal event fired when app is being destroyed (User should use window.onunload event, not this one).
+ *
+ * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.
+ * All listeners that subscribe after the event is fired will be executed right away.
+ *
+ * The only Cordova events that user code should register for are:
+ * deviceready Cordova native code is initialized and Cordova APIs can be called from JavaScript
+ * pause App has moved to background
+ * resume App has returned to foreground
+ *
+ * Listeners can be registered as:
+ * document.addEventListener("deviceready", myDeviceReadyListener, false);
+ * document.addEventListener("resume", myResumeListener, false);
+ * document.addEventListener("pause", myPauseListener, false);
+ *
+ * The DOM lifecycle events should be used for saving and restoring state
+ * window.onload
+ * window.onunload
+ *
+ */
+
+ /**
+ * Channel
+ * @constructor
+ * @param type String the channel name
+ */
+ var Channel = function(type, sticky) {
+ this.type = type;
+ // Map of guid -> function.
+ this.handlers = {};
+ // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.
+ this.state = sticky ? 1 : 0;
+ // Used in sticky mode to remember args passed to fire().
+ this.fireArgs = null;
+ // Used by onHasSubscribersChange to know if there are any listeners.
+ this.numHandlers = 0;
+ // Function that is called when the first listener is subscribed, or when
+ // the last listener is unsubscribed.
+ this.onHasSubscribersChange = null;
+ },
+ channel = {
+ /**
+ * Calls the provided function only after all of the channels specified
+ * have been fired. All channels must be sticky channels.
+ */
+ join: function(h, c) {
+ var len = c.length,
+ i = len,
+ f = function() {
+ if (!(--i)) h();
+ };
+ for (var j=0; jNative messages.
+ isInContextOfEvalJs = 0;
+
+ function createExecIframe() {
+ var iframe = document.createElement("iframe");
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+ return iframe;
+ }
+
+ function createHashIframe() {
+ var ret = createExecIframe();
+ // Hash changes don't work on about:blank, so switch it to file:///.
+ ret.contentWindow.history.replaceState(null, null, 'file:///#');
+ return ret;
+ }
+
+ function shouldBundleCommandJson() {
+ if (bridgeMode === jsToNativeModes.XHR_WITH_PAYLOAD) {
+ return true;
+ }
+ if (bridgeMode === jsToNativeModes.XHR_OPTIONAL_PAYLOAD) {
+ var payloadLength = 0;
+ for (var i = 0; i < commandQueue.length; ++i) {
+ payloadLength += commandQueue[i].length;
+ }
+ // The value here was determined using the benchmark within CordovaLibApp on an iPad 3.
+ return payloadLength < 4500;
+ }
+ return false;
+ }
+
+ function massageArgsJsToNative(args) {
+ if (!args || utils.typeName(args) != 'Array') {
+ return args;
+ }
+ var ret = [];
+ args.forEach(function(arg, i) {
+ if (utils.typeName(arg) == 'ArrayBuffer') {
+ ret.push({
+ 'CDVType': 'ArrayBuffer',
+ 'data': base64.fromArrayBuffer(arg)
+ });
+ } else {
+ ret.push(arg);
+ }
+ });
+ return ret;
+ }
+
+ function massageMessageNativeToJs(message) {
+ if (message.CDVType == 'ArrayBuffer') {
+ var stringToArrayBuffer = function(str) {
+ var ret = new Uint8Array(str.length);
+ for (var i = 0; i < str.length; i++) {
+ ret[i] = str.charCodeAt(i);
+ }
+ return ret.buffer;
+ };
+ var base64ToArrayBuffer = function(b64) {
+ return stringToArrayBuffer(atob(b64));
+ };
+ message = base64ToArrayBuffer(message.data);
+ }
+ return message;
+ }
+
+ function convertMessageToArgsNativeToJs(message) {
+ var args = [];
+ if (!message || !message.hasOwnProperty('CDVType')) {
+ args.push(message);
+ } else if (message.CDVType == 'MultiPart') {
+ message.messages.forEach(function(e) {
+ args.push(massageMessageNativeToJs(e));
+ });
+ } else {
+ args.push(massageMessageNativeToJs(message));
+ }
+ return args;
+ }
+
+ function iOSExec() {
+ // Use XHR for iOS 5 to work around a bug in -webkit-scroll.
+ // Use IFRAME_NAV elsewhere since it's faster and XHR bridge
+ // seems to have bugs in newer OS's (CB-3900, CB-3359, CB-5457, CB-4970, CB-4998, CB-5134)
+ if (bridgeMode === undefined) {
+ if (navigator.userAgent) {
+ bridgeMode = navigator.userAgent.indexOf(' 5_') == -1 ? jsToNativeModes.IFRAME_NAV: jsToNativeModes.XHR_NO_PAYLOAD;
+ } else {
+ bridgeMode = jsToNativeModes.IFRAME_NAV;
+ }
+ }
+
+ if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.cordova && window.webkit.messageHandlers.cordova.postMessage) {
+ bridgeMode = jsToNativeModes.WK_WEBVIEW_BINDING;
+ }
+
+ var successCallback, failCallback, service, action, actionArgs, splitCommand;
+ var callbackId = null;
+ if (typeof arguments[0] !== "string") {
+ // FORMAT ONE
+ successCallback = arguments[0];
+ failCallback = arguments[1];
+ service = arguments[2];
+ action = arguments[3];
+ actionArgs = arguments[4];
+
+ // Since we need to maintain backwards compatibility, we have to pass
+ // an invalid callbackId even if no callback was provided since plugins
+ // will be expecting it. The Cordova.exec() implementation allocates
+ // an invalid callbackId and passes it even if no callbacks were given.
+ callbackId = 'INVALID';
+ } else {
+ // FORMAT TWO, REMOVED
+ try {
+ splitCommand = arguments[0].split(".");
+ action = splitCommand.pop();
+ service = splitCommand.join(".");
+ actionArgs = Array.prototype.splice.call(arguments, 1);
+
+ console.log('The old format of this exec call has been removed (deprecated since 2.1). Change to: ' +
+ "cordova.exec(null, null, \"" + service + "\", \"" + action + "\"," + JSON.stringify(actionArgs) + ");"
+ );
+ return;
+ } catch (e) {}
+ }
+
+ // If actionArgs is not provided, default to an empty array
+ actionArgs = actionArgs || [];
+
+ // Register the callbacks and add the callbackId to the positional
+ // arguments if given.
+ if (successCallback || failCallback) {
+ callbackId = service + cordova.callbackId++;
+ cordova.callbacks[callbackId] =
+ {success:successCallback, fail:failCallback};
+ }
+
+ actionArgs = massageArgsJsToNative(actionArgs);
+
+ var command = [callbackId, service, action, actionArgs];
+
+ // Stringify and queue the command. We stringify to command now to
+ // effectively clone the command arguments in case they are mutated before
+ // the command is executed.
+ commandQueue.push(JSON.stringify(command));
+
+ if (bridgeMode === jsToNativeModes.WK_WEBVIEW_BINDING) {
+ window.webkit.messageHandlers.cordova.postMessage(command);
+ } else {
+ // If we're in the context of a stringByEvaluatingJavaScriptFromString call,
+ // then the queue will be flushed when it returns; no need for a poke.
+ // Also, if there is already a command in the queue, then we've already
+ // poked the native side, so there is no reason to do so again.
+ if (!isInContextOfEvalJs && commandQueue.length == 1) {
+ switch (bridgeMode) {
+ case jsToNativeModes.XHR_NO_PAYLOAD:
+ case jsToNativeModes.XHR_WITH_PAYLOAD:
+ case jsToNativeModes.XHR_OPTIONAL_PAYLOAD:
+ pokeNativeViaXhr();
+ break;
+ default: // iframe-based.
+ pokeNativeViaIframe();
+ }
+ }
+ }
+ }
+
+ function pokeNativeViaXhr() {
+ // This prevents sending an XHR when there is already one being sent.
+ // This should happen only in rare circumstances (refer to unit tests).
+ if (execXhr && execXhr.readyState != 4) {
+ execXhr = null;
+ }
+ // Re-using the XHR improves exec() performance by about 10%.
+ execXhr = execXhr || new XMLHttpRequest();
+ // Changing this to a GET will make the XHR reach the URIProtocol on 4.2.
+ // For some reason it still doesn't work though...
+ // Add a timestamp to the query param to prevent caching.
+ execXhr.open('HEAD', "/!gap_exec?" + (+new Date()), true);
+ if (!vcHeaderValue) {
+ vcHeaderValue = /.*\((.*)\)/.exec(navigator.userAgent)[1];
+ }
+ execXhr.setRequestHeader('vc', vcHeaderValue);
+ execXhr.setRequestHeader('rc', ++requestCount);
+ if (shouldBundleCommandJson()) {
+ execXhr.setRequestHeader('cmds', iOSExec.nativeFetchMessages());
+ }
+ execXhr.send(null);
+ }
+
+ function pokeNativeViaIframe() {
+ // CB-5488 - Don't attempt to create iframe before document.body is available.
+ if (!document.body) {
+ setTimeout(pokeNativeViaIframe);
+ return;
+ }
+ if (bridgeMode === jsToNativeModes.IFRAME_HASH_NO_PAYLOAD || bridgeMode === jsToNativeModes.IFRAME_HASH_WITH_PAYLOAD) {
+ execHashIframe = execHashIframe || createHashIframe();
+ // Check if they've removed it from the DOM, and put it back if so.
+ if (!execHashIframe.contentWindow) {
+ execHashIframe = createHashIframe();
+ }
+ // The delegate method is called only when the hash changes, so toggle it back and forth.
+ hashToggle = hashToggle ^ 3;
+ var hashValue = '%0' + hashToggle;
+ if (bridgeMode === jsToNativeModes.IFRAME_HASH_WITH_PAYLOAD) {
+ hashValue += iOSExec.nativeFetchMessages();
+ }
+ execHashIframe.contentWindow.location.hash = hashValue;
+ } else {
+ execIframe = execIframe || createExecIframe();
+ // Check if they've removed it from the DOM, and put it back if so.
+ if (!execIframe.contentWindow) {
+ execIframe = createExecIframe();
+ }
+ execIframe.src = "gap://ready";
+ }
+ }
+
+ iOSExec.jsToNativeModes = jsToNativeModes;
+
+ iOSExec.setJsToNativeBridgeMode = function(mode) {
+ // Remove the iFrame since it may be no longer required, and its existence
+ // can trigger browser bugs.
+ // https://issues.apache.org/jira/browse/CB-593
+ if (execIframe) {
+ execIframe.parentNode.removeChild(execIframe);
+ execIframe = null;
+ }
+ bridgeMode = mode;
+ };
+
+ iOSExec.nativeFetchMessages = function() {
+ // Each entry in commandQueue is a JSON string already.
+ if (!commandQueue.length) {
+ return '';
+ }
+ var json = '[' + commandQueue.join(',') + ']';
+ commandQueue.length = 0;
+ return json;
+ };
+
+ iOSExec.nativeCallback = function(callbackId, status, message, keepCallback) {
+ return iOSExec.nativeEvalAndFetch(function() {
+ var success = status === 0 || status === 1;
+ var args = convertMessageToArgsNativeToJs(message);
+ cordova.callbackFromNative(callbackId, success, status, args, keepCallback);
+ });
+ };
+
+ iOSExec.nativeEvalAndFetch = function(func) {
+ // This shouldn't be nested, but better to be safe.
+ isInContextOfEvalJs++;
+ try {
+ func();
+ return iOSExec.nativeFetchMessages();
+ } finally {
+ isInContextOfEvalJs--;
+ }
+ };
+
+ module.exports = iOSExec;
+
+ });
+
+// file: src/common/exec/proxy.js
+ define("cordova/exec/proxy", function(require, exports, module) {
+
+
+// internal map of proxy function
+ var CommandProxyMap = {};
+
+ module.exports = {
+
+ // example: cordova.commandProxy.add("Accelerometer",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);
+ add:function(id,proxyObj) {
+ console.log("adding proxy for " + id);
+ CommandProxyMap[id] = proxyObj;
+ return proxyObj;
+ },
+
+ // cordova.commandProxy.remove("Accelerometer");
+ remove:function(id) {
+ var proxy = CommandProxyMap[id];
+ delete CommandProxyMap[id];
+ CommandProxyMap[id] = null;
+ return proxy;
+ },
+
+ get:function(service,action) {
+ return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );
+ }
+ };
+ });
+
+// file: src/common/init.js
+ define("cordova/init", function(require, exports, module) {
+
+ var channel = require('cordova/channel');
+ var cordova = require('cordova');
+ var modulemapper = require('cordova/modulemapper');
+ var platform = require('cordova/platform');
+ var pluginloader = require('cordova/pluginloader');
+
+ var platformInitChannelsArray = [channel.onNativeReady, channel.onPluginsReady];
+
+ function logUnfiredChannels(arr) {
+ for (var i = 0; i < arr.length; ++i) {
+ if (arr[i].state != 2) {
+ console.log('Channel not fired: ' + arr[i].type);
+ }
+ }
+ }
+
+ window.setTimeout(function() {
+ if (channel.onDeviceReady.state != 2) {
+ console.log('deviceready has not fired after 5 seconds.');
+ logUnfiredChannels(platformInitChannelsArray);
+ logUnfiredChannels(channel.deviceReadyChannelsArray);
+ }
+ }, 5000);
+
+// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
+// We replace it so that properties that can't be clobbered can instead be overridden.
+ function replaceNavigator(origNavigator) {
+ var CordovaNavigator = function() {};
+ CordovaNavigator.prototype = origNavigator;
+ var newNavigator = new CordovaNavigator();
+ // This work-around really only applies to new APIs that are newer than Function.bind.
+ // Without it, APIs such as getGamepads() break.
+ if (CordovaNavigator.bind) {
+ for (var key in origNavigator) {
+ if (typeof origNavigator[key] == 'function') {
+ newNavigator[key] = origNavigator[key].bind(origNavigator);
+ }
+ }
+ }
+ return newNavigator;
+ }
+ if (window.navigator) {
+ window.navigator = replaceNavigator(window.navigator);
+ }
+
+ if (!window.console) {
+ window.console = {
+ log: function(){}
+ };
+ }
+ if (!window.console.warn) {
+ window.console.warn = function(msg) {
+ this.log("warn: " + msg);
+ };
+ }
+
+// Register pause, resume and deviceready channels as events on document.
+ channel.onPause = cordova.addDocumentEventHandler('pause');
+ channel.onResume = cordova.addDocumentEventHandler('resume');
+ channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
+
+// Listen for DOMContentLoaded and notify our channel subscribers.
+ if (document.readyState == 'complete' || document.readyState == 'interactive') {
+ channel.onDOMContentLoaded.fire();
+ } else {
+ document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+ }, false);
+ }
+
+// _nativeReady is global variable that the native side can set
+// to signify that the native code is ready. It is a global since
+// it may be called before any cordova JS is ready.
+ if (window._nativeReady) {
+ channel.onNativeReady.fire();
+ }
+
+ modulemapper.clobbers('cordova', 'cordova');
+ modulemapper.clobbers('cordova/exec', 'cordova.exec');
+ modulemapper.clobbers('cordova/exec', 'Cordova.exec');
+
+// Call the platform-specific initialization.
+ platform.bootstrap && platform.bootstrap();
+
+// Wrap in a setTimeout to support the use-case of having plugin JS appended to cordova.js.
+// The delay allows the attached modules to be defined before the plugin loader looks for them.
+ setTimeout(function() {
+ pluginloader.load(function() {
+ channel.onPluginsReady.fire();
+ });
+ }, 0);
+
+ /**
+ * Create all cordova objects once native side is ready.
+ */
+ channel.join(function() {
+ modulemapper.mapModules(window);
+
+ platform.initialize && platform.initialize();
+
+ // Fire event to notify that all objects are created
+ channel.onCordovaReady.fire();
+
+ // Fire onDeviceReady event once page has fully loaded, all
+ // constructors have run and cordova info has been received from native
+ // side.
+ channel.join(function() {
+ require('cordova').fireDocumentEvent('deviceready');
+ }, channel.deviceReadyChannelsArray);
+
+ }, platformInitChannelsArray);
+
+
+ });
+
+// file: src/common/init_b.js
+ define("cordova/init_b", function(require, exports, module) {
+
+ var channel = require('cordova/channel');
+ var cordova = require('cordova');
+ var platform = require('cordova/platform');
+
+ var platformInitChannelsArray = [channel.onDOMContentLoaded, channel.onNativeReady];
+
+// setting exec
+ cordova.exec = require('cordova/exec');
+
+ function logUnfiredChannels(arr) {
+ for (var i = 0; i < arr.length; ++i) {
+ if (arr[i].state != 2) {
+ console.log('Channel not fired: ' + arr[i].type);
+ }
+ }
+ }
+
+ window.setTimeout(function() {
+ if (channel.onDeviceReady.state != 2) {
+ console.log('deviceready has not fired after 5 seconds.');
+ logUnfiredChannels(platformInitChannelsArray);
+ logUnfiredChannels(channel.deviceReadyChannelsArray);
+ }
+ }, 5000);
+
+// Replace navigator before any modules are required(), to ensure it happens as soon as possible.
+// We replace it so that properties that can't be clobbered can instead be overridden.
+ function replaceNavigator(origNavigator) {
+ var CordovaNavigator = function() {};
+ CordovaNavigator.prototype = origNavigator;
+ var newNavigator = new CordovaNavigator();
+ // This work-around really only applies to new APIs that are newer than Function.bind.
+ // Without it, APIs such as getGamepads() break.
+ if (CordovaNavigator.bind) {
+ for (var key in origNavigator) {
+ if (typeof origNavigator[key] == 'function') {
+ newNavigator[key] = origNavigator[key].bind(origNavigator);
+ }
+ }
+ }
+ return newNavigator;
+ }
+ if (window.navigator) {
+ window.navigator = replaceNavigator(window.navigator);
+ }
+
+ if (!window.console) {
+ window.console = {
+ log: function(){}
+ };
+ }
+ if (!window.console.warn) {
+ window.console.warn = function(msg) {
+ this.log("warn: " + msg);
+ };
+ }
+
+// Register pause, resume and deviceready channels as events on document.
+ channel.onPause = cordova.addDocumentEventHandler('pause');
+ channel.onResume = cordova.addDocumentEventHandler('resume');
+ channel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');
+
+// Listen for DOMContentLoaded and notify our channel subscribers.
+ if (document.readyState == 'complete' || document.readyState == 'interactive') {
+ channel.onDOMContentLoaded.fire();
+ } else {
+ document.addEventListener('DOMContentLoaded', function() {
+ channel.onDOMContentLoaded.fire();
+ }, false);
+ }
+
+// _nativeReady is global variable that the native side can set
+// to signify that the native code is ready. It is a global since
+// it may be called before any cordova JS is ready.
+ if (window._nativeReady) {
+ channel.onNativeReady.fire();
+ }
+
+// Call the platform-specific initialization.
+ platform.bootstrap && platform.bootstrap();
+
+ /**
+ * Create all cordova objects once native side is ready.
+ */
+ channel.join(function() {
+
+ platform.initialize && platform.initialize();
+
+ // Fire event to notify that all objects are created
+ channel.onCordovaReady.fire();
+
+ // Fire onDeviceReady event once page has fully loaded, all
+ // constructors have run and cordova info has been received from native
+ // side.
+ channel.join(function() {
+ require('cordova').fireDocumentEvent('deviceready');
+ }, channel.deviceReadyChannelsArray);
+
+ }, platformInitChannelsArray);
+
+ });
+
+// file: src/common/modulemapper.js
+ define("cordova/modulemapper", function(require, exports, module) {
+
+ var builder = require('cordova/builder'),
+ moduleMap = define.moduleMap,
+ symbolList,
+ deprecationMap;
+
+ exports.reset = function() {
+ symbolList = [];
+ deprecationMap = {};
+ };
+
+ function addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {
+ if (!(moduleName in moduleMap)) {
+ throw new Error('Module ' + moduleName + ' does not exist.');
+ }
+ symbolList.push(strategy, moduleName, symbolPath);
+ if (opt_deprecationMessage) {
+ deprecationMap[symbolPath] = opt_deprecationMessage;
+ }
+ }
+
+// Note: Android 2.3 does have Function.bind().
+ exports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('c', moduleName, symbolPath, opt_deprecationMessage);
+ };
+
+ exports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('m', moduleName, symbolPath, opt_deprecationMessage);
+ };
+
+ exports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {
+ addEntry('d', moduleName, symbolPath, opt_deprecationMessage);
+ };
+
+ exports.runs = function(moduleName) {
+ addEntry('r', moduleName, null);
+ };
+
+ function prepareNamespace(symbolPath, context) {
+ if (!symbolPath) {
+ return context;
+ }
+ var parts = symbolPath.split('.');
+ var cur = context;
+ for (var i = 0, part; part = parts[i]; ++i) {
+ cur = cur[part] = cur[part] || {};
+ }
+ return cur;
+ }
+
+ exports.mapModules = function(context) {
+ var origSymbols = {};
+ context.CDV_origSymbols = origSymbols;
+ for (var i = 0, len = symbolList.length; i < len; i += 3) {
+ var strategy = symbolList[i];
+ var moduleName = symbolList[i + 1];
+ var module = require(moduleName);
+ //
+ if (strategy == 'r') {
+ continue;
+ }
+ var symbolPath = symbolList[i + 2];
+ var lastDot = symbolPath.lastIndexOf('.');
+ var namespace = symbolPath.substr(0, lastDot);
+ var lastName = symbolPath.substr(lastDot + 1);
+
+ var deprecationMsg = symbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;
+ var parentObj = prepareNamespace(namespace, context);
+ var target = parentObj[lastName];
+
+ if (strategy == 'm' && target) {
+ builder.recursiveMerge(target, module);
+ } else if ((strategy == 'd' && !target) || (strategy != 'd')) {
+ if (!(symbolPath in origSymbols)) {
+ origSymbols[symbolPath] = target;
+ }
+ builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);
+ }
+ }
+ };
+
+ exports.getOriginalSymbol = function(context, symbolPath) {
+ var origSymbols = context.CDV_origSymbols;
+ if (origSymbols && (symbolPath in origSymbols)) {
+ return origSymbols[symbolPath];
+ }
+ var parts = symbolPath.split('.');
+ var obj = context;
+ for (var i = 0; i < parts.length; ++i) {
+ obj = obj && obj[parts[i]];
+ }
+ return obj;
+ };
+
+ exports.reset();
+
+
+ });
+
+// file: src/ios/platform.js
+ define("cordova/platform", function(require, exports, module) {
+
+ module.exports = {
+ id: 'ios',
+ bootstrap: function() {
+ require('cordova/channel').onNativeReady.fire();
+ }
+ };
+
+
+ });
+
+// file: src/common/pluginloader.js
+ define("cordova/pluginloader", function(require, exports, module) {
+
+ var modulemapper = require('cordova/modulemapper');
+ var urlutil = require('cordova/urlutil');
+
+// Helper function to inject a
+
+
+
+
+
+
+
+
+
+
+
+