# HG changeset patch
# User Michael Schloh von Bennewitz
# Date 1433422233 -7200
# Node ID e8ccd40d0ef6f5bcc16d74b3cd3105194cc7b6d1
Genesis of lecture sources for Droidcon Berlin 2015 in Postbahnhof.
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/.gitignore
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/.gitignore Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,1 @@
+.DS_Store
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/README.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,64 @@
+Touch Notifier Companion App
+============================
+The Touch Notifier Companion App is a simple app that receives data wirelessly and notifies a user if the Touch Sensor (https://software.intel.com/en-us/iot/sensor/grove-buzzer) is being touched. The Touch Notifier node.js/IoT project sends this data to a connected client when running on a IoT platform such as a development board with the sensor connected. This sensor is included in the Grove Starter Kit Plus - Intel® IoT Edition. For more information, go to https://software.intel.com/en-us/iot/devkit.
+
+Intel(R) XDK
+-------------------------------------------
+This sample is part of the Intel(R) XDK IoT Edition.
+Download the Intel(R) XDK IoT Edition at https://software.intel.com/en-us/html5/xdk-iot. To see the technical details of the sample,
+please visit the sample article page at http://software.intel.com/en-us/html5/articles/iot-touch-notifier-nodejs-&-companion.
+
+
+Important App Files
+---------------------------
+* index.html
+* icon.png
+* screenshot.png
+* app.json
+* README.md
+* js/*
+* app_framework/*
+* css/*
+* jquery/*
+
+License Information Follows
+---------------------------
+Copyright (c) 2014, Intel Corporation. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+- Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+
+- Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+- Neither the name of Intel Corporation nor the names of its contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+App Framework
+-----------------------------------------------------------------------------
+http://app-framework-software.intel.com/
+source: https://github.com/01org/appframework
+license: https://raw.githubusercontent.com/01org/appframework/master/license.txt
+
+jQuery
+-----------------------------------------------------------------------------
+http://jquery.com/
+source: https://github.com/jquery/jquery
+license: https://raw.githubusercontent.com/jquery/jquery/master/LICENSE.txt
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/Touchgui.xdk
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/Touchgui.xdk Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+{
+ "project": {
+ "projectSettingsVersion": "1.2",
+ "creationData": {
+ "projectTypeName": "com.intel.xdk.projecttype.jsapp",
+ "src": "https://edge-intel.s3.amazonaws.com/jsapp/production/release-2015-ww07/sample-iot-companion-touch-notifier/sample.zip",
+ "projectGuid": "dfa70862-2c48-4649-b181-373add78f975",
+ "lastModifiedDate": 1429384906298,
+ "creationDate": 1425145486141
+ },
+ "sourceDirectory": "www",
+ "cordovaPluginsDirectory": "plugins",
+ "startFile": "index.html",
+ "projectFiles": {},
+ "projectDirectories": {},
+ "libraries": [],
+ "cordovaPlugins": [
+ {
+ "id": "org.apache.cordova.device",
+ "version": "0.2.13",
+ "selectedState": "Included",
+ "data": {},
+ "paramvals": {},
+ "dependsOn": [],
+ "dependedBy": []
+ },
+ {
+ "id": "org.apache.cordova.splashscreen",
+ "version": "0.3.5",
+ "selectedState": "Included",
+ "data": {},
+ "paramvals": {},
+ "dependsOn": [],
+ "dependedBy": []
+ },
+ {
+ "id": "org.apache.cordova.vibration",
+ "version": "0.3.12",
+ "selectedState": "Included",
+ "data": {},
+ "paramvals": {},
+ "dependsOn": [],
+ "dependedBy": []
+ },
+ {
+ "id": "org.apache.cordova.dialogs",
+ "version": "0.2.11",
+ "selectedState": "Included",
+ "data": {},
+ "paramvals": {},
+ "dependsOn": [],
+ "dependedBy": []
+ }
+ ],
+ "serviceMethods": [],
+ "buildConfigurations": {
+ "Android": {
+ "platform_": "android",
+ "runtime_": "Cordova 3.x",
+ "name_": "Android",
+ "preferences_": {
+ "android-minSdkVersion": "10",
+ "android-targetSdkVersion": "19",
+ "android-installLocation": "auto"
+ },
+ "isActive_": true,
+ "appName_": "Touchgui",
+ "appID_": "demo.touchnotifier",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "iosProvs_": [],
+ "cordovaCLIVersion_": "4.1.2",
+ "crosswalkVersion_": "10",
+ "appVersion_": "1.0.0",
+ "appVersionCode_": "1",
+ "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.",
+ "appAuthor_": "Intel XDK"
+ },
+ "Android-Crosswalk": {
+ "platform_": "android",
+ "runtime_": "Crosswalk with Cordova 3.x",
+ "name_": "Android-Crosswalk",
+ "preferences_": {
+ "android-minSdkVersion": "14",
+ "android-targetSdkVersion": "19",
+ "android-installLocation": "auto"
+ },
+ "isActive_": true,
+ "appName_": "Touchgui",
+ "appID_": "demo.touchnotifier",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "iosProvs_": [],
+ "cordovaCLIVersion_": "4.1.2",
+ "crosswalkVersion_": "10",
+ "appVersion_": "1.0.0",
+ "appVersionCode_": "1",
+ "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.",
+ "appAuthor_": "Intel XDK"
+ },
+ "iOS": {
+ "platform_": "ios",
+ "runtime_": "Cordova 3.x",
+ "name_": "iOS",
+ "preferences_": {
+ "ios-target": "6",
+ "ios-configuration": "adhoc"
+ },
+ "isActive_": true,
+ "appName_": "Touchgui",
+ "appID_": "demo.touchnotifier",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "iosProvs_": [],
+ "cordovaCLIVersion_": "4.1.2",
+ "crosswalkVersion_": "10",
+ "appVersion_": "1.0.0",
+ "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.",
+ "appAuthor_": "Intel XDK"
+ },
+ "Windows8": {
+ "platform_": "windows8",
+ "runtime_": "Cordova 3.x",
+ "name_": "Windows8",
+ "preferences_": {},
+ "isActive_": true,
+ "appName_": "Touchgui",
+ "appID_": "demo.touchnotifier",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "iosProvs_": [],
+ "cordovaCLIVersion_": "4.1.2",
+ "crosswalkVersion_": "10",
+ "appVersion_": "1.0.0.0",
+ "appDescription_": "A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.",
+ "appAuthor_": "Intel XDK"
+ },
+ "WebApp": {
+ "platform_": "webapp",
+ "runtime_": "W3C",
+ "name_": "WebApp",
+ "preferences_": {},
+ "isActive_": false,
+ "appName_": "Touchgui",
+ "appID_": "not.yet.specified",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "appVersion_": "0.0.1"
+ },
+ "Firefox": {
+ "platform_": "firefoxos",
+ "runtime_": "W3C on Firefox OS",
+ "name_": "Firefox",
+ "preferences_": {},
+ "isActive_": false,
+ "appName_": "Touchgui",
+ "appID_": "not.yet.specified",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "appVersion_": "0.0.1"
+ },
+ "Chrome": {
+ "platform_": "chromeos",
+ "runtime_": "W3C on Chrome OS",
+ "name_": "Chrome",
+ "preferences_": {},
+ "isActive_": false,
+ "appName_": "Touchgui",
+ "appID_": "not.yet.specified",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "appVersion_": "0.0.1"
+ },
+ "Facebook": {
+ "platform_": "facebook",
+ "runtime_": "W3C on Facebook",
+ "name_": "Facebook",
+ "preferences_": {},
+ "isActive_": false,
+ "appName_": "Touchgui",
+ "appID_": "not.yet.specified",
+ "appAccess_": [
+ {
+ "origin": "*"
+ }
+ ],
+ "icons_": [],
+ "splashes_": [],
+ "addlPermissions_": "",
+ "excludedLibraries_": "",
+ "appVersion_": "0.0.1"
+ }
+ },
+ "gameAssetDirectory": "asset",
+ "gameMetadata": {},
+ "projectTags": []
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/Touchgui.xdke
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/Touchgui.xdke Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,9 @@
+{
+ "project": {
+ "projectSettingsVersion": "1.2",
+ "currentBuildConfiguration": "Android",
+ "projectFiles": {},
+ "projectDirectories": {},
+ "initialAutoPluginCount": 0
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/icon.png
Binary file Touchgui/icon.png has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.android.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/intelxdk.config.android.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+Touchgui
+A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.
+Intel XDK
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.crosswalk.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/intelxdk.config.crosswalk.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+Touchgui
+A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.
+Intel XDK
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.ios.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/intelxdk.config.ios.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+Touchgui
+A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.
+Intel XDK
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/intelxdk.config.windows8.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/intelxdk.config.windows8.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+Touchgui
+A simple app that receives data wirelessly and notifies a user if the Touch Sensor is being touched.
+Intel XDK
+
+
+
+
+
+
+
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/.fetch.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/.fetch.json Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,1 @@
+{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.device"}}
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/CONTRIBUTING.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,37 @@
+
+
+# Contributing to Apache Cordova
+
+Anyone can contribute to Cordova. And we need your contributions.
+
+There are multiple ways to contribute: report bugs, improve the docs, and
+contribute code.
+
+For instructions on this, start with the
+[contribution overview](http://cordova.apache.org/#contribute).
+
+The details are explained there, but the important items are:
+ - Sign and submit an Apache ICLA (Contributor License Agreement).
+ - Have a Jira issue open that corresponds to your contribution.
+ - Run the tests so your patch doesn't break existing functionality.
+
+We look forward to your contributions!
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/LICENSE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/LICENSE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/NOTICE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/NOTICE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,5 @@
+Apache Cordova
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/README.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,22 @@
+
+
+# org.apache.cordova.device
+
+Plugin documentation: [doc/index.md](doc/index.md)
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/RELEASENOTES.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,92 @@
+
+# Release Notes
+
+### 0.2.1 (Sept 5, 2013)
+* removed extraneous print statement
+* [CB-4432] copyright notice change
+
+### 0.2.3 (Sept 25, 2013)
+* CB-4889 bumping&resetting version
+* [windows8] commandProxy has moved
+* [BlackBerry10] removed uneeded permission tags in plugin.xml
+* CB-4889 renaming org.apache.cordova.core.device to org.apache.cordova.device
+* Rename CHANGELOG.md -> RELEASENOTES.md
+* updated to use commandProxy for ffos
+* add firefoxos support
+* [CB-4752] Incremented plugin version on dev branch.
+
+### 0.2.4 (Oct 28, 2013)
+* CB-5128: added repo + issue tag in plugin.xml for device plugin
+* CB-5085 device.cordova returning wrong value
+* [CB-4915] Incremented plugin version on dev branch.
+
+### 0.2.5 (Dec 4, 2013)
+* CB-5316 Spell Cordova as a brand unless it's a command or script
+* [ubuntu] use cordova/exec/proxy
+* add ubuntu platform
+* Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices
+* 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos'
+
+### 0.2.6 (Jan 02, 2014)
+* CB-5658 Add doc/index.md for Device plugin
+* CB-5504 Moving Telephony Logic out of Device
+
+### 0.2.7 (Jan 07, 2014)
+* CB-5737 Fix exception on close caused by left over telephony code from CB-5504
+
+### 0.2.8 (Feb 05, 2014)
+* Tizen support added
+
+### 0.2.9 (Apr 17, 2014)
+* CB-5105: [Android, windows8, WP, BlackBerry10] Removed dead code for device.version
+* CB-6422: [windows8] use cordova/exec/proxy
+* CB-6460: Update license headers
+* Add NOTICE file
+
+### 0.2.10 (Jun 05, 2014)
+* CB-6127 Spanish and French Translations added. Github close #12
+* Changing 1.5 to 2.0
+* added firefoxos version - conversion
+* added firefoxos version
+* CB-6800 Add license
+* CB-6491 add CONTRIBUTING.md
+
+### 0.2.11 (Aug 06, 2014)
+* [FFOS] update DeviceProxy.js
+* CB-6127 Updated translations for docs
+* Use Windows system calls to get better info
+
+### 0.2.12 (Sep 17, 2014)
+* CB-7471 cordova-plugin-device documentation translation
+* CB-7552 device.name docs have not been removed
+* [fxos] Fix cordova version
+* added status box and documentation to manual tests
+* [fxos] Fix cordova version
+* added status box and documentation to manual tests
+* Added plugin support for the browser
+* CB-7262 Adds support for universal windows apps.
+
+### 0.2.13 (Dec 02, 2014)
+* Changing `device.platform` to always report the platform as "browser".
+* CB-5892 - Remove deprecated `window.Settings`
+* CB-7700 cordova-plugin-device documentation translation: cordova-plugin-device
+* CB-7571 Bump version of nested plugin to match parent plugin
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/de/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,206 @@
+
+
+# org.apache.cordova.device
+
+Dieses Plugin definiert eine globale `device` -Objekt, das des Geräts Hard- und Software beschreibt. Das Objekt im globalen Gültigkeitsbereich ist es zwar nicht verfügbar bis nach dem `deviceready` Ereignis.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## Installation
+
+ cordova plugin add org.apache.cordova.device
+
+
+## Eigenschaften
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+Rufen Sie die Version von Cordova, die auf dem Gerät ausgeführt.
+
+### Unterstützte Plattformen
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Browser
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+## device.model
+
+Die `device.model` gibt den Namen der Modell- oder des Geräts zurück. Der Wert wird vom Gerätehersteller festgelegt und kann zwischen den Versionen des gleichen Produkts unterschiedlich sein.
+
+### Unterstützte Plattformen
+
+* Android
+* BlackBerry 10
+* Browser
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+### Kurzes Beispiel
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Finden Sie unter http://theiphonewiki.com/wiki/index.php?title=Models / / Var-Modell = device.model;
+
+
+### Android Eigenarten
+
+* Ruft den [Produktname][1] anstelle des [Modellnamens][2], das ist oft der Codename für die Produktion. Beispielsweise das Nexus One gibt `Passion` , und Motorola Droid gibt`voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+ [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
+
+### Tizen Macken
+
+* Gibt z. B. das Gerätemodell von dem Kreditor zugeordnet,`TIZEN`
+
+### Windows Phone 7 und 8 Eigenarten
+
+* Gibt das vom Hersteller angegebenen Gerätemodell zurück. Beispielsweise gibt der Samsung-Fokus`SGH-i917`.
+
+## device.platform
+
+Name des Betriebssystems des Geräts zu erhalten.
+
+ var string = device.platform;
+
+
+### Unterstützte Plattformen
+
+* Android
+* BlackBerry 10
+* Browser4
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+### Kurzes Beispiel
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Windows Phone 7 Macken
+
+Windows Phone 7 Geräte melden die Plattform als`WinCE`.
+
+### Windows Phone 8 Macken
+
+Windows Phone 8 Geräte melden die Plattform als`Win32NT`.
+
+## device.uuid
+
+Des Geräts Universally Unique Identifier ([UUID][3] zu erhalten).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### Beschreibung
+
+Die Details wie eine UUID generiert wird werden vom Gerätehersteller und beziehen sich auf die Plattform oder das Modell des Geräts.
+
+### Unterstützte Plattformen
+
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+### Kurzes Beispiel
+
+ / / Android: wird eine zufällige 64-Bit-Ganzzahl (als Zeichenfolge, wieder!) / / die ganze Zahl wird beim ersten Start des Geräts erzeugt / / / / BlackBerry: gibt die PIN-Nummer des Gerätes / / Dies ist eine neunstellige eindeutige Ganzzahl (als String, obwohl!) / / / / iPhone: (paraphrasiert aus der Dokumentation zur UIDevice-Klasse) / / liefert eine Reihe von Hash-Werte, die aus mehreren Hardware erstellt identifiziert.
+ / / Es ist gewährleistet, dass für jedes Gerät eindeutig sein und kann nicht gebunden werden / / an den Benutzer weitergeleitet.
+ / / Windows Phone 7: gibt einen Hash des Gerät + aktueller Benutzer, / / wenn der Benutzer nicht definiert ist, eine Guid generiert und wird weiter bestehen, bis die app deinstalliert wird / / Tizen: gibt das Gerät IMEI (International Mobile Equipment Identity oder IMEI ist eine Zahl / / einzigartig für jedes GSM- und UMTS-Handy.
+ var deviceID = device.uuid;
+
+
+### iOS Quirk
+
+Die `uuid` auf iOS ist nicht eindeutig zu einem Gerät, aber für jede Anwendung, für jede Installation variiert. Es ändert sich, wenn Sie löschen und neu die app installieren, und möglicherweise auch beim iOS zu aktualisieren, oder auch ein Upgrade möglich die app pro Version (scheinbaren in iOS 5.1). Die `uuid` ist kein zuverlässiger Wert.
+
+### Windows Phone 7 und 8 Eigenarten
+
+Die `uuid` für Windows Phone 7 die Berechtigung erfordert `ID_CAP_IDENTITY_DEVICE` . Microsoft wird diese Eigenschaft wahrscheinlich bald abzuschaffen. Wenn die Funktion nicht verfügbar ist, generiert die Anwendung eine persistente Guid, die für die Dauer der Installation der Anwendung auf dem Gerät gewährleistet ist.
+
+## device.version
+
+Version des Betriebssystems zu erhalten.
+
+ var string = device.version;
+
+
+### Unterstützte Plattformen
+
+* Android 2.1 +
+* BlackBerry 10
+* Browser
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+### Kurzes Beispiel
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/es/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,220 @@
+
+
+# org.apache.cordova.device
+
+Este plugin define un global `device` objeto que describe del dispositivo hardware y software. Aunque el objeto está en el ámbito global, no está disponible hasta después de la `deviceready` evento.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## Instalación
+
+ cordova plugin add org.apache.cordova.device
+
+
+## Propiedades
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+Obtener la versión de Cordova que se ejecuta en el dispositivo.
+
+### Plataformas soportadas
+
+* Amazon fire OS
+* Android
+* BlackBerry 10
+* Explorador
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+## device.model
+
+El `device.model` devuelve el nombre de modelo del dispositivo o producto. El valor es fijado por el fabricante del dispositivo y puede ser diferente a través de versiones del mismo producto.
+
+### Plataformas soportadas
+
+* Android
+* BlackBerry 10
+* Explorador
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+### Ejemplo rápido
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
+ //
+ var model = device.model;
+
+
+### Rarezas Android
+
+* Obtiene el [nombre del producto][1] en lugar del [nombre de la modelo][2], que es a menudo el nombre de código de producción. Por ejemplo, el Nexus One devuelve `Passion` y Motorola Droid devuelve `voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+ [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
+
+### Rarezas Tizen
+
+* Devuelve que el modelo de dispositivo asignado por el proveedor, por ejemplo, `TIZEN`
+
+### Windows Phone 7 y 8 rarezas
+
+* Devuelve el modelo de dispositivo especificado por el fabricante. Por ejemplo, el Samsung Focus devuelve `SGH-i917`.
+
+## device.platform
+
+Obtener el nombre del sistema operativo del dispositivo.
+
+ var string = device.platform;
+
+
+### Plataformas soportadas
+
+* Android
+* BlackBerry 10
+* Browser4
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+### Ejemplo rápido
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Windows Phone 7 rarezas
+
+Dispositivos Windows Phone 7 informe de la plataforma como `WinCE`.
+
+### Windows Phone 8 rarezas
+
+Dispositivos Windows Phone 8 Informe la plataforma como `Win32NT`.
+
+## device.uuid
+
+Obtener identificador universalmente única del dispositivo ([UUID][3]).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### Descripción
+
+Los detalles de cómo se genera un UUID son determinados por el fabricante del dispositivo y son específicos a la plataforma del dispositivo o modelo.
+
+### Plataformas soportadas
+
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+### Ejemplo rápido
+
+ // Android: devuelve un entero de 64 bits al azar (como una cadena, otra vez!)
+ // el entero es generado en el primer arranque del dispositivo
+ //
+ // BlackBerry: devuelve el número PIN del dispositivo
+ // este es un entero único de nueve dígitos (como una cadena, aunque!)
+ //
+ // iPhone: (parafraseado de la documentación de la clase UIDevice)
+ // devuelve una cadena de valores hash creado a partir
+ // de múltiples hardware identifica.
+ / / Está garantizado para ser único para cada dispositivo y no puede ser atado / / a la cuenta de usuario.
+ // Windows Phone 7: devuelve un hash de dispositivo + usuario actual,
+ // si el usuario no está definido, un guid generado y persistirá hasta que se desinstala la aplicación
+ //
+ // Tizen: devuelve el dispositivo IMEI (identidad de equipo móvil internacional o IMEI es un número
+ // único para cada teléfono móvil GSM y UMTS.
+ var deviceID = device.uuid;
+
+
+### iOS chanfle
+
+El `uuid` en iOS no es exclusiva de un dispositivo, pero varía para cada aplicación, para cada instalación. Cambia si puedes borrar y volver a instalar la aplicación, y posiblemente también cuándo actualizar iOS, o incluso mejorar la aplicación por la versión (evidente en iOS 5.1). El `uuid` no es un valor confiable.
+
+### Windows Phone 7 y 8 rarezas
+
+El `uuid` para Windows Phone 7 requiere el permiso `ID_CAP_IDENTITY_DEVICE`. Microsoft pronto probablemente desaprueban esta propiedad. Si la capacidad no está disponible, la aplicación genera un guid persistente que se mantiene durante la duración de la instalación de la aplicación en el dispositivo.
+
+## device.version
+
+Obtener la versión del sistema operativo.
+
+ var string = device.version;
+
+
+### Plataformas soportadas
+
+* Android 2.1 +
+* BlackBerry 10
+* Explorador
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+### Ejemplo rápido
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. el Mango se vuelve 7.10.7720
+ // Tizen: devuelve "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/fr/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,218 @@
+
+
+# org.apache.cordova.device
+
+Ce plugin définit un global `device` objet qui décrit le matériel et les logiciels de l'appareil. Bien que l'objet est dans la portée globale, il n'est pas disponible jusqu'après la `deviceready` événement.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## Installation
+
+ cordova plugin add org.apache.cordova.device
+
+
+## Propriétés
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+Retourne la version de Cordova en cours d'exécution sur l'appareil.
+
+### Plates-formes prises en charge
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Navigateur
+* Firefox OS
+* iOS
+* Paciarelli
+* Windows Phone 7 et 8
+* Windows 8
+
+## device.model
+
+L'objet `device.model` retourne le nom du modèle de l'appareil/produit. Cette valeur est définie par le fabricant du périphérique et peut varier entre les différentes versions d'un même produit.
+
+### Plates-formes prises en charge
+
+* Android
+* BlackBerry 10
+* Navigateur
+* iOS
+* Paciarelli
+* Windows Phone 7 et 8
+* Windows 8
+
+### Petit exemple
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Voir http://theiphonewiki.com/wiki/index.php?title=Models
+ //
+ var model = device.model;
+
+
+### Quirks Android
+
+* Retourne le [nom du produit][1] au lieu du [nom du modèle][2], ce qui équivaut souvent au nom de code de production. Par exemple, `Passion` pour le Nexus One et `voles` pour le Motorola Droid.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+ [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
+
+### Bizarreries de paciarelli
+
+* Retourne le modèle du dispositif, assigné par le vendeur, par exemple `TIZEN`
+
+### Windows Phone 7 et 8 Quirks
+
+* Retourne le modèle de l'appareil spécifié par le fabricant. Par exemple `SGH-i917` pour le Samsung Focus.
+
+## device.platform
+
+Obtenir le nom de système d'exploitation de l'appareil.
+
+ var string = device.platform;
+
+
+### Plates-formes prises en charge
+
+* Android
+* BlackBerry 10
+* Browser4
+* Firefox OS
+* iOS
+* Paciarelli
+* Windows Phone 7 et 8
+* Windows 8
+
+### Petit exemple
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Windows Phone 7 Quirks
+
+Appareils Windows Phone 7 rapport de la plate-forme comme`WinCE`.
+
+### Notes au sujet de Windows Phone 8
+
+Appareils Windows Phone 8 rapport de la plate-forme comme`Win32NT`.
+
+## device.uuid
+
+Obtenir Universally Unique Identifier de l'appareil ([UUID][3]).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### Description
+
+Les détails de comment un UUID généré sont déterminées par le fabricant du périphérique et sont spécifiques à la plate-forme ou le modèle de l'appareil.
+
+### Plates-formes prises en charge
+
+* Android
+* BlackBerry 10
+* iOS
+* Paciarelli
+* Windows Phone 7 et 8
+* Windows 8
+
+### Petit exemple
+
+ // Android : retourne un nombre entier 64-bit aléatoire (sous la forme d'une chaîne de caractères, encore !)
+ // Ce nombre entier est généré lors du premier démarrage de l'appareil
+ //
+ // BlackBerry : retourne le numéro PIN de l'appareil
+ // Il s'agit d'un nombre entier unique à neuf chiffres (sous la forme d'une chaîne de caractères cependant !)
+ //
+ // iPhone : (copié depuis la documentation de la classe UIDevice)
+ // Retourne une chaîne de caractères générée à partir de plusieurs caractéristiques matérielles.
+ / / Il est garanti pour être unique pour chaque appareil et ne peut pas être lié / / pour le compte d'utilisateur.
+ // Windows Phone 7 : retourne un hashage généré à partir de appareil+utilisateur actuel,
+ // si aucun utilisateur n'est défini, un guid est généré persistera jusqu'à ce que l'application soit désinstallée
+ // Tizen : retourne le numéro IMEI (International Mobile Equipment Identity) de l'appareil, ce numéro est
+ // unique pour chaque téléphone GSM et UMTS.
+ var deviceID = device.uuid;
+
+
+### Spécificités iOS
+
+Le `uuid` sur iOS n'est pas propre à un périphérique, mais varie pour chaque application, pour chaque installation. Elle change si vous supprimez, puis réinstallez l'application, et éventuellement aussi quand vous mettre à jour d'iOS, ou même mettre à jour le soft par version (apparent dans iOS 5.1). Le `uuid` n'est pas une valeur fiable.
+
+### Windows Phone 7 et 8 Quirks
+
+Le `uuid` pour Windows Phone 7 requiert l'autorisation `ID_CAP_IDENTITY_DEVICE` . Microsoft va probablement bientôt obsolète de cette propriété. Si la capacité n'est pas disponible, l'application génère un guid persistant qui est maintenu pendant toute la durée de l'installation de l'application sur le périphérique.
+
+## device.version
+
+Téléchargez la version de système d'exploitation.
+
+ var string = device.version;
+
+
+### Plates-formes prises en charge
+
+* Android 2.1+
+* BlackBerry 10
+* Navigateur
+* iOS
+* Paciarelli
+* Windows Phone 7 et 8
+* Windows 8
+
+### Petit exemple
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,218 @@
+
+
+# org.apache.cordova.device
+
+This plugin defines a global `device` object, which describes the device's hardware and software.
+Although the object is in the global scope, it is not available until after the `deviceready` event.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+## Installation
+
+ cordova plugin add org.apache.cordova.device
+
+## Properties
+
+- device.cordova
+- device.model
+- device.platform
+- device.uuid
+- device.version
+
+## device.cordova
+
+Get the version of Cordova running on the device.
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- Browser
+- Firefox OS
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+## device.model
+
+The `device.model` returns the name of the device's model or
+product. The value is set by the device manufacturer and may be
+different across versions of the same product.
+
+### Supported Platforms
+
+- Android
+- BlackBerry 10
+- Browser
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
+ //
+ var model = device.model;
+
+### Android Quirks
+
+- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.
+
+### Tizen Quirks
+
+- Returns the device model assigned by the vendor, for example, `TIZEN`
+
+### Windows Phone 7 and 8 Quirks
+
+- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.
+
+## device.platform
+
+Get the device's operating system name.
+
+ var string = device.platform;
+
+### Supported Platforms
+
+- Android
+- BlackBerry 10
+- Browser4
+- Firefox OS
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+### Windows Phone 7 Quirks
+
+Windows Phone 7 devices report the platform as `WinCE`.
+
+### Windows Phone 8 Quirks
+
+Windows Phone 8 devices report the platform as `Win32NT`.
+
+## device.uuid
+
+Get the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).
+
+ var string = device.uuid;
+
+### Description
+
+The details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.
+
+### Supported Platforms
+
+- Android
+- BlackBerry 10
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Android: Returns a random 64-bit integer (as a string, again!)
+ // The integer is generated on the device's first boot
+ //
+ // BlackBerry: Returns the PIN number of the device
+ // This is a nine-digit unique integer (as a string, though!)
+ //
+ // iPhone: (Paraphrased from the UIDevice Class documentation)
+ // Returns a string of hash values created from multiple hardware identifies.
+ // It is guaranteed to be unique for every device and can't be tied
+ // to the user account.
+ // Windows Phone 7 : Returns a hash of device+current user,
+ // if the user is not defined, a guid is generated and will persist until the app is uninstalled
+ // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number
+ // unique to every GSM and UMTS mobile phone.
+ var deviceID = device.uuid;
+
+### iOS Quirk
+
+The `uuid` on iOS is not unique to a device, but varies for each
+application, for each installation. It changes if you delete and
+re-install the app, and possibly also when you upgrade iOS, or even
+upgrade the app per version (apparent in iOS 5.1). The `uuid` is not
+a reliable value.
+
+### Windows Phone 7 and 8 Quirks
+
+The `uuid` for Windows Phone 7 requires the permission
+`ID_CAP_IDENTITY_DEVICE`. Microsoft will likely deprecate this
+property soon. If the capability is not available, the application
+generates a persistent guid that is maintained for the duration of the
+application's installation on the device.
+
+## device.version
+
+Get the operating system version.
+
+ var string = device.version;
+
+### Supported Platforms
+
+- Android 2.1+
+- BlackBerry 10
+- Browser
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Quick Example
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/it/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,206 @@
+
+
+# org.apache.cordova.device
+
+Questo plugin definisce un global `device` oggetto che descrive il dispositivo hardware e software. Sebbene l'oggetto sia in ambito globale, non è disponibile fino a dopo il `deviceready` evento.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## Installazione
+
+ cordova plugin add org.apache.cordova.device
+
+
+## Proprietà
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+Ottenere la versione di Cordova in esecuzione nel dispositivo.
+
+### Piattaforme supportate
+
+* Amazon fuoco OS
+* Android
+* BlackBerry 10
+* Browser
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+## device.model
+
+Il `device.model` restituisce il nome del modello del dispositivo o del prodotto. Il valore viene impostato dal produttore del dispositivo e può essere differente tra le versioni dello stesso prodotto.
+
+### Piattaforme supportate
+
+* Android
+* BlackBerry 10
+* Browser
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+### Esempio rapido
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Vedi http://theiphonewiki.com/wiki/index.php?title=Models / / modello var = device.model;
+
+
+### Stranezze Android
+
+* Ottiene il [nome del prodotto][1] anziché il [nome del modello][2], che è spesso il nome di codice di produzione. Ad esempio, restituisce il Nexus One `Passion` , e Motorola Droid restituisce`voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+ [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
+
+### Tizen stranezze
+
+* Restituisce il modello di dispositivo assegnato dal fornitore, ad esempio,`TIZEN`
+
+### Windows Phone 7 e 8 stranezze
+
+* Restituisce il modello di dispositivo specificato dal produttore. Ad esempio, restituisce il Samsung Focus`SGH-i917`.
+
+## device.platform
+
+Ottenere il nome del sistema operativo del dispositivo.
+
+ var string = device.platform;
+
+
+### Piattaforme supportate
+
+* Android
+* BlackBerry 10
+* Browser4
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+### Esempio rapido
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Windows Phone 7 capricci
+
+Windows Phone 7 dispositivi segnalano la piattaforma come`WinCE`.
+
+### Windows Phone 8 stranezze
+
+Dispositivi Windows Phone 8 segnalano la piattaforma come`Win32NT`.
+
+## device.uuid
+
+Ottenere identificatore del dispositivo univoco universale ([UUID][3]).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### Descrizione
+
+I dettagli di come viene generato un UUID sono determinati dal produttore del dispositivo e sono specifici per la piattaforma o il modello del dispositivo.
+
+### Piattaforme supportate
+
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+### Esempio rapido
+
+ / / Android: restituisce un intero casuale di 64 bit (come stringa, ancora una volta!) / / il numero intero è generato al primo avvio del dispositivo / / / / BlackBerry: restituisce il numero PIN del dispositivo / / questo è un valore integer univoco a nove cifre (come stringa, benchè!) / / / / iPhone: (parafrasato dalla documentazione della classe UIDevice) / / restituisce una stringa di valori hash creata dall'hardware più identifica.
+ / / È garantito per essere unica per ogni dispositivo e non può essere legato / / per l'account utente.
+ / / Windows Phone 7: restituisce un hash dell'utente corrente, + dispositivo / / se l'utente non è definito, un guid generato e persisterà fino a quando l'applicazione viene disinstallata / / Tizen: restituisce il dispositivo IMEI (International Mobile Equipment Identity o IMEI è un numero / / unico per ogni cellulare GSM e UMTS.
+ var deviceID = device.uuid;
+
+
+### iOS Quirk
+
+Il `uuid` su iOS non è univoco per un dispositivo, ma varia per ogni applicazione, per ogni installazione. Cambia se si elimina e re-installare l'app, e possibilmente anche quando aggiornare iOS o anche aggiornare l'app per ogni versione (apparente in iOS 5.1). Il `uuid` non è un valore affidabile.
+
+### Windows Phone 7 e 8 stranezze
+
+Il `uuid` per Windows Phone 7 richiede l'autorizzazione `ID_CAP_IDENTITY_DEVICE` . Microsoft probabilmente sarà presto deprecare questa proprietà. Se la funzionalità non è disponibile, l'applicazione genera un guid persistente che viene mantenuto per la durata dell'installazione dell'applicazione sul dispositivo.
+
+## device.version
+
+Ottenere la versione del sistema operativo.
+
+ var string = device.version;
+
+
+### Piattaforme supportate
+
+* Android 2.1 +
+* BlackBerry 10
+* Browser
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+### Esempio rapido
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/ja/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,206 @@
+
+
+# org.apache.cordova.device
+
+このプラグインをグローバル定義します `device` オブジェクトは、デバイスのハードウェアとソフトウェアについて説明します。 それは後まで利用可能なオブジェクトがグローバル スコープでは、 `deviceready` イベント。
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## インストール
+
+ cordova plugin add org.apache.cordova.device
+
+
+## プロパティ
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+デバイスで実行されているコルドバのバージョンを取得します。
+
+### サポートされているプラットフォーム
+
+* アマゾン火 OS
+* アンドロイド
+* ブラックベリー 10
+* ブラウザー
+* Firefox の OS
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+## device.model
+
+`device.model`、デバイスのモデルまたは製品の名前を返します。値は、デバイスの製造元によって設定され、同じ製品のバージョン間で異なる可能性があります。
+
+### サポートされているプラットフォーム
+
+* アンドロイド
+* ブラックベリー 10
+* ブラウザー
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+### 簡単な例
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models を参照してください//var モデル = device.model;
+
+
+### Android の癖
+
+* 生産コード名は[モデル名][1]の代わりに[製品名][2]を取得します。 たとえば、ネクサス 1 つを返します `Passion` 、Motorola のドロイドを返します`voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#MODEL
+ [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+
+### Tizen の癖
+
+* たとえば、ベンダーによって割り当てられているデバイスのモデルを返します`TIZEN`
+
+### Windows Phone 7 と 8 癖
+
+* 製造元によって指定されたデバイスのモデルを返します。たとえば、三星フォーカスを返します`SGH-i917`.
+
+## device.platform
+
+デバイスのオペレーティング システム名を取得します。
+
+ var string = device.platform;
+
+
+### サポートされているプラットフォーム
+
+* アンドロイド
+* ブラックベリー 10
+* Browser4
+* Firefox の OS
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+### 簡単な例
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Windows Phone 7 の癖
+
+Windows Phone 7 デバイスとプラットフォームを報告します。`WinCE`.
+
+### Windows Phone 8 癖
+
+Windows Phone 8 デバイスとプラットフォームを報告します。`Win32NT`.
+
+## device.uuid
+
+デバイスのユニバーサル ・ ユニーク識別子 ([UUID][3]を取得します。).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### 説明
+
+UUID を生成する方法の詳細は、デバイスの製造元によって決定され、デバイスのプラットフォームやモデルに固有です。
+
+### サポートされているプラットフォーム
+
+* アンドロイド
+* ブラックベリー 10
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+### 簡単な例
+
+ //アンドロイド: ランダムな 64 ビットの整数 (を文字列として返します、再び !)/デバイスの最初の起動時に生成される整数/////ブラックベリー: デバイスのピン番号を返します//これは 9 桁の一意な整数 (を文字列としても !)////iPhone: (UIDevice クラスのドキュメントから言い換え)//識別複数のハードウェアから作成されたハッシュ値の文字列を返します。。
+ //それはすべてのデバイスに対して一意であることが保証され、接続することはできません//ユーザー アカウント。
+ //Windows Phone 7: デバイス + 現在のユーザーのハッシュを返します//ユーザーが定義されていない場合 guid が生成され、アプリがアンインストールされるまで保持されます//Tizen: デバイスの IMEI を返します (国際モバイル機器アイデンティティまたは IMEI は番号です//すべての GSM および UMTS の携帯電話に固有です。
+ var deviceID = device.uuid;
+
+
+### iOS の気まぐれ
+
+`uuid`IOS で、デバイスに固有ではないインストールごと、アプリケーションごとに異なります。 削除、アプリを再インストールした場合に変更と多分またときアップグレード iOS の, またはもアップグレードするアプリ (iOS の 5.1 で明らかに) バージョンごと。 `uuid`は信頼性の高い値ではありません。
+
+### Windows Phone 7 と 8 癖
+
+`uuid`のために Windows Phone 7 には、権限が必要です `ID_CAP_IDENTITY_DEVICE` 。 Microsoft はすぐにこのプロパティを廃止して可能性があります。 機能が利用できない場合、アプリケーションはデバイスへのアプリケーションのインストールの持続期間のために保持されている永続的な guid を生成します。
+
+## device.version
+
+オペレーティング システムのバージョンを取得します。
+
+ var string = device.version;
+
+
+### サポートされているプラットフォーム
+
+* アンドロイド 2.1 +
+* ブラックベリー 10
+* ブラウザー
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+### 簡単な例
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/ko/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,206 @@
+
+
+# org.apache.cordova.device
+
+이 플러그인 정의 전역 `device` 개체, 디바이스의 하드웨어 및 소프트웨어에 설명 합니다. 개체는 전역 범위에서 비록 그것은 후까지 사용할 수 있는 `deviceready` 이벤트.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## 설치
+
+ cordova plugin add org.apache.cordova.device
+
+
+## 속성
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+코르도바는 장치에서 실행 중인 버전을 얻을.
+
+### 지원 되는 플랫폼
+
+* 아마존 화재 운영 체제
+* 안 드 로이드
+* 블랙베리 10
+* 브라우저
+* Firefox 운영 체제
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+## device.model
+
+`device.model`소자의 모델 또는 제품의 이름을 반환 합니다. 값 장치 제조업체에서 설정 되 고 동일 제품의 버전 간에 다를 수 있습니다.
+
+### 지원 되는 플랫폼
+
+* 안 드 로이드
+* 블랙베리 10
+* 브라우저
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+### 빠른 예제
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Http://theiphonewiki.com/wiki/index.php?title=Models 참조 / / var 모델 = device.model;
+
+
+### 안 드 로이드 단점
+
+* 어떤은 종종 프로덕션 코드 이름 대신 [제품 모델 이름][1], [제품 이름][2] 을 가져옵니다. 예를 들어 넥서스 하나 반환 합니다 `Passion` , 모토로라 Droid를 반환 합니다`voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#MODEL
+ [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+
+### Tizen 특수
+
+* 예를 들어, 공급 업체에 의해 할당 된 디바이스 모델을 반환 합니다.`TIZEN`
+
+### Windows Phone 7, 8 특수
+
+* 제조업체에서 지정 하는 장치 모델을 반환 합니다. 예를 들어 삼성 포커스를 반환 합니다.`SGH-i917`.
+
+## device.platform
+
+장치의 운영 체제 이름을 얻을.
+
+ var string = device.platform;
+
+
+### 지원 되는 플랫폼
+
+* 안 드 로이드
+* 블랙베리 10
+* Browser4
+* Firefox 운영 체제
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+### 빠른 예제
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Windows Phone 7 단점
+
+Windows Phone 7 장치 보고 플랫폼으로`WinCE`.
+
+### Windows Phone 8 단점
+
+Windows Phone 8 장치 보고 플랫폼으로`Win32NT`.
+
+## device.uuid
+
+소자의 보편적으로 고유 식별자 ([UUID][3] 를 얻을합니다).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### 설명
+
+UUID 생성 방법의 자세한 내용은 장치 제조업체에 의해 결정 됩니다 및 소자의 플랫폼 이나 모델.
+
+### 지원 되는 플랫폼
+
+* 안 드 로이드
+* 블랙베리 10
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+### 빠른 예제
+
+ / / 안 드 로이드: (문자열로 다시!) 임의의 64 비트 정수를 반환 합니다 / / 정수 장치의 첫 번째 부팅에서 생성 / / / / 블랙베리: 디바이스의 핀 번호를 반환 합니다 / / 이것은 9 자리 고유 정수 (문자열로 비록!) / / / / 아이폰: (UIDevice 클래스 설명서에서 읊 었) / / 문자열 여러 하드웨어에서 생성 하는 해시 값을 식별 하는 반환 합니다.
+ / 그것은 모든 장치에 대 한 고유 해야 보장 되 고 묶일 수 없습니다 / / / 사용자 계정에.
+ / / Windows Phone 7: 장치 + 현재 사용자의 해시를 반환 합니다 / / 사용자 정의 되지 않은 경우 guid 생성 되 고 응용 프로그램을 제거할 때까지 유지 됩니다 / / Tizen: 반환 장치 IMEI (국제 모바일 기기 식별 또는 IMEI 숫자입니다 / / 모든 GSM와 UMTS 휴대 전화 고유.
+ var deviceID = device.uuid;
+
+
+### iOS 특질
+
+`uuid`ios 장치에 고유 하지 않습니다 하지만 각 설치에 대 한 응용 프로그램 마다 다릅니다. 삭제 하 고 다시 애플 리 케이 션을 설치 하는 경우 변경 가능 하 게 또한 iOS를 업그레이드 하거나 때 버전 (iOS 5.1에에서 명백한) 당 응용 프로그램 업그레이드도 하 고. `uuid`은 신뢰할 수 있는 값이 아닙니다.
+
+### Windows Phone 7, 8 특수
+
+`uuid`Windows Phone 7 필요 허가 `ID_CAP_IDENTITY_DEVICE` . Microsoft는 곧이 속성을 세웁니다 가능성이 것입니다. 기능을 사용할 수 없는 경우 응용 프로그램 장치에 응용 프로그램의 설치 하는 동안 유지 하는 영구 guid를 생성 합니다.
+
+## device.version
+
+운영 체제 버전을 얻을.
+
+ var string = device.version;
+
+
+### 지원 되는 플랫폼
+
+* 안 드 로이드 2.1 +
+* 블랙베리 10
+* 브라우저
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+### 빠른 예제
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/pl/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,206 @@
+
+
+# org.apache.cordova.device
+
+Ten plugin określa globalne `device` obiekt, który opisuje urządzenia sprzętowe i programowe. Mimo, że obiekt jest w globalnym zasięgu, nie jest dostępne dopiero po `deviceready` zdarzenie.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## Instalacja
+
+ cordova plugin add org.apache.cordova.device
+
+
+## Właściwości
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+Pobierz wersję Cordova działa na urządzeniu.
+
+### Obsługiwane platformy
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Przeglądarka
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+## device.model
+
+`device.model`Zwraca nazwę modelu lub produktu. Wartość jest zestaw przez producenta urządzenia i mogą się różnić między wersjami tego samego produktu.
+
+### Obsługiwane platformy
+
+* Android
+* BlackBerry 10
+* Przeglądarka
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+### Szybki przykład
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. Zobacz http://theiphonewiki.com/wiki/index.php?title=Models / / modelu var = device.model;
+
+
+### Dziwactwa Androida
+
+* Pobiera [nazwę produktu][1] zamiast [nazwy modelu][2], który często jest nazwą kod produkcji. Na przykład, Nexus One zwraca `Passion` , i zwraca Motorola Droid`voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+ [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
+
+### Dziwactwa Tizen
+
+* Zwraca modelu urządzenia przypisane przez dostawcę, na przykład,`TIZEN`
+
+### Windows Phone 7 i 8 dziwactwa
+
+* Zwraca modelu urządzenia, określonej przez producenta. Na przykład Samsung ostrości zwraca`SGH-i917`.
+
+## device.platform
+
+Uzyskać nazwę systemu operacyjnego urządzenia.
+
+ var string = device.platform;
+
+
+### Obsługiwane platformy
+
+* Android
+* BlackBerry 10
+* Browser4
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+### Szybki przykład
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Dziwactwa Windows Phone 7
+
+Urządzenia Windows Phone 7 raport platformy jako`WinCE`.
+
+### Windows Phone 8 dziwactwa
+
+Urządzenia Windows Phone 8 raport platformy jako`Win32NT`.
+
+## device.uuid
+
+Się urządzenia uniwersalnie unikatowy identyfikator ([UUID][3]).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### Opis
+
+Szczegóły jak UUID jest generowane są określane przez producenta urządzenia i są specyficzne dla platformy lub modelu urządzenia.
+
+### Obsługiwane platformy
+
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+### Szybki przykład
+
+ / / Android: zwraca losowe 64-bitowa liczba całkowita (jako ciąg, znowu!) / / liczba całkowita jest generowany na pierwszego uruchomienia urządzenia / / / / BlackBerry: zwraca numer PIN urządzenia / / to jest unikatową liczbą całkowitą dziewięciu cyfr (jako ciąg, choć!) / / / / iPhone: (zacytowana w dokumentacji klasy UIDevice) / / zwraca ciąg wartości mieszania utworzone z wielu sprzętu identyfikuje.
+ Zapewniona jest unikatowy dla każdego urządzenia i nie może być związane z / do konta użytkownika.
+ / / Windows Phone 7: zwraca wartość mieszania urządzenia + bieżący użytkownik, / / jeśli nie zdefiniowane przez użytkownika, identyfikator guid jest generowany i będzie trwać do czasu odinstalowania aplikacji / / Tizen: zwraca urządzenia IMEI (International Mobile Equipment Identity lub IMEI jest liczbą / / unikatowe dla każdego telefonu komórkowego GSM i UMTS.
+ var deviceID = device.uuid;
+
+
+### iOS dziwactwo
+
+`uuid`Na iOS nie jest przypisany do urządzenia, ale różni się dla każdej aplikacji, dla każdej instalacji. Zmienia się jeśli możesz usunąć i ponownie zainstalować aplikację, a ewentualnie także po aktualizacji iOS czy nawet uaktualnienia aplikacji dla wersji (widoczny w iOS 5.1). `uuid`Jest nie wiarygodne wartości.
+
+### Windows Phone 7 i 8 dziwactwa
+
+`uuid`Dla Windows Phone 7 wymaga uprawnień `ID_CAP_IDENTITY_DEVICE` . Microsoft będzie prawdopodobnie potępiać ten wkrótce. Jeśli funkcja nie jest dostępna, aplikacja generuje trwałe identyfikator guid, który jest utrzymywany przez czas trwania instalacji aplikacji na urządzeniu.
+
+## device.version
+
+Pobierz wersję systemu operacyjnego.
+
+ var string = device.version;
+
+
+### Obsługiwane platformy
+
+* Android 2.1 +
+* BlackBerry 10
+* Przeglądarka
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+### Szybki przykład
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/ru/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,219 @@
+
+
+# org.apache.cordova.device
+
+Этот плагин определяет глобальный объект `device`, который описывает оборудование и программное обеспечение устройства. Несмотря на то что объект в глобальной области видимости, он не доступен до того момента пока не произойдет событие `deviceready`.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## Установка
+
+ cordova plugin add org.apache.cordova.device
+
+
+## Параметры
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+Возвращает версию Cordova, работающую на устройстве.
+
+### Поддерживаемые платформы
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Обозреватель
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+## device.model
+
+Свойство `device.model` возвращает имя устройства модели или продукта. Значение устанавливается производителем устройства и могут отличаться в разных версиях одного и того же продукта.
+
+### Поддерживаемые платформы
+
+* Android
+* BlackBerry 10
+* Обозреватель
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+### Краткий пример
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models
+ //
+ var model = device.model;
+
+
+### Особенности Android
+
+* Возвращает [имя продукта][1] , а не [имя модели][2], которое часто является производственным кодом. Например, Nexus One из них возвращает `Passion` , и Motorola Droid возвращает `voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+ [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
+
+### Особенности Tizen
+
+* Возвращает модель устройства, назначенного вендором, например,`TIZEN`
+
+### Особенности Windows Phone 7 и 8
+
+* Возвращает модель устройства, указанной заводом-изготовителем. Например Samsung Focus возвращает `SGH-i917`.
+
+## device.platform
+
+Получите имя операционной системы устройства.
+
+ var string = device.platform;
+
+
+### Поддерживаемые платформы
+
+* Android
+* BlackBerry 10
+* Браузером4
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+### Краткий пример
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Особенности Windows Phone 7
+
+Windows Phone 7 устройства сообщают платформу как `WinCE`.
+
+### Особенности Windows Phone 8
+
+Устройства Windows Phone 8 сообщают платформу как `Win32NT`.
+
+## device.uuid
+
+Возвращает универсальный уникального идентификатора ([UUID][3] устройства).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### Описание
+
+Подробная информация о том как UUID генерируется, определяются изготовителем устройства и являются специфическими для платформы или модели устройства.
+
+### Поддерживаемые платформы
+
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+### Краткий пример
+
+ // Android: Возвращает случайное 64-разрядное целое число (в виде строки, опять!)
+ // целое число генерируется при первой загрузке устройства
+ //
+ // BlackBerry: Возвращает номер PIN устройства
+ // это 9 значный уникальный целочисленный (как строка, хотя!)
+ //
+ // iPhone: (Перефразировано из документации класса UIDevice)
+ // возвращает строку хэш-значения, созданные из нескольких аппаратных определяет.
+ // Это значение гарантированно является уникальным для каждого устройства и не может быть привязано
+ // к учетной записи пользователя.
+ // Windows Phone 7: Возвращает хэш устройство + текущего пользователя,
+ // если пользователь не определен, формируется guid который и будет сохраняться до тех пор, пока приложение не удалиться
+ // Tizen: возвращает IMEI устройства (Международный идентификатор мобильного оборудования или IMEI это число
+ // уникальное для каждого мобильного телефона GSM и UMTS.
+ var deviceID = device.uuid;
+
+
+### Особенности iOS
+
+На iOS `uuid` не является уникальным для устройства, но варьируется для каждого приложения, и для каждой установки. Значение меняется, если удалить и повторно установить приложение, и возможно также когда вы обновите iOS, или даже обновить приложение до следующей версии (очевидно в iOS 5.1). Значение `uuid` не является надежным.
+
+### Особенности Windows Phone 7 и 8
+
+Для Windows Phone 7 `uuid` требует разрешения `ID_CAP_IDENTITY_DEVICE` . Microsoft скорее всего скоро сделает это свойство устаревшим. Если возможность недоступна, приложение создает постоянные guid, который сохраняется на все время установки приложения на устройстве.
+
+## device.version
+
+Возвращает версию операционной системы.
+
+ var string = device.version;
+
+
+### Поддерживаемые платформы
+
+* Android 2.1 +
+* BlackBerry 10
+* Обозреватель
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+### Краткий пример
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/doc/zh/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,206 @@
+
+
+# org.apache.cordova.device
+
+這個外掛程式定義全球 `device` 物件,描述該設備的硬體和軟體。 雖然物件是在全球範圍內,但不是可用,直到後 `deviceready` 事件。
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(device.cordova);
+ }
+
+
+## 安裝
+
+ cordova plugin add org.apache.cordova.device
+
+
+## 屬性
+
+* device.cordova
+* device.model
+* device.platform
+* device.uuid
+* device.version
+
+## device.cordova
+
+獲取科爾多瓦在設備上運行的版本。
+
+### 支援的平臺
+
+* 亞馬遜火 OS
+* Android 系統
+* 黑莓 10
+* 瀏覽器
+* 火狐瀏覽器的作業系統
+* iOS
+* 泰
+* Windows Phone 7 和 8
+* Windows 8
+
+## device.model
+
+`device.model`返回設備的模型或產品的名稱。值由設備製造商設置和同一產品的不同版本可能不同。
+
+### 支援的平臺
+
+* Android 系統
+* 黑莓 10
+* 瀏覽器
+* iOS
+* 泰
+* Windows Phone 7 和 8
+* Windows 8
+
+### 快速的示例
+
+ // Android: Nexus One returns "Passion" (Nexus One code name)
+ // Motorola Droid returns "voles"
+ // BlackBerry: Torch 9800 returns "9800"
+ // Browser: Google Chrome returns "Chrome"
+ // Safari returns "Safari"
+ // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. 請參閱 HTTP://theiphonewiki.com/wiki/index.php?title=Models / / var 模型 = device.model ;
+
+
+### Android 的怪癖
+
+* 獲取[產品名稱][1]而不是[產品型號名稱][2],這往往是生產代碼名稱。 例如,Nexus One 返回 `Passion` ,和摩托羅拉 Droid 返回`voles`.
+
+ [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT
+ [2]: http://developer.android.com/reference/android/os/Build.html#MODEL
+
+### Tizen 怪癖
+
+* 例如,返回與供應商指派的設備模型`TIZEN`
+
+### Windows Phone 7 和 8 怪癖
+
+* 返回由製造商指定的設備模型。例如,三星焦點返回`SGH-i917`.
+
+## device.platform
+
+獲取設備的作業系統名稱。
+
+ var string = device.platform;
+
+
+### 支援的平臺
+
+* Android 系統
+* 黑莓 10
+* Browser4
+* 火狐瀏覽器的作業系統
+* iOS
+* 泰
+* Windows Phone 7 和 8
+* Windows 8
+
+### 快速的示例
+
+ // Depending on the device, a few examples are:
+ // - "Android"
+ // - "BlackBerry 10"
+ // - Browser: returns "MacIntel" on Mac
+ // returns "Win32" on Windows
+ // - "iOS"
+ // - "WinCE"
+ // - "Tizen"
+ var devicePlatform = device.platform;
+
+
+### Windows Phone 7 的怪癖
+
+Windows Phone 7 設備報告作為平臺`WinCE`.
+
+### Windows Phone 8 怪癖
+
+Windows Phone 8 設備報告作為平臺`Win32NT`.
+
+## device.uuid
+
+獲取設備的通用唯一識別碼 ([UUID][3]).
+
+ [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier
+
+ var string = device.uuid;
+
+
+### 說明
+
+如何生成一個 UUID 的細節由設備製造商和特定于設備的平臺或模型。
+
+### 支援的平臺
+
+* Android 系統
+* 黑莓 10
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+### 快速的示例
+
+ / / Android: 一個隨機的 64 位整數 (作為字串返回,再次!) / / 上設備的第一次啟動生成的整數 / / / / 黑莓手機: 返回設備的 PIN 號碼 / / 這是九個數字的唯一整數 (作為字串,雖然!) / / / / iPhone: (從 UIDevice 類文檔解釋) / / 返回一個字串的雜湊值創建的多個硬體標識。
+ / / 它保證是唯一的每個設備並不能綁 / / 到使用者帳戶。
+ / / Windows Phone 7: 返回的雜湊代碼的設備 + 當前使用者,/ / 如果未定義使用者,則一個 guid 生成的並且將會保留直到卸載該應用程式 / / Tizen: 返回設備 IMEI (國際行動裝置身份或 IMEI 是一個數位 / / 獨有的每一個 UMTS 和 GSM 行動電話。
+ var deviceID = device.uuid;
+
+
+### iOS 怪癖
+
+`uuid`在 iOS 不是唯一的一種裝置,但對於每個應用程式,為每個安裝而異。 如果您刪除並重新安裝該應用程式,它更改和可能還當你升級 iOS,或甚至升級每個版本 (iOS 5.1 中存在明顯的) 的應用程式。 `uuid`不是一個可靠的值。
+
+### Windows Phone 7 和 8 怪癖
+
+`uuid`為 Windows Phone 7 須經許可 `ID_CAP_IDENTITY_DEVICE` 。 Microsoft 可能會很快棄用此屬性。 如果沒有可用的能力,應用程式將生成設備上應用程式的安裝過程中保持持續的 guid。
+
+## device.version
+
+獲取作業系統版本。
+
+ var string = device.version;
+
+
+### 支援的平臺
+
+* Android 2.1 +
+* 黑莓 10
+* 瀏覽器
+* iOS
+* 泰
+* Windows Phone 7 和 8
+* Windows 8
+
+### 快速的示例
+
+ // Android: Froyo OS would return "2.2"
+ // Eclair OS would return "2.1", "2.0.1", or "2.0"
+ // Version can also return update level "2.1-update1"
+ //
+ // BlackBerry: Torch 9800 using OS 6.0 would return "6.0.0.600"
+ //
+ // Browser: Returns version number for the browser
+ //
+ // iPhone: iOS 3.2 returns "3.2"
+ //
+ // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720
+ // Tizen: returns "TIZEN_20120425_2"
+ var deviceVersion = device.version;
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/plugin.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/plugin.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,168 @@
+
+
+
+
+ Device
+ Cordova Device Plugin
+ Apache 2.0
+ cordova,device
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git
+ https://issues.apache.org/jira/browse/CB/component/12320648
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ read_device_identifying_information
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/android/Device.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/android/Device.java Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,156 @@
+/*
+ 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.
+*/
+package org.apache.cordova.device;
+
+import java.util.TimeZone;
+
+import org.apache.cordova.CordovaWebView;
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.CordovaInterface;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.provider.Settings;
+
+public class Device extends CordovaPlugin {
+ public static final String TAG = "Device";
+
+ public static String platform; // Device OS
+ public static String uuid; // Device UUID
+
+ private static final String ANDROID_PLATFORM = "Android";
+ private static final String AMAZON_PLATFORM = "amazon-fireos";
+ private static final String AMAZON_DEVICE = "Amazon";
+
+ /**
+ * Constructor.
+ */
+ public Device() {
+ }
+
+ /**
+ * Sets the context of the Command. This can then be used to do things like
+ * get file paths associated with the Activity.
+ *
+ * @param cordova The context of the main Activity.
+ * @param webView The CordovaWebView Cordova is running in.
+ */
+ public void initialize(CordovaInterface cordova, CordovaWebView webView) {
+ super.initialize(cordova, webView);
+ Device.uuid = getUuid();
+ }
+
+ /**
+ * Executes the request and returns PluginResult.
+ *
+ * @param action The action to execute.
+ * @param args JSONArry of arguments for the plugin.
+ * @param callbackContext The callback id used when calling back into JavaScript.
+ * @return True if the action was valid, false if not.
+ */
+ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+ if (action.equals("getDeviceInfo")) {
+ JSONObject r = new JSONObject();
+ r.put("uuid", Device.uuid);
+ r.put("version", this.getOSVersion());
+ r.put("platform", this.getPlatform());
+ r.put("model", this.getModel());
+ callbackContext.success(r);
+ }
+ else {
+ return false;
+ }
+ return true;
+ }
+
+ //--------------------------------------------------------------------------
+ // LOCAL METHODS
+ //--------------------------------------------------------------------------
+
+ /**
+ * Get the OS name.
+ *
+ * @return
+ */
+ public String getPlatform() {
+ String platform;
+ if (isAmazonDevice()) {
+ platform = AMAZON_PLATFORM;
+ } else {
+ platform = ANDROID_PLATFORM;
+ }
+ return platform;
+ }
+
+ /**
+ * Get the device's Universally Unique Identifier (UUID).
+ *
+ * @return
+ */
+ public String getUuid() {
+ String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
+ return uuid;
+ }
+
+ public String getModel() {
+ String model = android.os.Build.MODEL;
+ return model;
+ }
+
+ public String getProductName() {
+ String productname = android.os.Build.PRODUCT;
+ return productname;
+ }
+
+ /**
+ * Get the OS version.
+ *
+ * @return
+ */
+ public String getOSVersion() {
+ String osversion = android.os.Build.VERSION.RELEASE;
+ return osversion;
+ }
+
+ public String getSDKVersion() {
+ @SuppressWarnings("deprecation")
+ String sdkversion = android.os.Build.VERSION.SDK;
+ return sdkversion;
+ }
+
+ public String getTimeZoneID() {
+ TimeZone tz = TimeZone.getDefault();
+ return (tz.getID());
+ }
+
+ /**
+ * Function to check if the device is manufactured by Amazon
+ *
+ * @return
+ */
+ public boolean isAmazonDevice() {
+ if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) {
+ return true;
+ }
+ return false;
+ }
+
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/blackberry10/index.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,68 @@
+/*
+ *
+ * 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 getModelName () {
+ var modelName = window.qnx.webplatform.device.modelName;
+ //Pre 10.2 (meaning Z10 or Q10)
+ if (typeof modelName === "undefined") {
+ if (window.screen.height === 720 && window.screen.width === 720) {
+ if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) {
+ modelName = "Q10";
+ } else {
+ modelName = "Q5";
+ }
+ } else if ((window.screen.height === 1280 && window.screen.width === 768) ||
+ (window.screen.height === 768 && window.screen.width === 1280)) {
+ modelName = "Z10";
+ } else {
+ modelName = window.qnx.webplatform.deviceName;
+ }
+ }
+
+ return modelName;
+}
+
+function getUUID () {
+ var uuid = "";
+ try {
+ //Must surround by try catch because this will throw if the app is missing permissions
+ uuid = window.qnx.webplatform.device.devicePin;
+ } catch (e) {
+ //DO Nothing
+ }
+ return uuid;
+}
+
+module.exports = {
+ getDeviceInfo: function (success, fail, args, env) {
+ var result = new PluginResult(args, env),
+ modelName = getModelName(),
+ uuid = getUUID(),
+ info = {
+ platform: "blackberry10",
+ version: window.qnx.webplatform.device.scmBundle,
+ model: modelName,
+ uuid: uuid
+ };
+
+ result.ok(info);
+ }
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/browser/DeviceProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/browser/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,78 @@
+/*
+ *
+ * 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.
+ *
+ */
+var browser = require('cordova/platform');
+var cordova = require('cordova');
+
+function getPlatform() {
+ return "browser";
+}
+
+function getModel() {
+ return getBrowserInfo(true);
+}
+
+function getVersion() {
+ return getBrowserInfo(false);
+}
+
+function getBrowserInfo(getModel) {
+ var userAgent = navigator.userAgent;
+ var returnVal;
+
+ if ((offset = userAgent.indexOf('Chrome')) !== -1) {
+ returnVal = (getModel) ? 'Chrome' : userAgent.substring(offset + 7);
+ } else if ((offset = userAgent.indexOf('Safari')) !== -1) {
+ if (getModel) {
+ returnVal = 'Safari';
+ } else {
+ returnVal = userAgent.substring(offset + 7);
+
+ if ((offset = userAgent.indexOf('Version')) !== -1) {
+ returnVal = userAgent.substring(offset + 8);
+ }
+ }
+ } else if ((offset = userAgent.indexOf('Firefox')) !== -1) {
+ returnVal = (getModel) ? 'Firefox' : userAgent.substring(offset + 8);
+ }
+
+ if ((offset = returnVal.indexOf(';')) !== -1 || (offset = returnVal.indexOf(' ')) !== -1) {
+ returnVal = returnVal.substring(0, offset);
+ }
+
+ return returnVal;
+}
+
+
+module.exports = {
+ getDeviceInfo: function (success, error) {
+ setTimeout(function () {
+ success({
+ cordova: browser.cordovaVersion,
+ platform: getPlatform(),
+ model: getModel(),
+ version: getVersion(),
+ uuid: null
+ });
+ }, 0);
+ }
+};
+
+require("cordova/exec/proxy").add("Device", module.exports);
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,79 @@
+/*
+ *
+ * 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.
+ *
+ */
+//example UA String for Firefox OS
+//Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0
+var firefoxos = require('cordova/platform');
+var cordova = require('cordova');
+
+//UA parsing not recommended but currently this is the only way to get the Firefox OS version
+//https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference
+
+//Should be replaced when better conversion to Firefox OS Version is available
+function convertVersionNumber(ver) {
+ var hashVersion = {
+ '18.0': '1.0.1',
+ '18.1': '1.1',
+ '26.0': '1.2',
+ '28.0': '1.3',
+ '30.0': '1.4',
+ '32.0': '2.0'
+ };
+ var rver = ver;
+ var sStr = ver.substring(0, 4);
+ if (hashVersion[sStr]) {
+ rver = hashVersion[sStr];
+ }
+ return (rver);
+
+}
+function getVersion() {
+ if (navigator.userAgent.match(/(mobile|tablet)/i)) {
+ var ffVersionArray = (navigator.userAgent.match(/Firefox\/([\d]+\.[\w]?\.?[\w]+)/));
+ if (ffVersionArray.length === 2) {
+ return (convertVersionNumber(ffVersionArray[1]));
+ }
+ }
+ return (null);
+}
+
+function getModel() {
+ var uaArray = navigator.userAgent.split(/\s*[;)(]\s*/);
+ if (navigator.userAgent.match(/(mobile|tablet)/i)) {
+ if (uaArray.length === 5) {
+ return (uaArray[2]);
+ }
+ }
+ return (null);
+}
+module.exports = {
+ getDeviceInfo: function (success, error) {
+ setTimeout(function () {
+ success({
+ platform: 'firefoxos',
+ model: getModel(),
+ version: getVersion(),
+ uuid: null
+ });
+ }, 0);
+ }
+};
+
+require("cordova/exec/proxy").add("Device", module.exports);
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,30 @@
+/*
+ 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.
+ */
+
+#import
+#import
+
+@interface CDVDevice : CDVPlugin
+{}
+
++ (NSString*)cordovaVersion;
+
+- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command;
+
+@end
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/ios/CDVDevice.m Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,76 @@
+/*
+ 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.
+ */
+
+#include
+#include
+
+#import
+#import "CDVDevice.h"
+
+@implementation UIDevice (ModelVersion)
+
+- (NSString*)modelVersion
+{
+ size_t size;
+
+ sysctlbyname("hw.machine", NULL, &size, NULL, 0);
+ char* machine = malloc(size);
+ sysctlbyname("hw.machine", machine, &size, NULL, 0);
+ NSString* platform = [NSString stringWithUTF8String:machine];
+ free(machine);
+
+ return platform;
+}
+
+@end
+
+@interface CDVDevice () {}
+@end
+
+@implementation CDVDevice
+
+- (void)getDeviceInfo:(CDVInvokedUrlCommand*)command
+{
+ NSDictionary* deviceProperties = [self deviceProperties];
+ CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties];
+
+ [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId];
+}
+
+- (NSDictionary*)deviceProperties
+{
+ UIDevice* device = [UIDevice currentDevice];
+ NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4];
+
+ [devProps setObject:[device modelVersion] forKey:@"model"];
+ [devProps setObject:@"iOS" forKey:@"platform"];
+ [devProps setObject:[device systemVersion] forKey:@"version"];
+ [devProps setObject:[device uniqueAppInstanceIdentifier] forKey:@"uuid"];
+ [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"];
+
+ NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps];
+ return devReturn;
+}
+
++ (NSString*)cordovaVersion
+{
+ return CDV_VERSION;
+}
+
+@end
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/tizen/DeviceProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/tizen/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,39 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var tizen = require('cordova/platform');
+var cordova = require('cordova');
+
+module.exports = {
+ getDeviceInfo: function(success, error) {
+ setTimeout(function () {
+ success({
+ cordova: tizen.cordovaVersion,
+ platform: 'tizen',
+ model: null,
+ version: null,
+ uuid: null
+ });
+ }, 0);
+ }
+};
+
+require("cordova/tizen/commandProxy").add("Device", module.exports);
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.cpp Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,64 @@
+/*
+ * Copyright 2011 Wolfgang Koller - http://www.gofg.at/
+ *
+ * Licensed 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.
+ */
+
+#include
+#include
+
+#include"device.h"
+
+#define CORDOVA "3.0.0"
+
+Device::Device(Cordova *cordova) : CPlugin(cordova) {
+}
+
+static QString getOSName() {
+#ifdef Q_OS_SYMBIAN
+ QString platform = "Symbian";
+#endif
+#ifdef Q_OS_WIN
+ QString platform = "Windows";
+#endif
+#ifdef Q_OS_WINCE
+ QString platform = "Windows CE";
+#endif
+#ifdef Q_OS_LINUX
+ QString platform = "Linux";
+#endif
+ return platform;
+}
+
+void Device::getInfo(int scId, int ecId) {
+ Q_UNUSED(ecId)
+
+ QDeviceInfo systemDeviceInfo;
+ QDeviceInfo systemInfo;
+
+ QString platform = getOSName();
+
+ QString uuid = systemDeviceInfo.uniqueDeviceID();
+ if (uuid.isEmpty()) {
+ QString deviceDescription = systemInfo.imei(0) + ";" + systemInfo.manufacturer() + ";" + systemInfo.model() + ";" + systemInfo.productName() + ";" + platform;
+ QString user = qgetenv("USER");
+ if (user.isEmpty()) {
+ user = qgetenv("USERNAME");
+ if (user.isEmpty())
+ user = QDir::homePath();
+ }
+ uuid = QString(QCryptographicHash::hash((deviceDescription + ";" + user).toUtf8(), QCryptographicHash::Md5).toHex());
+ }
+
+ this->cb(scId, systemDeviceInfo.model(), CORDOVA, platform, uuid, systemInfo.version(QDeviceInfo::Os));
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2011 Wolfgang Koller - http://www.gofg.at/
+ *
+ * Licensed 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.
+ */
+
+#ifndef DEVICE_H_FDSAFAS
+#define DEVICE_H_FDSAFAS
+
+#include
+
+#include
+
+class Device: public CPlugin {
+ Q_OBJECT
+public:
+ explicit Device(Cordova *cordova);
+
+ virtual const QString fullName() override {
+ return Device::fullID();
+ }
+
+ virtual const QString shortName() override {
+ return "Device";
+ }
+
+ static const QString fullID() {
+ return "com.cordova.Device";
+ }
+
+signals:
+
+public slots:
+ void getInfo(int scId, int ecId);
+};
+
+#endif
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/ubuntu/device.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,34 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var cordova = require('cordova');
+var exec = require('cordova/exec');
+
+module.exports = {
+ getInfo:function(win,fail,args) {
+ Cordova.exec(function (model, cordova, platform, uuid, version) {
+ win({name: name, model: model, cordova: cordova,
+ platform: platform, uuid: uuid, version: version});
+ }, null, "com.cordova.Device", "getInfo", []);
+ }
+};
+
+require("cordova/exec/proxy").add("Device", module.exports);
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/windows/DeviceProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/windows/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+module.exports = {
+
+ getDeviceInfo:function(win, fail, args) {
+
+ // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
+ var deviceId;
+ var localSettings = Windows.Storage.ApplicationData.current.localSettings;
+ if (localSettings.values.deviceId) {
+ deviceId = localSettings.values.deviceId;
+ }
+ else {
+ // App-specific hardware id could be used as uuid, but it changes if the hardware changes...
+ try {
+ var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id;
+ deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid();
+ } catch (e) {
+ // Couldn't get the hardware UUID
+ deviceId = createUUID();
+ }
+ //...so cache it per-install
+ localSettings.values.deviceId = deviceId;
+ }
+
+ var userAgent = window.clientInformation.userAgent,
+ // this will report "windows" in windows8.1 and windows phone 8.1 apps
+ // and "windows8" in windows 8.0 apps similar to cordova.js
+ // See https://github.com/apache/cordova-js/blob/master/src/windows/platform.js#L25
+ devicePlatform = userAgent.indexOf("MSAppHost/1.0") == -1 ? "windows" : "windows8",
+ versionString = userAgent.match(/Windows (?:Phone |NT )?([0-9.]+)/)[1];
+
+ var ROOT_CONTAINER = "{00000000-0000-0000-FFFF-FFFFFFFFFFFF}";
+ var DEVICE_CLASS_KEY = "{A45C254E-DF1C-4EFD-8020-67D146A850E0},10";
+ var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10';
+ var ROOT_CONTAINER_QUERY = "System.Devices.ContainerId:=\"" + ROOT_CONTAINER + "\"";
+ var HAL_DEVICE_CLASS = "4d36e966-e325-11ce-bfc1-08002be10318";
+ var DEVICE_DRIVER_VERSION_KEY = "{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3";
+ var pnpObject = Windows.Devices.Enumeration.Pnp.PnpObject;
+ pnpObject.findAllAsync(Windows.Devices.Enumeration.Pnp.PnpObjectType.device,
+ [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY)
+ .then(function(rootDevices) {
+ for (var i = 0; i < rootDevices.length; i++) {
+ var rootDevice = rootDevices[i];
+ if (!rootDevice.properties) continue;
+ if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] == HAL_DEVICE_CLASS) {
+ versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY];
+ break;
+ }
+ }
+
+ setTimeout(function () {
+ win({ platform: devicePlatform, version: versionString,
+ uuid: deviceId, model: window.clientInformation.platform });
+ }, 0);
+ });
+ }
+
+};
+
+require("cordova/exec/proxy").add("Device", module.exports);
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,82 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+
+var cordova = require('cordova');
+var utils = require('cordova/utils');
+
+module.exports = {
+
+ getDeviceInfo:function(win,fail,args) {
+
+ // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId
+ var deviceId;
+
+ var localSettings = Windows.Storage.ApplicationData.current.localSettings;
+
+ if (localSettings.values.deviceId) {
+ deviceId = localSettings.values.deviceId;
+ }
+ else {
+ // App-specific hardware id could be used as uuid, but it changes if the hardware changes...
+ try {
+ var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id;
+ deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid();
+ } catch (e) {
+ // Couldn't get the hardware UUID
+ deviceId = createUUID();
+ }
+ //...so cache it per-install
+ localSettings.values.deviceId = deviceId;
+ }
+
+ var versionString = window.clientInformation.userAgent.match(/Windows NT ([0-9.]+)/)[1];
+
+ (function(self){
+ var ROOT_CONTAINER = "{00000000-0000-0000-FFFF-FFFFFFFFFFFF}";
+ var DEVICE_CLASS_KEY = "{A45C254E-DF1C-4EFD-8020-67D146A850E0},10";
+ var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10';
+ var ROOT_CONTAINER_QUERY = "System.Devices.ContainerId:=\"" + ROOT_CONTAINER + "\"";
+ var HAL_DEVICE_CLASS = "4d36e966-e325-11ce-bfc1-08002be10318";
+ var DEVICE_DRIVER_VERSION_KEY = "{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3";
+ var pnpObject = Windows.Devices.Enumeration.Pnp.PnpObject;
+ pnpObject.findAllAsync(Windows.Devices.Enumeration.Pnp.PnpObjectType.device, [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY).then(function(rootDevices) {
+
+ for (var i = 0; i < rootDevices.length; i++) {
+ var rootDevice = rootDevices[i];
+ if (!rootDevice.properties) continue;
+ if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] == HAL_DEVICE_CLASS) {
+ versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY];
+ break;
+ }
+ }
+
+ setTimeout(function () {
+ win({ platform: "windows8", version: versionString, uuid: deviceId, model: window.clientInformation.platform });
+ }, 0);
+ });
+ })(this);
+ }
+
+};
+
+require("cordova/exec/proxy").add("Device", module.exports);
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/src/wp/Device.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/src/wp/Device.cs Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,123 @@
+/*
+ Licensed 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.
+*/
+
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Info;
+using System.IO.IsolatedStorage;
+using System.Windows.Resources;
+using System.IO;
+using System.Diagnostics;
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+ public class Device : BaseCommand
+ {
+ public void getDeviceInfo(string notused)
+ {
+
+ string res = String.Format("\"name\":\"{0}\",\"platform\":\"{1}\",\"uuid\":\"{2}\",\"version\":\"{3}\",\"model\":\"{4}\"",
+ this.name,
+ this.platform,
+ this.uuid,
+ this.version,
+ this.model);
+
+ res = "{" + res + "}";
+ //Debug.WriteLine("Result::" + res);
+ DispatchCommandResult(new PluginResult(PluginResult.Status.OK, res));
+ }
+
+ public string model
+ {
+ get
+ {
+ return DeviceStatus.DeviceName;
+ //return String.Format("{0},{1},{2}", DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceHardwareVersion, DeviceStatus.DeviceFirmwareVersion);
+ }
+ }
+
+ public string name
+ {
+ get
+ {
+ return DeviceStatus.DeviceName;
+
+ }
+ }
+
+ public string platform
+ {
+ get
+ {
+ return Environment.OSVersion.Platform.ToString();
+ }
+ }
+
+ public string uuid
+ {
+ get
+ {
+ string returnVal = "";
+ object id;
+ UserExtendedProperties.TryGetValue("ANID", out id);
+
+ if (id != null)
+ {
+ returnVal = id.ToString().Substring(2, 32);
+ }
+ else
+ {
+ returnVal = "???unknown???";
+
+ using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication())
+ {
+ try
+ {
+ IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("DeviceID.txt", FileMode.Open, FileAccess.Read, appStorage);
+
+ using (StreamReader reader = new StreamReader(fileStream))
+ {
+ returnVal = reader.ReadLine();
+ }
+ }
+ catch (Exception /*ex*/)
+ {
+
+ }
+ }
+ }
+
+ return returnVal;
+ }
+ }
+
+ public string version
+ {
+ get
+ {
+ return Environment.OSVersion.Version.ToString();
+ }
+ }
+
+ }
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/tests/plugin.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/tests/plugin.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,31 @@
+
+
+
+
+ Cordova Device Plugin Tests
+ Apache 2.0
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/tests/tests.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/tests/tests.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,94 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+exports.defineAutoTests = function() {
+ describe('Device Information (window.device)', function () {
+ it("should exist", function() {
+ expect(window.device).toBeDefined();
+ });
+
+ it("should contain a platform specification that is a string", function() {
+ expect(window.device.platform).toBeDefined();
+ expect((new String(window.device.platform)).length > 0).toBe(true);
+ });
+
+ it("should contain a version specification that is a string", function() {
+ expect(window.device.version).toBeDefined();
+ expect((new String(window.device.version)).length > 0).toBe(true);
+ });
+
+ it("should contain a UUID specification that is a string or a number", function() {
+ expect(window.device.uuid).toBeDefined();
+ if (typeof window.device.uuid == 'string' || typeof window.device.uuid == 'object') {
+ expect((new String(window.device.uuid)).length > 0).toBe(true);
+ } else {
+ expect(window.device.uuid > 0).toBe(true);
+ }
+ });
+
+ it("should contain a cordova specification that is a string", function() {
+ expect(window.device.cordova).toBeDefined();
+ expect((new String(window.device.cordova)).length > 0).toBe(true);
+ });
+
+ it("should depend on the precense of cordova.version string", function() {
+ expect(window.cordova.version).toBeDefined();
+ expect((new String(window.cordova.version)).length > 0).toBe(true);
+ });
+
+ it("should contain device.cordova equal to cordova.version", function() {
+ expect(window.device.cordova).toBe(window.cordova.version);
+ });
+
+ it("should contain a model specification that is a string", function() {
+ expect(window.device.model).toBeDefined();
+ expect((new String(window.device.model)).length > 0).toBe(true);
+ });
+ });
+};
+
+exports.defineManualTests = function(contentEl, createActionButton) {
+ var logMessage = function (message, color) {
+ var log = document.getElementById('info');
+ var logLine = document.createElement('div');
+ if (color) {
+ logLine.style.color = color;
+ }
+ logLine.innerHTML = message;
+ log.appendChild(logLine);
+ }
+
+ var clearLog = function () {
+ var log = document.getElementById('info');
+ log.innerHTML = '';
+ }
+
+ var device_tests = '
Press Dump Device button to get device information
' +
+ '' +
+ 'Expected result: Status box will get updated with device info. (i.e. platform, version, uuid, model, etc)';
+
+ contentEl.innerHTML = '' + device_tests;
+
+ createActionButton('Dump device', function() {
+ clearLog();
+ logMessage(JSON.stringify(window.device, null, '\t'));
+ }, "dump_device");
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.device/www/device.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.device/www/device.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,77 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var argscheck = require('cordova/argscheck'),
+ channel = require('cordova/channel'),
+ utils = require('cordova/utils'),
+ exec = require('cordova/exec'),
+ cordova = require('cordova');
+
+channel.createSticky('onCordovaInfoReady');
+// Tell cordova channel to wait on the CordovaInfoReady event
+channel.waitForInitialization('onCordovaInfoReady');
+
+/**
+ * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the
+ * phone, etc.
+ * @constructor
+ */
+function Device() {
+ this.available = false;
+ this.platform = null;
+ this.version = null;
+ this.uuid = null;
+ this.cordova = null;
+ this.model = null;
+
+ var me = this;
+
+ channel.onCordovaReady.subscribe(function() {
+ me.getInfo(function(info) {
+ //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js
+ //TODO: CB-5105 native implementations should not return info.cordova
+ var buildLabel = cordova.version;
+ me.available = true;
+ me.platform = info.platform;
+ me.version = info.version;
+ me.uuid = info.uuid;
+ me.cordova = buildLabel;
+ me.model = info.model;
+ channel.onCordovaInfoReady.fire();
+ },function(e) {
+ me.available = false;
+ utils.alert("[ERROR] Error initializing Cordova: " + e);
+ });
+ });
+}
+
+/**
+ * Get device info
+ *
+ * @param {Function} successCallback The function to call when the heading data is available
+ * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL)
+ */
+Device.prototype.getInfo = function(successCallback, errorCallback) {
+ argscheck.checkArgs('fF', 'Device.getInfo', arguments);
+ exec(successCallback, errorCallback, "Device", "getDeviceInfo", []);
+};
+
+module.exports = new Device();
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/.fetch.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/.fetch.json Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,1 @@
+{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.dialogs"}}
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/CONTRIBUTING.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,37 @@
+
+
+# Contributing to Apache Cordova
+
+Anyone can contribute to Cordova. And we need your contributions.
+
+There are multiple ways to contribute: report bugs, improve the docs, and
+contribute code.
+
+For instructions on this, start with the
+[contribution overview](http://cordova.apache.org/#contribute).
+
+The details are explained there, but the important items are:
+ - Sign and submit an Apache ICLA (Contributor License Agreement).
+ - Have a Jira issue open that corresponds to your contribution.
+ - Run the tests so your patch doesn't break existing functionality.
+
+We look forward to your contributions!
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/LICENSE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/LICENSE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/NOTICE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/NOTICE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,5 @@
+Apache Cordova
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/README.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,22 @@
+
+
+# org.apache.cordova.dialogs
+
+Plugin documentation: [doc/index.md](doc/index.md)
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/RELEASENOTES.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,112 @@
+
+# Release Notes
+
+### 0.2.2 (Sept 25, 2013)
+* CB-4889 bumping&resetting version
+* [windows8] commandProxy was moved
+* CB-4889 renaming reference in Notification.cs
+* CB-4889 renaming org.apache.cordova.core.dialogs to org.apache.cordova.dialogs
+* Rename CHANGELOG.md -> RELEASENOTES.md
+* [CB-4592] [Blackberry10] Added beep support
+* [CB-4752] Incremented plugin version on dev branch.
+
+ ### 0.2.3 (Oct 28, 2013)
+* CB-5128: added repo + issue tag to plugin.xml for dialogs plugin
+* new plugin execute arguments supported
+* new plugin style
+* smaller fonts styling input
+* img files copied inside plugin
+* style added
+* prompt added
+* styling from James
+* fixed "exec" calls addedd css, but not working yet
+* first (blind) try
+* [CB-4915] Incremented plugin version on dev branch.
+
+
+### 0.2.4 (Dec 4, 2013)
+* add ubuntu platform
+* 1. Added amazon-fireos platform. 2. Change to use amazon-fireos as a platform if user agent string contains 'cordova-amazon-fireos'.
+* added beep funtionality using ms-winsoundevent:Notfication.Default
+
+### 0.2.5 (Jan 02, 2014)
+* CB-4696 Fix compile error for Xcode 4.5.
+* CB-5658 Add doc/index.md for Dialogs plugin
+* CB-3762 Change prompt default to empty string
+* Move images from css to img
+
+### 0.2.6 (Feb 05, 2014)
+* no need to recreate the manifest.webapp file after each `cordova prepare` for FFOS
+* FFOS description added
+
+### 0.2.7 (Apr 17, 2014)
+* CB-6212: [iOS] fix warnings compiled under arm64 64-bit
+* CB-6411: [BlackBerry10] Work around Audio playback issue
+* CB-6411: [BlackBerry10] Updates to beep
+* CB-6422: [windows8] use cordova/exec/proxy
+* CB-6460: Update license headers
+* Add NOTICE file
+
+### 0.2.8 (Jun 05, 2014)
+* CB-6801 Add license
+* running original windows.open, inAppBrowser is overriding it no need to place CSS in every page anymore
+* CB-5945 [Windows8] do not call success callbacks until dialog is dismissed
+* CB-4616 Returned index 0 was not documented for notification.prompt
+* update docs to state that prompt is supported on windowsphone
+* CB-6528 allow scroll on alert message content
+* [CB-6628][amazon-fireos]dialogs plugin's confirm and prompt methods dont work confirm() method was missing amazon-fireos platform check. added that. prompt() method had bug. It is executed in a worker thread that does not have a message queue(or Looper object) associated with it and hence "can't create a handler" exception is thrown. To fix this issue, we need to create the EditText widget from within the UI thread. This was fixed sometime ago when we added fireos platform but commit got lost somewhere. So fixing it again now.
+* CB-6491 add CONTRIBUTING.md
+* Added check for isFinishing() on the parent activity to prevent crashes when trying to display dialogs when activity is in this phase of it's lifecycle
+* CB-4966 Dialogs are in window now No need to add anything to manifest or index.html
+* Removing FirefoxOS Quirks * no need to add special permission (it's different API with the same name) * notification.css is added automatically
+
+### 0.2.9 (Aug 06, 2014)
+* ubuntu: pass proper arguments to prompt callback
+* ubuntu: use TextField instead of TextInput
+* ubuntu: proper message escaping before passing to qml
+* **FFOS** update notification.js
+* CB-6127 Updated translations for docs
+* android: Explicitly apply default theme to dialogs
+* Fix Beep exception on Android when no argument passed
+
+### 0.2.10 (Sep 17, 2014)
+* CB-7538 Android beep thread fix Beep now executes in it's own thread. It was previously executing in the main UI thread which was causing the application to lock up will the beep was occurring. Closing pull request
+* Set dialog text dir to locale
+* Renamed test dir, added nested plugin.xml
+* added documentation for manual tests
+* CB-6965 Added manual tests
+* CB-6965 Port notification tests to test-framework
+
+### 0.2.11 (Dec 02, 2014)
+* [CB-7737] lower min height for alert
+* CB-8038 backslash getting escaped twice in **BB10**
+* CB-8029 test 1-based indexing for confirm
+* CB-7639 Update docs + manual tests
+* CB-7639 Revert back `isAlertShowing` flag in case of exception to prevent queuing of future dialogs.
+* CB-7639 Handle button labels as array on windows
+* CB-7977 Mention `deviceready` in plugin docs
+* Check for `setTextDirection` API level
+* **Android** Make spinner dialog to use `THEME_DEVICE_DEFAULT_LIGHT` (same as the other dialogs)
+* **Android** Unbreak `API` level < `14`
+* CB-7414 **BB10** Document callback parameter for `navigator.notification.alert`
+* CB-7700 cordova-plugin-dialogs documentation translation: cordova-plugin-dialogs
+* CB-7571 Bump version of nested plugin to match parent plugin
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/de/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+Dieses Plugin ermöglicht den Zugriff auf einige native Dialog-UI-Elemente.
+
+## Installation
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## Methoden
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+Zeigt eine benutzerdefinierte Warnung oder Dialogfeld Feld. Die meisten Implementierungen von Cordova ein native Dialogfeld für dieses Feature verwenden, aber einige Plattformen des Browsers `alert` Funktion, die in der Regel weniger anpassbar ist.
+
+ Navigator.Notification.Alert (Message, AlertCallback, [Titel], [ButtonName])
+
+
+* **Nachricht**: Dialogfeld Nachricht. *(String)*
+
+* **AlertCallback**: Callback aufgerufen wird, wenn Warnungs-Dialogfeld geschlossen wird. *(Funktion)*
+
+* **Titel**: Dialog "Titel". *(String)* (Optional, Standard ist`Alert`)
+
+* **ButtonName**: Name der Schaltfläche. *(String)* (Optional, Standard ist`OK`)
+
+### Beispiel
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### Unterstützte Plattformen
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+### Windows Phone 7 und 8 Eigenarten
+
+* Es gibt keine eingebaute Datenbanksuchroutine-Warnung, aber Sie können binden, wie folgt zu nennen `alert()` im globalen Gültigkeitsbereich:
+
+ window.alert = navigator.notification.alert;
+
+
+* Beide `alert` und `confirm` sind nicht blockierende Aufrufe, die Ergebnisse davon nur asynchron sind.
+
+### Firefox OS Macken:
+
+Beide Native blockierenden `window.alert()` und nicht-blockierende `navigator.notification.alert()` stehen zur Verfügung.
+
+## navigator.notification.confirm
+
+Zeigt das Dialogfeld anpassbare Bestätigung.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **Nachricht**: Dialogfeld Nachricht. *(String)*
+
+* **ConfirmCallback**: Callback aufgerufen wird, mit Index gedrückt (1, 2 oder 3) oder wenn das Dialogfeld geschlossen wird, ohne einen Tastendruck (0). *(Funktion)*
+
+* **Titel**: Dialog "Titel". *(String)* (Optional, Standard ist`Confirm`)
+
+* **ButtonLabels**: Array von Zeichenfolgen, die Schaltflächenbezeichnungen angeben. *(Array)* (Optional, Standard ist [ `OK,Cancel` ])
+
+### confirmCallback
+
+Die `confirmCallback` wird ausgeführt, wenn der Benutzer eine der Schaltflächen im Dialogfeld zur Bestätigung drückt.
+
+Der Rückruf dauert das Argument `buttonIndex` *(Anzahl)*, die der Index der Schaltfläche gedrückt ist. Beachten Sie, dass der Index 1-basierte Indizierung, verwendet, sodass der Wert ist `1` , `2` , `3` , etc..
+
+### Beispiel
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### Unterstützte Plattformen
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+### Windows Phone 7 und 8 Eigenarten
+
+* Es gibt keine integrierte Browser-Funktion für `window.confirm` , aber Sie können es binden, indem Sie zuweisen:
+
+ window.confirm = navigator.notification.confirm;
+
+
+* Aufrufe von `alert` und `confirm` sind nicht blockierend, so dass das Ergebnis nur asynchron zur Verfügung steht.
+
+### Firefox OS Macken:
+
+Beide Native blockierenden `window.confirm()` und nicht-blockierende `navigator.notification.confirm()` stehen zur Verfügung.
+
+## navigator.notification.prompt
+
+Zeigt eine native Dialogfeld, das mehr als des Browsers anpassbar ist `prompt` Funktion.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **Nachricht**: Dialogfeld Nachricht. *(String)*
+
+* **PromptCallback**: Callback aufgerufen wird, mit Index gedrückt (1, 2 oder 3) oder wenn das Dialogfeld geschlossen wird, ohne einen Tastendruck (0). *(Funktion)*
+
+* **Titel**: Dialog Title *(String)* (Optional, Standard ist`Prompt`)
+
+* **ButtonLabels**: Array von Zeichenfolgen angeben Schaltfläche Etiketten *(Array)* (Optional, Standard ist`["OK","Cancel"]`)
+
+* **DefaultText**: Standard-Textbox Eingabewert ( `String` ) (Optional, Standard: leere Zeichenfolge)
+
+### promptCallback
+
+Die `promptCallback` wird ausgeführt, wenn der Benutzer eine der Schaltflächen im Eingabedialogfeld drückt. Die `results` an den Rückruf übergebene Objekt enthält die folgenden Eigenschaften:
+
+* **ButtonIndex**: der Index der Schaltfläche gedrückt. *(Anzahl)* Beachten Sie, dass der Index 1-basierte Indizierung, verwendet, sodass der Wert ist `1` , `2` , `3` , etc..
+
+* **Eingang1**: in Eingabedialogfeld eingegebenen Text. *(String)*
+
+### Beispiel
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### Unterstützte Plattformen
+
+* Amazon Fire OS
+* Android
+* Firefox OS
+* iOS
+* Windows Phone 7 und 8
+
+### Android Eigenarten
+
+* Android unterstützt maximal drei Schaltflächen und mehr als das ignoriert.
+
+* Auf Android 3.0 und höher, werden die Schaltflächen in umgekehrter Reihenfolge für Geräte angezeigt, die das Holo-Design verwenden.
+
+### Firefox OS Macken:
+
+Beide Native blockierenden `window.prompt()` und nicht-blockierende `navigator.notification.prompt()` stehen zur Verfügung.
+
+## navigator.notification.beep
+
+Das Gerät spielt einen Signalton sound.
+
+ navigator.notification.beep(times);
+
+
+* **Zeiten**: die Anzahl der Wiederholungen des Signaltons. *(Anzahl)*
+
+### Beispiel
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### Unterstützte Plattformen
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 und 8
+* Windows 8
+
+### Amazon Fire OS Macken
+
+* Amazon Fire OS spielt die Standardeinstellung **Akustische Benachrichtigung** unter **Einstellungen/Display & Sound** Bereich angegeben.
+
+### Android Eigenarten
+
+* Android spielt die Standardeinstellung **Benachrichtigung Klingelton** unter **Einstellungen/Sound & Display** -Panel angegeben.
+
+### Windows Phone 7 und 8 Eigenarten
+
+* Stützt sich auf eine generische Piepton-Datei aus der Cordova-Distribution.
+
+### Tizen Macken
+
+* Tizen implementiert Signaltöne durch Abspielen einer Audiodatei über die Medien API.
+
+* Die Beep-Datei muss kurz sein, befinden muss einem `sounds` Unterverzeichnis des Stammverzeichnisses der Anwendung, und muss den Namen`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/es/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+Este plugin proporciona acceso a algunos elementos de la interfaz nativa de diálogo.
+
+## Instalación
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## Métodos
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+Muestra un cuadro de alerta o diálogo personalizado. La mayoría de las implementaciones de Cordova utilizan un cuadro de diálogo nativa para esta característica, pero algunas plataformas utilizan el navegador `alert` la función, que es típicamente menos personalizable.
+
+ navigator.notification.alert(message, alertCallback, [title], [buttonName])
+
+
+* **message**: mensaje de diálogo. *(String)*
+
+* **alertCallback**: Callback para invocar al diálogo de alerta es desestimada. *(Función)*
+
+* **title**: título de diálogo. *(String)* (Opcional, el valor predeterminado de `Alert`)
+
+* **buttonName**: nombre del botón. *(String)* (Opcional, por defecto `Aceptar`)
+
+### Ejemplo
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### Plataformas soportadas
+
+* Amazon fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+### Windows Phone 7 y 8 rarezas
+
+* No hay ninguna alerta del navegador integrado, pero puede enlazar uno proceda a llamar `alert()` en el ámbito global:
+
+ window.alert = navigator.notification.alert;
+
+
+* `alert` y `confirm` son non-blocking llamadas, cuyos resultados sólo están disponibles de forma asincrónica.
+
+### Firefox OS rarezas:
+
+Dos nativos de bloqueo `window.alert()` y no-bloqueo `navigator.notification.alert()` están disponibles.
+
+## navigator.notification.confirm
+
+Muestra un cuadro de diálogo de confirmación personalizables.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **message**: mensaje de diálogo. *(String)*
+
+* **confirmCallback**: Callback para invocar con índice de botón pulsado (1, 2 o 3) o cuando el diálogo es despedido sin la presión del botón (0). *(Función)*
+
+* **title**: título de diálogo. *(String)* (Opcional, por defecto a `confirmar`)
+
+* **buttonLabels**: matriz de cadenas especificando las etiquetas de botón. *(Matriz)* (Opcional, por defecto [`OK, cancelar`])
+
+### confirmCallback
+
+El `confirmCallback` se ejecuta cuando el usuario presiona uno de los botones en el cuadro de diálogo de confirmación.
+
+La devolución de llamada toma el argumento `buttonIndex` *(número)*, que es el índice del botón presionado. Tenga en cuenta que el índice utiliza uno basado en la indexación, así que el valor es `1`, `2`, `3`, etc..
+
+### Ejemplo
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### Plataformas soportadas
+
+* Amazon fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+### Windows Phone 7 y 8 rarezas
+
+* No hay ninguna función de navegador incorporado para `window.confirm`, pero lo puede enlazar mediante la asignación:
+
+ window.confirm = navigator.notification.confirm;
+
+
+* Llamadas de `alert` y `confirm` son non-blocking, así que el resultado sólo está disponible de forma asincrónica.
+
+### Firefox OS rarezas:
+
+Dos nativos de bloqueo `window.confirm()` y no-bloqueo `navigator.notification.confirm()` están disponibles.
+
+## navigator.notification.prompt
+
+Muestra un cuadro de diálogo nativa que es más personalizable que del navegador `prompt` función.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **message**: mensaje de diálogo. *(String)*
+
+* **promptCallback**: Callback para invocar con índice del botón pulsado (1, 2 ó 3) o cuando el cuadro de diálogo es despedido sin la presión del botón (0). *(Función)*
+
+* **title**: título *(String)* (opcional, por defecto `puntual` de diálogo)
+
+* **buttonLabels**: matriz de cadenas especificando el botón etiquetas *(Array)* (opcional, por defecto `["OK", "Cancelar"]`)
+
+* **defaultText**: valor de la entrada predeterminada textbox ( `String` ) (opcional, por defecto: cadena vacía)
+
+### promptCallback
+
+El `promptCallback` se ejecuta cuando el usuario presiona uno de los botones en el cuadro de diálogo pronto. El objeto de `resultados` pasado a la devolución de llamada contiene las siguientes propiedades:
+
+* **buttonIndex**: el índice del botón presionado. *(Número)* Tenga en cuenta que el índice utiliza uno basado en la indexación, así que el valor es `1`, `2`, `3`, etc..
+
+* **input1**: el texto introducido en el cuadro de diálogo pronto. *(String)*
+
+### Ejemplo
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### Plataformas soportadas
+
+* Amazon fire OS
+* Android
+* Firefox OS
+* iOS
+* Windows Phone 7 y 8
+
+### Rarezas Android
+
+* Android soporta un máximo de tres botones e ignora nada más.
+
+* En Android 3.0 y posteriores, los botones se muestran en orden inverso para dispositivos que utilizan el tema de Holo.
+
+### Firefox OS rarezas:
+
+Dos nativos de bloqueo `window.prompt()` y no-bloqueo `navigator.notification.prompt()` están disponibles.
+
+## navigator.notification.beep
+
+El dispositivo reproduce un sonido sonido.
+
+ navigator.notification.beep(times);
+
+
+* **times**: el número de veces a repetir la señal. *(Número)*
+
+### Ejemplo
+
+ / / Pitido dos veces!
+ navigator.notification.beep(2);
+
+
+### Plataformas soportadas
+
+* Amazon fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 y 8
+* Windows 8
+
+### Amazon fuego OS rarezas
+
+* Amazon fuego OS reproduce el **Sonido de notificación** especificados en el panel de **configuración/pantalla y sonido** por defecto.
+
+### Rarezas Android
+
+* Android juega el **tono de notificación** especificados en el panel **ajustes de sonido y pantalla** por defecto.
+
+### Windows Phone 7 y 8 rarezas
+
+* Se basa en un archivo de sonido genérico de la distribución de Cordova.
+
+### Rarezas Tizen
+
+* Tizen implementa pitidos por reproducir un archivo de audio a través de los medios de comunicación API.
+
+* El archivo de sonido debe ser corto, debe estar ubicado en un `sounds` subdirectorio del directorio raíz de la aplicación y deben ser nombrados`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/fr/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+Ce plugin permet d'accéder à certains éléments d'interface utilisateur native de dialogue.
+
+## Installation
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## Méthodes
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+Affiche une boîte de dialogue ou d'alerte personnalisé. La plupart des implémentations de Cordova utilisent une boîte de dialogue natives pour cette fonctionnalité, mais certaines plates-formes du navigateur `alert` fonction, qui est généralement moins personnalisable.
+
+ Navigator.notification.Alert (message, alertCallback, [titre], [buttonName])
+
+
+* **message**: message de la boîte de dialogue. *(String)*
+
+* **alertCallback**: callback à appeler lorsque la boîte de dialogue d'alerte est rejetée. *(Fonction)*
+
+* **titre**: titre de la boîte de dialogue. *(String)* (Facultatif, par défaut`Alert`)
+
+* **buttonName**: nom du bouton. *(String)* (Facultatif, par défaut`OK`)
+
+### Exemple
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### Plates-formes prises en charge
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 et 8
+* Windows 8
+
+### Windows Phone 7 et 8 Quirks
+
+* Il n'y a aucune boîte de dialogue d'alerte intégrée au navigateur, mais vous pouvez en lier une pour appeler `alert()` dans le scope global:
+
+ window.alert = navigator.notification.alert;
+
+
+* Les deux appels `alert` et `confirm` sont non-blocants, leurs résultats ne sont disponibles que de façon asynchrone.
+
+### Firefox OS Quirks :
+
+Les deux indigènes bloquant `window.alert()` et non-bloquante `navigator.notification.alert()` sont disponibles.
+
+## navigator.notification.confirm
+
+Affiche une boîte de dialogue de confirmation personnalisable.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **message**: message de la boîte de dialogue. *(String)*
+
+* **confirmCallback**: callback à appeler avec l'index du bouton pressé (1, 2 ou 3) ou lorsque la boîte de dialogue est fermée sans qu'un bouton ne soit pressé (0). *(Fonction)*
+
+* **titre**: titre de dialogue. *(String)* (Facultatif, par défaut`Confirm`)
+
+* **buttonLabels**: tableau de chaînes spécifiant les étiquettes des boutons. *(Array)* (Optionnel, par défaut, [ `OK,Cancel` ])
+
+### confirmCallback
+
+Le `confirmCallback` s'exécute lorsque l'utilisateur appuie sur un bouton dans la boîte de dialogue de confirmation.
+
+Le rappel prend l'argument `buttonIndex` *(nombre)*, qui est l'index du bouton activé. Notez que l'index utilise base d'indexation, la valeur est `1` , `2` , `3` , etc..
+
+### Exemple
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### Plates-formes prises en charge
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Paciarelli
+* Windows Phone 7 et 8
+* Windows 8
+
+### Windows Phone 7 et 8 Quirks
+
+* Il n'y a aucune fonction intégrée au navigateur pour `window.confirm`, mais vous pouvez en lier une en affectant:
+
+ window.confirm = navigator.notification.confirm ;
+
+
+* Les appels à `alert` et `confirm` sont non-bloquants, donc le résultat est seulement disponible de façon asynchrone.
+
+### Firefox OS Quirks :
+
+Les deux indigènes bloquant `window.confirm()` et non-bloquante `navigator.notification.confirm()` sont disponibles.
+
+## navigator.notification.prompt
+
+Affiche une boîte de dialogue natif qui est plus personnalisable que le navigateur `prompt` fonction.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **message**: message de la boîte de dialogue. *(String)*
+
+* **promptCallback**: rappel d'invoquer avec l'index du bouton pressé (1, 2 ou 3) ou lorsque la boîte de dialogue est fermée sans une presse de bouton (0). *(Fonction)*
+
+* **titre**: titre de la boîte de dialogue. *(String)* (Facultatif, par défaut`Alert`)
+
+* **buttonLabels**: tableau de chaînes spécifiant les étiquettes de boutons *(Array)* (facultatif, par défaut, les étiquettes `["OK","Cancel"]`)
+
+* **defaultText**: texte par défaut de la zone de texte ( `String` ) (en option, par défaut : chaîne vide)
+
+### promptCallback
+
+Le `promptCallback` s'exécute lorsque l'utilisateur appuie sur un bouton dans la boîte de dialogue d'invite. Le `results` objet passé au rappel contient les propriétés suivantes :
+
+* **buttonIndex**: l'index du bouton activé. *(Nombre)* Notez que l'index utilise une indexation de base 1, donc la valeur est `1` , `2` , `3` , etc.
+
+* **entrée 1**: le texte entré dans la boîte de dialogue d'invite. *(String)*
+
+### Exemple
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### Plates-formes prises en charge
+
+* Amazon Fire OS
+* Android
+* Firefox OS
+* iOS
+* Windows Phone 7 et 8
+
+### Quirks Android
+
+* Android prend en charge un maximum de trois boutons et ignore plus que cela.
+
+* Sur Android 3.0 et versions ultérieures, les boutons sont affichés dans l'ordre inverse pour les appareils qui utilisent le thème Holo.
+
+### Firefox OS Quirks :
+
+Les deux indigènes bloquant `window.prompt()` et non-bloquante `navigator.notification.prompt()` sont disponibles.
+
+## navigator.notification.beep
+
+Le dispositif joue un bip sonore.
+
+ navigator.notification.beep(times);
+
+
+* **temps**: le nombre de fois répéter le bip. *(Nombre)*
+
+### Exemple
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### Plates-formes prises en charge
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Paciarelli
+* Windows Phone 7 et 8
+* Windows 8
+
+### Amazon Fire OS Quirks
+
+* Amazon Fire OS joue la valeur par défaut le **Son de Notification** spécifié sous le panneau **d'affichage des réglages/& Sound** .
+
+### Quirks Android
+
+* Android joue la **sonnerie de Notification** spécifié sous le panneau des **réglages/son et affichage** de valeur par défaut.
+
+### Windows Phone 7 et 8 Quirks
+
+* S'appuie sur un fichier générique bip de la distribution de Cordova.
+
+### Bizarreries de paciarelli
+
+* Paciarelli implémente les bips en lisant un fichier audio via les médias API.
+
+* Le fichier sonore doit être court, doit se trouver dans un `sounds` sous-répertoire du répertoire racine de l'application et doit être nommé`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,267 @@
+
+
+# org.apache.cordova.dialogs
+
+This plugin provides access to some native dialog UI elements
+via a global `navigator.notification` object.
+
+Although the object is attached to the global scoped `navigator`, it is not available until after the `deviceready` event.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(navigator.notification);
+ }
+
+## Installation
+
+ cordova plugin add org.apache.cordova.dialogs
+
+## Methods
+
+- `navigator.notification.alert`
+- `navigator.notification.confirm`
+- `navigator.notification.prompt`
+- `navigator.notification.beep`
+
+## navigator.notification.alert
+
+Shows a custom alert or dialog box. Most Cordova implementations use a native
+dialog box for this feature, but some platforms use the browser's `alert`
+function, which is typically less customizable.
+
+ navigator.notification.alert(message, alertCallback, [title], [buttonName])
+
+- __message__: Dialog message. _(String)_
+
+- __alertCallback__: Callback to invoke when alert dialog is dismissed. _(Function)_
+
+- __title__: Dialog title. _(String)_ (Optional, defaults to `Alert`)
+
+- __buttonName__: Button name. _(String)_ (Optional, defaults to `OK`)
+
+
+### Example
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- Firefox OS
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+- Windows
+
+### Windows Phone 7 and 8 Quirks
+
+- There is no built-in browser alert, but you can bind one as follows to call `alert()` in the global scope:
+
+ window.alert = navigator.notification.alert;
+
+- Both `alert` and `confirm` are non-blocking calls, results of which are only available asynchronously.
+
+### Firefox OS Quirks:
+
+Both native-blocking `window.alert()` and non-blocking `navigator.notification.alert()` are available.
+
+### BlackBerry 10 Quirks
+`navigator.notification.alert('text', callback, 'title', 'text')` callback parameter is passed the number 1.
+
+## navigator.notification.confirm
+
+Displays a customizable confirmation dialog box.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+- __message__: Dialog message. _(String)_
+
+- __confirmCallback__: Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). _(Function)_
+
+- __title__: Dialog title. _(String)_ (Optional, defaults to `Confirm`)
+
+- __buttonLabels__: Array of strings specifying button labels. _(Array)_ (Optional, defaults to [`OK,Cancel`])
+
+
+### confirmCallback
+
+The `confirmCallback` executes when the user presses one of the
+buttons in the confirmation dialog box.
+
+The callback takes the argument `buttonIndex` _(Number)_, which is the
+index of the pressed button. Note that the index uses one-based
+indexing, so the value is `1`, `2`, `3`, etc.
+
+### Example
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- Firefox OS
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+- Windows
+
+### Windows Phone 7 and 8 Quirks
+
+- There is no built-in browser function for `window.confirm`, but you can bind it by assigning:
+
+ window.confirm = navigator.notification.confirm;
+
+- Calls to `alert` and `confirm` are non-blocking, so the result is only available asynchronously.
+
+### Windows Quirks
+
+- On Windows8/8.1 it is not possible to add more than three buttons to MessageDialog instance.
+
+- On Windows Phone 8.1 it's not possible to show dialog with more than two buttons.
+
+### Firefox OS Quirks:
+
+Both native-blocking `window.confirm()` and non-blocking `navigator.notification.confirm()` are available.
+
+## navigator.notification.prompt
+
+Displays a native dialog box that is more customizable than the browser's `prompt` function.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+- __message__: Dialog message. _(String)_
+
+- __promptCallback__: Callback to invoke with index of button pressed (1, 2, or 3) or when the dialog is dismissed without a button press (0). _(Function)_
+
+- __title__: Dialog title _(String)_ (Optional, defaults to `Prompt`)
+
+- __buttonLabels__: Array of strings specifying button labels _(Array)_ (Optional, defaults to `["OK","Cancel"]`)
+
+- __defaultText__: Default textbox input value (`String`) (Optional, Default: empty string)
+
+### promptCallback
+
+The `promptCallback` executes when the user presses one of the buttons
+in the prompt dialog box. The `results` object passed to the callback
+contains the following properties:
+
+- __buttonIndex__: The index of the pressed button. _(Number)_ Note that the index uses one-based indexing, so the value is `1`, `2`, `3`, etc.
+
+
+
+- __input1__: The text entered in the prompt dialog box. _(String)_
+
+### Example
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- Firefox OS
+- iOS
+- Windows Phone 7 and 8
+
+### Android Quirks
+
+- Android supports a maximum of three buttons, and ignores any more than that.
+
+- On Android 3.0 and later, buttons are displayed in reverse order for devices that use the Holo theme.
+
+### Firefox OS Quirks:
+
+Both native-blocking `window.prompt()` and non-blocking `navigator.notification.prompt()` are available.
+
+## navigator.notification.beep
+
+The device plays a beep sound.
+
+ navigator.notification.beep(times);
+
+- __times__: The number of times to repeat the beep. _(Number)_
+
+### Example
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+### Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Tizen
+- Windows Phone 7 and 8
+- Windows 8
+
+### Amazon Fire OS Quirks
+
+- Amazon Fire OS plays the default __Notification Sound__ specified under the __Settings/Display & Sound__ panel.
+
+### Android Quirks
+
+- Android plays the default __Notification ringtone__ specified under the __Settings/Sound & Display__ panel.
+
+### Windows Phone 7 and 8 Quirks
+
+- Relies on a generic beep file from the Cordova distribution.
+
+### Tizen Quirks
+
+- Tizen implements beeps by playing an audio file via the media API.
+
+- The beep file must be short, must be located in a `sounds` subdirectory of the application's root directory, and must be named `beep.wav`.
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/it/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+Questo plugin consente di accedere ad alcuni elementi di interfaccia utente nativa del dialogo.
+
+## Installazione
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## Metodi
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+Mostra una finestra di avviso o la finestra di dialogo personalizzata. La maggior parte delle implementazioni di Cordova una dialogo nativa per questa caratteristica, ma alcune piattaforme utilizzano il browser `alert` funzione, che è in genere meno personalizzabile.
+
+ navigator.notification.alert(message, alertCallback, [title], [buttonName])
+
+
+* **messaggio**: messaggio finestra di dialogo. *(String)*
+
+* **alertCallback**: Callback da richiamare quando viene chiusa la finestra di avviso. *(Funzione)*
+
+* **titolo**: titolo di dialogo. *(String)* (Opzionale, default è`Alert`)
+
+* **buttonName**: nome del pulsante. *(String)* (Opzionale, default è`OK`)
+
+### Esempio
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### Piattaforme supportate
+
+* Amazon fuoco OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+### Windows Phone 7 e 8 stranezze
+
+* Non non c'è nessun avviso del browser integrato, ma è possibile associare uno come segue per chiamare `alert()` in ambito globale:
+
+ window.alert = navigator.notification.alert;
+
+
+* Entrambi `alert` e `confirm` sono non di blocco chiamate, risultati di cui sono disponibili solo in modo asincrono.
+
+### Firefox OS Stranezze:
+
+Entrambi nativi di blocco `window.alert()` e non bloccante `navigator.notification.alert()` sono disponibili.
+
+## navigator.notification.confirm
+
+Visualizza una finestra di dialogo conferma personalizzabile.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **messaggio**: messaggio finestra di dialogo. *(String)*
+
+* **confirmCallback**: Callback da richiamare con l'indice del pulsante premuto (1, 2 o 3) o quando la finestra di dialogo viene chiusa senza una pressione del pulsante (0). *(Funzione)*
+
+* **titolo**: titolo di dialogo. *(String)* (Opzionale, default è`Confirm`)
+
+* **buttonLabels**: matrice di stringhe che specificano le etichette dei pulsanti. *(Matrice)* (Opzionale, default è [ `OK,Cancel` ])
+
+### confirmCallback
+
+Il `confirmCallback` viene eseguito quando l'utente preme uno dei pulsanti nella finestra di dialogo conferma.
+
+Il callback accetta l'argomento `buttonIndex` *(numero)*, che è l'indice del pulsante premuto. Nota che l'indice utilizza l'indicizzazione base uno, quindi il valore è `1` , `2` , `3` , ecc.
+
+### Esempio
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### Piattaforme supportate
+
+* Amazon fuoco OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+### Windows Phone 7 e 8 stranezze
+
+* Non non c'è nessuna funzione browser incorporato per `window.confirm` , ma è possibile associare assegnando:
+
+ window.confirm = navigator.notification.confirm;
+
+
+* Chiama al `alert` e `confirm` sono non bloccante, quindi il risultato è disponibile solo in modo asincrono.
+
+### Firefox OS Stranezze:
+
+Entrambi nativi di blocco `window.confirm()` e non bloccante `navigator.notification.confirm()` sono disponibili.
+
+## navigator.notification.prompt
+
+Visualizza una finestra di dialogo nativa che è più personalizzabile del browser `prompt` funzione.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **messaggio**: messaggio finestra di dialogo. *(String)*
+
+* **promptCallback**: Callback da richiamare con l'indice del pulsante premuto (1, 2 o 3) o quando la finestra di dialogo viene chiusa senza una pressione del pulsante (0). *(Funzione)*
+
+* **titolo**: dialogo titolo *(String)* (opzionale, default è`Prompt`)
+
+* **buttonLabels**: matrice di stringhe specificando il pulsante etichette *(Array)* (opzionale, default è`["OK","Cancel"]`)
+
+* **defaultText**: valore di input predefinito textbox ( `String` ) (opzionale, Default: stringa vuota)
+
+### promptCallback
+
+Il `promptCallback` viene eseguito quando l'utente preme uno dei pulsanti nella finestra di dialogo richiesta. Il `results` oggetto passato al metodo di callback contiene le seguenti proprietà:
+
+* **buttonIndex**: l'indice del pulsante premuto. *(Numero)* Nota che l'indice utilizza l'indicizzazione base uno, quindi il valore è `1` , `2` , `3` , ecc.
+
+* **INPUT1**: il testo immesso nella finestra di dialogo richiesta. *(String)*
+
+### Esempio
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### Piattaforme supportate
+
+* Amazon fuoco OS
+* Android
+* Firefox OS
+* iOS
+* Windows Phone 7 e 8
+
+### Stranezze Android
+
+* Android supporta un massimo di tre pulsanti e ignora di più di quello.
+
+* Su Android 3.0 e versioni successive, i pulsanti vengono visualizzati in ordine inverso per dispositivi che utilizzano il tema Holo.
+
+### Firefox OS Stranezze:
+
+Entrambi nativi di blocco `window.prompt()` e non bloccante `navigator.notification.prompt()` sono disponibili.
+
+## navigator.notification.beep
+
+Il dispositivo riproduce un bip sonoro.
+
+ navigator.notification.beep(times);
+
+
+* **volte**: il numero di volte per ripetere il segnale acustico. *(Numero)*
+
+### Esempio
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### Piattaforme supportate
+
+* Amazon fuoco OS
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 e 8
+* Windows 8
+
+### Amazon fuoco OS stranezze
+
+* Amazon fuoco OS riproduce il **Suono di notifica** specificato sotto il pannello **Impostazioni/Display e il suono** predefinito.
+
+### Stranezze Android
+
+* Android giochi default **Notification ringtone** specificato sotto il pannello **impostazioni/audio e Display** .
+
+### Windows Phone 7 e 8 stranezze
+
+* Si basa su un file generico bip dalla distribuzione di Cordova.
+
+### Tizen stranezze
+
+* Tizen implementa bip di riproduzione di un file audio tramite i media API.
+
+* Il file beep deve essere breve, deve essere situato un `sounds` sottodirectory della directory radice dell'applicazione e deve essere denominato`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/ja/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+このプラグインはいくつかのネイティブのダイアログの UI 要素へのアクセスを提供します。
+
+## インストール
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## メソッド
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+カスタムの警告またはダイアログ ボックスが表示されます。 ほとんどコルドバ ネイティブ] ダイアログ ボックスの使用この機能がいくつかのプラットフォームを使用して、ブラウザーの `alert` 関数は、通常より少なくカスタマイズ可能です。
+
+ navigator.notification.alert(message, alertCallback, [title], [buttonName])
+
+
+* **メッセージ**: ダイアログ メッセージ。*(文字列)*
+
+* **alertCallback**: 警告ダイアログが閉じられたときに呼び出すコールバック。*(機能)*
+
+* **タイトル**: ダイアログのタイトル。*(文字列)*(省略可能、既定値は`Alert`)
+
+* **buttonName**: ボタンの名前。*(文字列)*(省略可能、既定値は`OK`)
+
+### 例
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### サポートされているプラットフォーム
+
+* アマゾン火 OS
+* アンドロイド
+* ブラックベリー 10
+* Firefox の OS
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+### Windows Phone 7 と 8 癖
+
+* 組み込みのブラウザー警告がない呼び出しを次のように 1 つをバインドすることができます `alert()` 、グローバル スコープで。
+
+ window.alert = navigator.notification.alert;
+
+
+* 両方の `alert` と `confirm` は非ブロッキング呼び出し、結果は非同期的にのみ利用できます。
+
+### Firefox OS 互換:
+
+両方のネイティブ ブロック `window.alert()` ノン ブロッキングと `navigator.notification.alert()` は利用できます。
+
+## navigator.notification.confirm
+
+カスタマイズ可能な確認のダイアログ ボックスが表示されます。
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **メッセージ**: ダイアログ メッセージ。*(文字列)*
+
+* **confirmCallback**: インデックス (1、2、または 3) を押されたボタンまたはダイアログ ボックスは、ボタンを押す (0) なしに解雇されたときに呼び出すコールバック。*(機能)*
+
+* **タイトル**: ダイアログのタイトル。*(文字列)*(省略可能、既定値は`Confirm`)
+
+* **buttonLabels**: ボタンのラベルを指定する文字列の配列。*(配列)*(省略可能、既定値は [ `OK,Cancel` ])
+
+### confirmCallback
+
+`confirmCallback`の確認ダイアログ ボックスでボタンを押したときに実行されます。
+
+コールバック引数 `buttonIndex` *(番号)*は、押されたボタンのインデックス。 メモこと、インデックスを使用して 1 ベースのインデックス化、ので、値は `1` 、 `2` 、 `3` 、等。
+
+### 例
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### サポートされているプラットフォーム
+
+* アマゾン火 OS
+* アンドロイド
+* ブラックベリー 10
+* Firefox の OS
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+### Windows Phone 7 と 8 癖
+
+* 組み込みブラウザーの機能はありません `window.confirm` が割り当てることによってバインドすることができます。
+
+ window.confirm = navigator.notification.confirm;
+
+
+* 呼び出しを `alert` と `confirm` では非ブロッキング、結果は非同期的にのみ使用できます。
+
+### Firefox OS 互換:
+
+両方のネイティブ ブロック `window.confirm()` ノン ブロッキングと `navigator.notification.confirm()` は利用できます。
+
+## navigator.notification.prompt
+
+ブラウザーのより詳細にカスタマイズはネイティブのダイアログ ボックスが表示されます `prompt` 関数。
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **メッセージ**: ダイアログ メッセージ。*(文字列)*
+
+* **promptCallback**: インデックス (1、2、または 3) を押されたボタンまたはダイアログ ボックスは、ボタンを押す (0) なしに解雇されたときに呼び出すコールバック。*(機能)*
+
+* **タイトル**: *(文字列)* (省略可能、既定値のタイトル] ダイアログ`Prompt`)
+
+* **buttonLabels**: ボタンを指定する文字列の配列*(配列)* (省略可能、既定値のラベル`["OK","Cancel"]`)
+
+* **これら**: 既定テキスト ボックスの入力値 ( `String` ) (省略可能、既定: 空の文字列)
+
+### promptCallback
+
+`promptCallback`プロンプト ダイアログ ボックス内のボタンのいずれかを押したときに実行されます。`results`コールバックに渡されるオブジェクトに、次のプロパティが含まれています。
+
+* **buttonIndex**: 押されたボタンのインデックス。*(数)*メモこと、インデックスを使用して 1 ベースのインデックス化、ので、値は `1` 、 `2` 、 `3` 、等。
+
+* **input1**: プロンプト ダイアログ ボックスに入力したテキスト。*(文字列)*
+
+### 例
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### サポートされているプラットフォーム
+
+* アマゾン火 OS
+* アンドロイド
+* Firefox の OS
+* iOS
+* Windows Phone 7 と 8
+
+### Android の癖
+
+* Android は最大 3 つのボタンをサポートしているし、それ以上無視します。
+
+* アンドロイド 3.0 と後、ホロのテーマを使用するデバイスを逆の順序でボタンが表示されます。
+
+### Firefox OS 互換:
+
+両方のネイティブ ブロック `window.prompt()` ノン ブロッキングと `navigator.notification.prompt()` は利用できます。
+
+## navigator.notification.beep
+
+デバイス サウンドをビープ音を再生します。
+
+ navigator.notification.beep(times);
+
+
+* **回**: ビープ音を繰り返す回数。*(数)*
+
+### 例
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### サポートされているプラットフォーム
+
+* アマゾン火 OS
+* アンドロイド
+* ブラックベリー 10
+* iOS
+* Tizen
+* Windows Phone 7 と 8
+* Windows 8
+
+### アマゾン火 OS 癖
+
+* アマゾン火 OS デフォルト**設定/表示 & サウンド**パネルの下に指定した**通知音**を果たしています。
+
+### Android の癖
+
+* アンドロイド デフォルト**通知着信音****設定/サウンド & ディスプレイ**パネルの下に指定を果たしています。
+
+### Windows Phone 7 と 8 癖
+
+* コルドバ分布からジェネリック ビープ音ファイルに依存します。
+
+### Tizen の癖
+
+* Tizen は、メディア API 経由でオーディオ ファイルを再生してビープ音を実装します。
+
+* ビープ音ファイルする必要があります短いである必要があります、 `sounds` 、アプリケーションのルート ディレクトリのサブディレクトリと命名する必要があります`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/ko/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+이 플러그인 몇 가지 기본 대화 상자 UI 요소에 액세스할 수 있습니다.
+
+## 설치
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## 메서드
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+사용자 지정 경고 또는 대화 상자를 보여 줍니다. 이 기능에 대 한 기본 대화 상자를 사용 하는 대부분의 코르도바 구현 하지만 일부 플랫폼 사용 브라우저의 `alert` 함수는 일반적으로 덜 사용자 정의할 수 있습니다.
+
+ navigator.notification.alert(message, alertCallback, [title], [buttonName])
+
+
+* **메시지**: 대화 메시지. *(문자열)*
+
+* **alertCallback**: 콜백을 호출할 때 경고 대화 기 각. *(기능)*
+
+* **제목**: 제목 대화 상자. *(문자열)* (옵션, 기본값:`Alert`)
+
+* **buttonName**: 단추 이름. *(문자열)* (옵션, 기본값:`OK`)
+
+### 예를 들어
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### 지원 되는 플랫폼
+
+* 아마존 화재 운영 체제
+* 안 드 로이드
+* 블랙베리 10
+* Firefox 운영 체제
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+### Windows Phone 7, 8 특수
+
+* 아니 내장 브라우저 경고 하지만 다음과 같이 전화를 바인딩할 수 있습니다 `alert()` 전역 범위에서:
+
+ window.alert = navigator.notification.alert;
+
+
+* 둘 다 `alert` 와 `confirm` 는 비차단 호출, 결과 비동기적으로 사용할 수 있습니다.
+
+### 파이어 폭스 OS 단점:
+
+두 기본 차단 `window.alert()` 및 비차단 `navigator.notification.alert()` 사용할 수 있습니다.
+
+## navigator.notification.confirm
+
+사용자 정의 확인 대화 상자가 표시 됩니다.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **메시지**: 대화 메시지. *(문자열)*
+
+* **confirmCallback**: 인덱스 버튼 (1, 2 또는 3) 또는 대화 상자 버튼을 누르면 (0) 없이 기 각 될 때 호출할 콜백 합니다. *(기능)*
+
+* **제목**: 제목 대화 상자. *(문자열)* (옵션, 기본값:`Confirm`)
+
+* **buttonLabels**: 단추 레이블을 지정 하는 문자열 배열입니다. *(배열)* (옵션, 기본값은 [ `OK,Cancel` ])
+
+### confirmCallback
+
+`confirmCallback`사용자가 확인 대화 상자에서 단추 중 하나를 누를 때 실행 됩니다.
+
+콜백 인수 `buttonIndex` *(번호)를*누르면된 버튼의 인덱스입니다. 참고 인덱스에서는 인덱스 1부터 값은 `1` , `2` , `3` , 등등.
+
+### 예를 들어
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### 지원 되는 플랫폼
+
+* 아마존 화재 운영 체제
+* 안 드 로이드
+* 블랙베리 10
+* Firefox 운영 체제
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+### Windows Phone 7, 8 특수
+
+* 에 대 한 기본 제공 브라우저 함수가 `window.confirm` , 그러나 할당 하 여 바인딩할 수 있습니다:
+
+ window.confirm = navigator.notification.confirm;
+
+
+* 호출 `alert` 및 `confirm` 되므로 차단 되지 않은 결과만 비동기적으로 사용할 수 있습니다.
+
+### 파이어 폭스 OS 단점:
+
+두 기본 차단 `window.confirm()` 및 비차단 `navigator.notification.confirm()` 사용할 수 있습니다.
+
+## navigator.notification.prompt
+
+브라우저의 보다 더 많은 사용자 정의 기본 대화 상자 표시 `prompt` 기능.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **메시지**: 대화 메시지. *(문자열)*
+
+* **promptCallback**: 인덱스 버튼 (1, 2 또는 3) 또는 대화 상자 버튼을 누르면 (0) 없이 기 각 될 때 호출할 콜백 합니다. *(기능)*
+
+* **제목**: 제목 *(문자열)* (옵션, 기본값 대화 상자`Prompt`)
+
+* **buttonLabels**: 단추를 지정 하는 문자열의 배열 *(배열)* (옵션, 기본값은 레이블`["OK","Cancel"]`)
+
+* **defaultText**: 기본 텍스트 상자 입력 값 ( `String` ) (옵션, 기본값: 빈 문자열)
+
+### promptCallback
+
+`promptCallback`사용자가 프롬프트 대화 상자에서 단추 중 하나를 누를 때 실행 됩니다. `results`콜백에 전달 된 개체에는 다음 속성이 포함 되어 있습니다:
+
+* **buttonIndex**: 눌려진된 버튼의 인덱스. *(수)* 참고 인덱스에서는 인덱스 1부터 값은 `1` , `2` , `3` , 등등.
+
+* **input1**: 프롬프트 대화 상자에 입력 한 텍스트. *(문자열)*
+
+### 예를 들어
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### 지원 되는 플랫폼
+
+* 아마존 화재 운영 체제
+* 안 드 로이드
+* Firefox 운영 체제
+* iOS
+* Windows Phone 7과 8
+
+### 안 드 로이드 단점
+
+* 안 드 로이드 최대 3 개의 단추를 지원 하 고 그것 보다는 더 이상 무시 합니다.
+
+* 안 드 로이드 3.0 및 나중에, 단추는 홀로 테마를 사용 하는 장치에 대 한 반대 순서로 표시 됩니다.
+
+### 파이어 폭스 OS 단점:
+
+두 기본 차단 `window.prompt()` 및 비차단 `navigator.notification.prompt()` 사용할 수 있습니다.
+
+## navigator.notification.beep
+
+장치는 경고음 소리를 재생 합니다.
+
+ navigator.notification.beep(times);
+
+
+* **시간**: 경고음을 반복 하는 횟수. *(수)*
+
+### 예를 들어
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### 지원 되는 플랫폼
+
+* 아마존 화재 운영 체제
+* 안 드 로이드
+* 블랙베리 10
+* iOS
+* Tizen
+* Windows Phone 7과 8
+* 윈도우 8
+
+### 아마존 화재 OS 단점
+
+* 아마존 화재 운영 체제 기본 **설정/디스플레이 및 사운드** 패널에 지정 된 **알림 소리** 재생 됩니다.
+
+### 안 드 로이드 단점
+
+* 안 드 로이드 기본 **알림 벨소리** **설정/사운드 및 디스플레이** 패널에서 지정 합니다.
+
+### Windows Phone 7, 8 특수
+
+* 코르 도우 바 분포에서 일반 경고음 파일에 의존합니다.
+
+### Tizen 특수
+
+* Tizen은 미디어 API 통해 오디오 파일을 재생 하 여 경고음을 구현 합니다.
+
+* 경고음 파일에 위치 해야 합니다, 짧은 해야 한 `sounds` 응용 프로그램의 루트 디렉터리의 하위 디렉터리 명명 해야 합니다`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/pl/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+Ten plugin umożliwia dostęp do niektórych rodzimych okna dialogowego elementy interfejsu użytkownika.
+
+## Instalacja
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## Metody
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+Pokazuje niestandardowe wpisu lub okno dialogowe. Większość implementacji Cordova używać rodzimych okno dialogowe dla tej funkcji, ale niektóre platformy używać przeglądarki `alert` funkcja, który jest zazwyczaj mniej konfigurowalny.
+
+ navigator.notification.alert(message, alertCallback, [title], [buttonName])
+
+
+* **wiadomość**: komunikat okna dialogowego. *(String)*
+
+* **alertCallback**: wywołanie zwrotne do wywołania, gdy okno dialogowe alert jest oddalona. *(Funkcja)*
+
+* **tytuł**: okno tytuł. *(String)* (Opcjonalna, domyślnie`Alert`)
+
+* **buttonName**: Nazwa przycisku. *(String)* (Opcjonalna, domyślnie`OK`)
+
+### Przykład
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### Obsługiwane platformy
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+### Windows Phone 7 i 8 dziwactwa
+
+* Istnieje wpis nie wbudowana przeglądarka, ale można powiązać w następujący sposób na wywołanie `alert()` w globalnym zasięgu:
+
+ window.alert = navigator.notification.alert;
+
+
+* Zarówno `alert` i `confirm` są bez blokowania połączeń, których wyniki są tylko dostępne asynchronicznie.
+
+### Firefox OS dziwactwa:
+
+Blokuje zarówno rodzimych `window.alert()` i bez blokowania `navigator.notification.alert()` są dostępne.
+
+## navigator.notification.confirm
+
+Wyświetla okno dialogowe potwierdzenia konfigurowalny.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **wiadomość**: komunikat okna dialogowego. *(String)*
+
+* **confirmCallback**: wywołanie zwrotne do wywołania z indeksu z przycisku (1, 2 lub 3), lub gdy okno jest zwolniony bez naciśnij przycisk (0). *(Funkcja)*
+
+* **tytuł**: okno tytuł. *(String)* (Opcjonalna, domyślnie`Confirm`)
+
+* **buttonLabels**: tablica ciągów, określając etykiety przycisków. *(Tablica)* (Opcjonalna, domyślnie [ `OK,Cancel` ])
+
+### confirmCallback
+
+`confirmCallback`Wykonuje, gdy użytkownik naciśnie klawisz jeden z przycisków w oknie dialogowym potwierdzenia.
+
+Wywołania zwrotnego przyjmuje argument `buttonIndex` *(numer)*, który jest indeksem wciśnięty przycisk. Uwaga, że indeks używa, na podstawie jednego indeksowania, więc wartość jest `1` , `2` , `3` , itp.
+
+### Przykład
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### Obsługiwane platformy
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+### Windows Phone 7 i 8 dziwactwa
+
+* Istnieje funkcja wbudowana przeglądarka nie `window.confirm` , ale można go powiązać przypisując:
+
+ window.confirm = navigator.notification.confirm;
+
+
+* Wzywa do `alert` i `confirm` są bez blokowania, więc wynik jest tylko dostępnych asynchronicznie.
+
+### Firefox OS dziwactwa:
+
+Blokuje zarówno rodzimych `window.confirm()` i bez blokowania `navigator.notification.confirm()` są dostępne.
+
+## navigator.notification.prompt
+
+Wyświetla okno dialogowe macierzystego, który bardziej niż przeglądarki `prompt` funkcja.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **wiadomość**: komunikat okna dialogowego. *(String)*
+
+* **promptCallback**: wywołanie zwrotne do wywołania z indeksu z przycisku (1, 2 lub 3), lub gdy okno jest zwolniony bez naciśnij przycisk (0). *(Funkcja)*
+
+* **tytuł**: okno tytuł *(String)* (opcjonalna, domyślnie`Prompt`)
+
+* **buttonLabels**: tablica ciągów, określając przycisk etykiety *(tablica)* (opcjonalna, domyślnie`["OK","Cancel"]`)
+
+* **defaultText**: wartość wejściowa tekstowym domyślnego ( `String` ) (opcjonalna, domyślnie: pusty ciąg)
+
+### promptCallback
+
+`promptCallback`Wykonuje, gdy użytkownik naciśnie klawisz jeden z przycisków w oknie dialogowym polecenia. `results`Obiekt przekazywany do wywołania zwrotnego zawiera następujące właściwości:
+
+* **buttonIndex**: indeks wciśnięty przycisk. *(Liczba)* Uwaga, że indeks używa, na podstawie jednego indeksowania, więc wartość jest `1` , `2` , `3` , itp.
+
+* **input1**: Tekst wprowadzony w oknie polecenia. *(String)*
+
+### Przykład
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### Obsługiwane platformy
+
+* Amazon Fire OS
+* Android
+* Firefox OS
+* iOS
+* Windows Phone 7 i 8
+
+### Dziwactwa Androida
+
+* Android obsługuje maksymalnie trzy przyciski i więcej niż to ignoruje.
+
+* Android 3.0 i nowszych przyciski są wyświetlane w kolejności odwrotnej do urządzenia, które używają tematu Holo.
+
+### Firefox OS dziwactwa:
+
+Blokuje zarówno rodzimych `window.prompt()` i bez blokowania `navigator.notification.prompt()` są dostępne.
+
+## navigator.notification.beep
+
+Urządzenie odtwarza sygnał ciągły dźwięk.
+
+ navigator.notification.beep(times);
+
+
+* **razy**: liczba powtórzeń po sygnale. *(Liczba)*
+
+### Przykład
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### Obsługiwane platformy
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 i 8
+* Windows 8
+
+### Amazon ogień OS dziwactwa
+
+* Amazon ogień OS gra domyślny **Dźwięk powiadomienia** określone w panelu **ekranu/ustawienia i dźwięk** .
+
+### Dziwactwa Androida
+
+* Android gra domyślnie **dzwonek powiadomienia** określone w panelu **ustawień/dźwięk i wyświetlacz** .
+
+### Windows Phone 7 i 8 dziwactwa
+
+* Opiera się na pliku rodzajowego sygnał z rozkładu Cordova.
+
+### Dziwactwa Tizen
+
+* Tizen implementuje dźwięków przez odtwarzania pliku audio za pośrednictwem mediów API.
+
+* Plik dźwiękowy muszą być krótkie, musi znajdować się w `sounds` podkatalogu katalogu głównego aplikacji i musi być nazwany`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/ru/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+Этот плагин обеспечивает доступ к некоторым элементам собственного диалогового окна пользовательского интерфейса.
+
+## Установка
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## Методы
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+Показывает окно пользовательские оповещения или диалоговое окно. Большинство реализаций Cordova использовать диалоговое окно родной для этой функции, но некоторые платформы браузера `alert` функция, которая как правило менее настраивается.
+
+ Navigator.Notification.Alert (сообщение, alertCallback, [название], [buttonName])
+
+
+* **сообщение**: сообщение диалога. *(Строка)*
+
+* **alertCallback**: обратного вызова для вызова, когда закрывается диалоговое окно оповещения. *(Функция)*
+
+* **название**: диалоговое окно название. *(Строка)* (Опционально, по умолчанию`Alert`)
+
+* **buttonName**: имя кнопки. *(Строка)* (Опционально, по умолчанию`OK`)
+
+### Пример
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### Поддерживаемые платформы
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+### Особенности Windows Phone 7 и 8
+
+* Существует предупреждение не встроенный браузер, но можно привязать один следующим позвонить `alert()` в глобальной области действия:
+
+ window.alert = navigator.notification.alert;
+
+
+* Оба `alert` и `confirm` являются не блокировка звонков, результаты которых доступны только асинхронно.
+
+### Firefox OS причуды:
+
+Как родной блокировка `window.alert()` и неблокирующий `navigator.notification.alert()` доступны.
+
+## navigator.notification.confirm
+
+Отображает диалоговое окно Настраиваемый подтверждения.
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **сообщение**: сообщение диалога. *(Строка)*
+
+* **confirmCallback**: обратного вызова с индексом кнопка нажата (1, 2 или 3) или когда диалоговое окно закрывается без нажатия кнопки (0). *(Функция)*
+
+* **название**: диалоговое окно название. *(Строка)* (Опционально, по умолчанию`Confirm`)
+
+* **buttonLabels**: массив строк, указав названия кнопок. *(Массив)* (Не обязательно, по умолчанию [ `OK,Cancel` ])
+
+### confirmCallback
+
+`confirmCallback`Выполняется, когда пользователь нажимает одну из кнопок в диалоговом окне подтверждения.
+
+Аргументом функции обратного вызова `buttonIndex` *(номер)*, который является индекс нажатой кнопки. Обратите внимание, что индекс использует единицы индексации, поэтому значение `1` , `2` , `3` , и т.д.
+
+### Пример
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### Поддерживаемые платформы
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* Firefox OS
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+### Особенности Windows Phone 7 и 8
+
+* Нет встроенного браузера функция для `window.confirm` , но его можно привязать путем присвоения:
+
+ window.confirm = navigator.notification.confirm;
+
+
+* Вызовы `alert` и `confirm` являются не блокируется, поэтому результат доступен только асинхронно.
+
+### Firefox OS причуды:
+
+Как родной блокировка `window.confirm()` и неблокирующий `navigator.notification.confirm()` доступны.
+
+## navigator.notification.prompt
+
+Отображает родной диалоговое окно более настраиваемый, чем в браузере `prompt` функции.
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **сообщение**: сообщение диалога. *(Строка)*
+
+* **promptCallback**: обратного вызова с индексом кнопка нажата (1, 2 или 3) или когда диалоговое окно закрывается без нажатия кнопки (0). *(Функция)*
+
+* **название**: диалоговое окно название *(String)* (опционально, по умолчанию`Prompt`)
+
+* **buttonLabels**: массив строк, указав кнопку этикетки *(массив)* (опционально, по умолчанию`["OK","Cancel"]`)
+
+* **defaultText**: по умолчанию textbox входное значение ( `String` ) (опционально, по умолчанию: пустая строка)
+
+### promptCallback
+
+`promptCallback`Выполняется, когда пользователь нажимает одну из кнопок в диалоговом окне приглашения. `results`Объект, переданный в метод обратного вызова содержит следующие свойства:
+
+* **buttonIndex**: индекс нажатой кнопки. *(Число)* Обратите внимание, что индекс использует единицы индексации, поэтому значение `1` , `2` , `3` , и т.д.
+
+* **INPUT1**: текст, введенный в диалоговом окне приглашения. *(Строка)*
+
+### Пример
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### Поддерживаемые платформы
+
+* Amazon Fire OS
+* Android
+* Firefox OS
+* iOS
+* Windows Phone 7 и 8
+
+### Особенности Android
+
+* Android поддерживает максимум из трех кнопок и игнорирует больше, чем это.
+
+* На Android 3.0 и более поздних версиях кнопки отображаются в обратном порядке для устройств, которые используют тему холо.
+
+### Firefox OS причуды:
+
+Как родной блокировка `window.prompt()` и неблокирующий `navigator.notification.prompt()` доступны.
+
+## navigator.notification.beep
+
+Устройство воспроизводит звуковой сигнал звук.
+
+ navigator.notification.beep(times);
+
+
+* **раз**: количество раз, чтобы повторить сигнал. *(Число)*
+
+### Пример
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### Поддерживаемые платформы
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Tizen
+* Windows Phone 7 и 8
+* Windows 8
+
+### Особенности Amazon Fire OS
+
+* Amazon Fire OS играет по умолчанию **Звук уведомления** , указанного на панели **параметров/дисплей и звук** .
+
+### Особенности Android
+
+* Android играет по умолчанию **уведомления рингтон** указанных в панели **настройки/звук и дисплей** .
+
+### Особенности Windows Phone 7 и 8
+
+* Опирается на общий звуковой файл из дистрибутива Кордова.
+
+### Особенности Tizen
+
+* Tizen реализует гудков, воспроизведении аудиофайла через СМИ API.
+
+* Звуковой файл должен быть коротким, должен быть расположен в `sounds` подкаталог корневого каталога приложения и должны быть названы`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/doc/zh/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,247 @@
+
+
+# org.apache.cordova.dialogs
+
+這個外掛程式提供了對一些本機對話方塊的使用者介面元素的訪問。
+
+## 安裝
+
+ cordova plugin add org.apache.cordova.dialogs
+
+
+## 方法
+
+* `navigator.notification.alert`
+* `navigator.notification.confirm`
+* `navigator.notification.prompt`
+* `navigator.notification.beep`
+
+## navigator.notification.alert
+
+顯示一個自訂的警報或對話方塊框。 大多數科爾多瓦實現使用本機對話方塊中的此項功能,但一些平臺使用瀏覽器的 `alert` 函數,這是通常不那麼可自訂。
+
+ navigator.notification.alert(message, alertCallback, [title], [buttonName])
+
+
+* **消息**: 消息對話方塊。*(字串)*
+
+* **alertCallback**: 當警報對話方塊的被解雇時要調用的回檔。*(函數)*
+
+* **標題**: 標題對話方塊。*(字串)*(可選,預設值為`Alert`)
+
+* **buttonName**: 按鈕名稱。*(字串)*(可選,預設值為`OK`)
+
+### 示例
+
+ function alertDismissed() {
+ // do something
+ }
+
+ navigator.notification.alert(
+ 'You are the winner!', // message
+ alertDismissed, // callback
+ 'Game Over', // title
+ 'Done' // buttonName
+ );
+
+
+### 支援的平臺
+
+* 亞馬遜火 OS
+* Android 系統
+* 黑莓 10
+* 火狐瀏覽器作業系統
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+### Windows Phone 7 和 8 怪癖
+
+* 有沒有內置瀏覽器警報,但你可以綁定一個,如下所示調用 `alert()` 在全球範圍內:
+
+ window.alert = navigator.notification.alert;
+
+
+* 兩個 `alert` 和 `confirm` 的非阻塞的調用,其中的結果才是可用的非同步。
+
+### 火狐瀏覽器作業系統怪癖:
+
+這兩個本機阻止 `window.alert()` 和非阻塞 `navigator.notification.alert()` 可用。
+
+## navigator.notification.confirm
+
+顯示一個可自訂的確認對話方塊。
+
+ navigator.notification.confirm(message, confirmCallback, [title], [buttonLabels])
+
+
+* **消息**: 消息對話方塊。*(字串)*
+
+* **confirmCallback**: 要用索引 (1、 2 或 3) 按下的按鈕,或者在沒有按下按鈕 (0) 駁回了對話方塊中時調用的回檔。*(函數)*
+
+* **標題**: 標題對話方塊。*(字串)*(可選,預設值為`Confirm`)
+
+* **buttonLabels**: 指定按鈕標籤的字串陣列。*(陣列)*(可選,預設值為 [ `OK,Cancel` ])
+
+### confirmCallback
+
+`confirmCallback`當使用者按下確認對話方塊中的按鈕之一的時候執行。
+
+回檔將參數 `buttonIndex` *(編號)*,它是按下的按鈕的索引。 請注意索引使用基於 1 的索引,所以值是 `1` , `2` , `3` ,等等。
+
+### 示例
+
+ function onConfirm(buttonIndex) {
+ alert('You selected button ' + buttonIndex);
+ }
+
+ navigator.notification.confirm(
+ 'You are the winner!', // message
+ onConfirm, // callback to invoke with index of button pressed
+ 'Game Over', // title
+ ['Restart','Exit'] // buttonLabels
+ );
+
+
+### 支援的平臺
+
+* 亞馬遜火 OS
+* Android 系統
+* 黑莓 10
+* 火狐瀏覽器作業系統
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+### Windows Phone 7 和 8 怪癖
+
+* 有沒有內置的瀏覽器功能的 `window.confirm` ,但你可以將它綁定通過分配:
+
+ window.confirm = navigator.notification.confirm;
+
+
+* 調用到 `alert` 和 `confirm` 的非阻塞,所以結果就是只可用以非同步方式。
+
+### 火狐瀏覽器作業系統怪癖:
+
+這兩個本機阻止 `window.confirm()` 和非阻塞 `navigator.notification.confirm()` 可用。
+
+## navigator.notification.prompt
+
+顯示本機的對話方塊,更可自訂的瀏覽器比 `prompt` 函數。
+
+ navigator.notification.prompt(message, promptCallback, [title], [buttonLabels], [defaultText])
+
+
+* **消息**: 消息對話方塊。*(字串)*
+
+* **promptCallback**: 要用索引 (1、 2 或 3) 按下的按鈕,或者在沒有按下按鈕 (0) 駁回了對話方塊中時調用的回檔。*(函數)*
+
+* **標題**: 對話方塊的標題*(字串)* (可選,預設值為`Prompt`)
+
+* **buttonLabels**: 陣列,這些字串指定按鈕標籤*(陣列)* (可選,預設值為`["OK","Cancel"]`)
+
+* **defaultText**: 預設文字方塊中輸入值 ( `String` ) (可選,預設值: 空字串)
+
+### promptCallback
+
+`promptCallback`當使用者按下一個提示對話方塊中的按鈕時執行。`results`物件傳遞給回檔的包含以下屬性:
+
+* **buttonIndex**: 按下的按鈕的索引。*(人數)*請注意索引使用基於 1 的索引,所以值是 `1` , `2` , `3` ,等等。
+
+* **輸入 1**: 在提示對話方塊中輸入的文本。*(字串)*
+
+### 示例
+
+ function onPrompt(results) {
+ alert("You selected button number " + results.buttonIndex + " and entered " + results.input1);
+ }
+
+ navigator.notification.prompt(
+ 'Please enter your name', // message
+ onPrompt, // callback to invoke
+ 'Registration', // title
+ ['Ok','Exit'], // buttonLabels
+ 'Jane Doe' // defaultText
+ );
+
+
+### 支援的平臺
+
+* 亞馬遜火 OS
+* Android 系統
+* 火狐瀏覽器作業系統
+* iOS
+* Windows Phone 7 和 8
+
+### Android 的怪癖
+
+* Android 支援最多的三個按鈕,並忽略任何更多。
+
+* 關於 Android 3.0 及更高版本,使用全息主題的設備按相反的順序顯示按鈕。
+
+### 火狐瀏覽器作業系統怪癖:
+
+這兩個本機阻止 `window.prompt()` 和非阻塞 `navigator.notification.prompt()` 可用。
+
+## navigator.notification.beep
+
+該設備播放提示音聲音。
+
+ navigator.notification.beep(times);
+
+
+* **時間**: 的次數重複發出蜂鳴音。*(人數)*
+
+### 示例
+
+ // Beep twice!
+ navigator.notification.beep(2);
+
+
+### 支援的平臺
+
+* 亞馬遜火 OS
+* Android 系統
+* 黑莓 10
+* iOS
+* Tizen
+* Windows Phone 7 和 8
+* Windows 8
+
+### 亞馬遜火 OS 怪癖
+
+* 亞馬遜火 OS 播放預設**設置/顯示 & 聲音**面板下指定的**通知聲音**。
+
+### Android 的怪癖
+
+* Android 系統播放的預設**通知鈴聲****設置/聲音和顯示**面板下指定。
+
+### Windows Phone 7 和 8 怪癖
+
+* 依賴泛型蜂鳴音檔從科爾多瓦分佈。
+
+### Tizen 怪癖
+
+* Tizen 通過播放音訊檔通過媒體 API 實現會發出蜂鳴聲。
+
+* 蜂鳴音檔必須很短,必須設在 `sounds` 子目錄中的應用程式的根目錄中,並且必須命名`beep.wav`.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/plugin.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/plugin.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,157 @@
+
+
+
+
+
+ Notification
+ Cordova Notification Plugin
+ Apache 2.0
+ cordova,notification
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-dialogs.git
+ https://issues.apache.org/jira/browse/CB/component/12320642
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/android/Notification.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/android/Notification.java Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,483 @@
+/*
+ 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.
+*/
+package org.apache.cordova.dialogs;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaInterface;
+import org.apache.cordova.CordovaPlugin;
+import org.apache.cordova.PluginResult;
+import org.json.JSONArray;
+import org.json.JSONException;
+import org.json.JSONObject;
+
+import android.annotation.SuppressLint;
+import android.app.AlertDialog;
+import android.app.AlertDialog.Builder;
+import android.app.ProgressDialog;
+import android.content.DialogInterface;
+import android.media.Ringtone;
+import android.media.RingtoneManager;
+import android.net.Uri;
+import android.widget.EditText;
+import android.widget.TextView;
+
+
+/**
+ * This class provides access to notifications on the device.
+ *
+ * Be aware that this implementation gets called on
+ * navigator.notification.{alert|confirm|prompt}, and that there is a separate
+ * implementation in org.apache.cordova.CordovaChromeClient that gets
+ * called on a simple window.{alert|confirm|prompt}.
+ */
+public class Notification extends CordovaPlugin {
+
+ public int confirmResult = -1;
+ public ProgressDialog spinnerDialog = null;
+ public ProgressDialog progressDialog = null;
+
+ /**
+ * Constructor.
+ */
+ public Notification() {
+ }
+
+ /**
+ * Executes the request and returns PluginResult.
+ *
+ * @param action The action to execute.
+ * @param args JSONArray of arguments for the plugin.
+ * @param callbackContext The callback context used when calling back into JavaScript.
+ * @return True when the action was valid, false otherwise.
+ */
+ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+ /*
+ * Don't run any of these if the current activity is finishing
+ * in order to avoid android.view.WindowManager$BadTokenException
+ * crashing the app. Just return true here since false should only
+ * be returned in the event of an invalid action.
+ */
+ if(this.cordova.getActivity().isFinishing()) return true;
+
+ if (action.equals("beep")) {
+ this.beep(args.getLong(0));
+ }
+ else if (action.equals("alert")) {
+ this.alert(args.getString(0), args.getString(1), args.getString(2), callbackContext);
+ return true;
+ }
+ else if (action.equals("confirm")) {
+ this.confirm(args.getString(0), args.getString(1), args.getJSONArray(2), callbackContext);
+ return true;
+ }
+ else if (action.equals("prompt")) {
+ this.prompt(args.getString(0), args.getString(1), args.getJSONArray(2), args.getString(3), callbackContext);
+ return true;
+ }
+ else if (action.equals("activityStart")) {
+ this.activityStart(args.getString(0), args.getString(1));
+ }
+ else if (action.equals("activityStop")) {
+ this.activityStop();
+ }
+ else if (action.equals("progressStart")) {
+ this.progressStart(args.getString(0), args.getString(1));
+ }
+ else if (action.equals("progressValue")) {
+ this.progressValue(args.getInt(0));
+ }
+ else if (action.equals("progressStop")) {
+ this.progressStop();
+ }
+ else {
+ return false;
+ }
+
+ // Only alert and confirm are async.
+ callbackContext.success();
+ return true;
+ }
+
+ //--------------------------------------------------------------------------
+ // LOCAL METHODS
+ //--------------------------------------------------------------------------
+
+ /**
+ * Beep plays the default notification ringtone.
+ *
+ * @param count Number of times to play notification
+ */
+ public void beep(final long count) {
+ cordova.getThreadPool().execute(new Runnable() {
+ public void run() {
+ Uri ringtone = RingtoneManager.getDefaultUri(RingtoneManager.TYPE_NOTIFICATION);
+ Ringtone notification = RingtoneManager.getRingtone(cordova.getActivity().getBaseContext(), ringtone);
+
+ // If phone is not set to silent mode
+ if (notification != null) {
+ for (long i = 0; i < count; ++i) {
+ notification.play();
+ long timeout = 5000;
+ while (notification.isPlaying() && (timeout > 0)) {
+ timeout = timeout - 100;
+ try {
+ Thread.sleep(100);
+ } catch (InterruptedException e) {
+ }
+ }
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ * Builds and shows a native Android alert with given Strings
+ * @param message The message the alert should display
+ * @param title The title of the alert
+ * @param buttonLabel The label of the button
+ * @param callbackContext The callback context
+ */
+ public synchronized void alert(final String message, final String title, final String buttonLabel, final CallbackContext callbackContext) {
+ final CordovaInterface cordova = this.cordova;
+
+ Runnable runnable = new Runnable() {
+ public void run() {
+
+ AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
+ dlg.setMessage(message);
+ dlg.setTitle(title);
+ dlg.setCancelable(true);
+ dlg.setPositiveButton(buttonLabel,
+ new AlertDialog.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
+ }
+ });
+ dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
+ public void onCancel(DialogInterface dialog)
+ {
+ dialog.dismiss();
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
+ }
+ });
+
+ changeTextDirection(dlg);
+ };
+ };
+ this.cordova.getActivity().runOnUiThread(runnable);
+ }
+
+ /**
+ * Builds and shows a native Android confirm dialog with given title, message, buttons.
+ * This dialog only shows up to 3 buttons. Any labels after that will be ignored.
+ * The index of the button pressed will be returned to the JavaScript callback identified by callbackId.
+ *
+ * @param message The message the dialog should display
+ * @param title The title of the dialog
+ * @param buttonLabels A comma separated list of button labels (Up to 3 buttons)
+ * @param callbackContext The callback context.
+ */
+ public synchronized void confirm(final String message, final String title, final JSONArray buttonLabels, final CallbackContext callbackContext) {
+ final CordovaInterface cordova = this.cordova;
+
+ Runnable runnable = new Runnable() {
+ public void run() {
+ AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
+ dlg.setMessage(message);
+ dlg.setTitle(title);
+ dlg.setCancelable(true);
+
+ // First button
+ if (buttonLabels.length() > 0) {
+ try {
+ dlg.setNegativeButton(buttonLabels.getString(0),
+ new AlertDialog.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 1));
+ }
+ });
+ } catch (JSONException e) { }
+ }
+
+ // Second button
+ if (buttonLabels.length() > 1) {
+ try {
+ dlg.setNeutralButton(buttonLabels.getString(1),
+ new AlertDialog.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 2));
+ }
+ });
+ } catch (JSONException e) { }
+ }
+
+ // Third button
+ if (buttonLabels.length() > 2) {
+ try {
+ dlg.setPositiveButton(buttonLabels.getString(2),
+ new AlertDialog.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 3));
+ }
+ });
+ } catch (JSONException e) { }
+ }
+ dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
+ public void onCancel(DialogInterface dialog)
+ {
+ dialog.dismiss();
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, 0));
+ }
+ });
+
+ changeTextDirection(dlg);
+ };
+ };
+ this.cordova.getActivity().runOnUiThread(runnable);
+ }
+
+ /**
+ * Builds and shows a native Android prompt dialog with given title, message, buttons.
+ * This dialog only shows up to 3 buttons. Any labels after that will be ignored.
+ * The following results are returned to the JavaScript callback identified by callbackId:
+ * buttonIndex Index number of the button selected
+ * input1 The text entered in the prompt dialog box
+ *
+ * @param message The message the dialog should display
+ * @param title The title of the dialog
+ * @param buttonLabels A comma separated list of button labels (Up to 3 buttons)
+ * @param callbackContext The callback context.
+ */
+ public synchronized void prompt(final String message, final String title, final JSONArray buttonLabels, final String defaultText, final CallbackContext callbackContext) {
+
+ final CordovaInterface cordova = this.cordova;
+
+ Runnable runnable = new Runnable() {
+ public void run() {
+ final EditText promptInput = new EditText(cordova.getActivity());
+ promptInput.setHint(defaultText);
+ AlertDialog.Builder dlg = createDialog(cordova); // new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
+ dlg.setMessage(message);
+ dlg.setTitle(title);
+ dlg.setCancelable(true);
+
+ dlg.setView(promptInput);
+
+ final JSONObject result = new JSONObject();
+
+ // First button
+ if (buttonLabels.length() > 0) {
+ try {
+ dlg.setNegativeButton(buttonLabels.getString(0),
+ new AlertDialog.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ try {
+ result.put("buttonIndex",1);
+ result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText());
+ } catch (JSONException e) { e.printStackTrace(); }
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result));
+ }
+ });
+ } catch (JSONException e) { }
+ }
+
+ // Second button
+ if (buttonLabels.length() > 1) {
+ try {
+ dlg.setNeutralButton(buttonLabels.getString(1),
+ new AlertDialog.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ try {
+ result.put("buttonIndex",2);
+ result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText());
+ } catch (JSONException e) { e.printStackTrace(); }
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result));
+ }
+ });
+ } catch (JSONException e) { }
+ }
+
+ // Third button
+ if (buttonLabels.length() > 2) {
+ try {
+ dlg.setPositiveButton(buttonLabels.getString(2),
+ new AlertDialog.OnClickListener() {
+ public void onClick(DialogInterface dialog, int which) {
+ dialog.dismiss();
+ try {
+ result.put("buttonIndex",3);
+ result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText());
+ } catch (JSONException e) { e.printStackTrace(); }
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result));
+ }
+ });
+ } catch (JSONException e) { }
+ }
+ dlg.setOnCancelListener(new AlertDialog.OnCancelListener() {
+ public void onCancel(DialogInterface dialog){
+ dialog.dismiss();
+ try {
+ result.put("buttonIndex",0);
+ result.put("input1", promptInput.getText().toString().trim().length()==0 ? defaultText : promptInput.getText());
+ } catch (JSONException e) { e.printStackTrace(); }
+ callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.OK, result));
+ }
+ });
+
+ changeTextDirection(dlg);
+ };
+ };
+ this.cordova.getActivity().runOnUiThread(runnable);
+ }
+
+ /**
+ * Show the spinner.
+ *
+ * @param title Title of the dialog
+ * @param message The message of the dialog
+ */
+ public synchronized void activityStart(final String title, final String message) {
+ if (this.spinnerDialog != null) {
+ this.spinnerDialog.dismiss();
+ this.spinnerDialog = null;
+ }
+ final Notification notification = this;
+ final CordovaInterface cordova = this.cordova;
+ Runnable runnable = new Runnable() {
+ public void run() {
+ notification.spinnerDialog = createProgressDialog(cordova); // new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
+ notification.spinnerDialog.setTitle(title);
+ notification.spinnerDialog.setMessage(message);
+ notification.spinnerDialog.setCancelable(true);
+ notification.spinnerDialog.setIndeterminate(true);
+ notification.spinnerDialog.setOnCancelListener(
+ new DialogInterface.OnCancelListener() {
+ public void onCancel(DialogInterface dialog) {
+ notification.spinnerDialog = null;
+ }
+ });
+ notification.spinnerDialog.show();
+ }
+ };
+ this.cordova.getActivity().runOnUiThread(runnable);
+ }
+
+ /**
+ * Stop spinner.
+ */
+ public synchronized void activityStop() {
+ if (this.spinnerDialog != null) {
+ this.spinnerDialog.dismiss();
+ this.spinnerDialog = null;
+ }
+ }
+
+ /**
+ * Show the progress dialog.
+ *
+ * @param title Title of the dialog
+ * @param message The message of the dialog
+ */
+ public synchronized void progressStart(final String title, final String message) {
+ if (this.progressDialog != null) {
+ this.progressDialog.dismiss();
+ this.progressDialog = null;
+ }
+ final Notification notification = this;
+ final CordovaInterface cordova = this.cordova;
+ Runnable runnable = new Runnable() {
+ public void run() {
+ notification.progressDialog = createProgressDialog(cordova); // new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
+ notification.progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
+ notification.progressDialog.setTitle(title);
+ notification.progressDialog.setMessage(message);
+ notification.progressDialog.setCancelable(true);
+ notification.progressDialog.setMax(100);
+ notification.progressDialog.setProgress(0);
+ notification.progressDialog.setOnCancelListener(
+ new DialogInterface.OnCancelListener() {
+ public void onCancel(DialogInterface dialog) {
+ notification.progressDialog = null;
+ }
+ });
+ notification.progressDialog.show();
+ }
+ };
+ this.cordova.getActivity().runOnUiThread(runnable);
+ }
+
+ /**
+ * Set value of progress bar.
+ *
+ * @param value 0-100
+ */
+ public synchronized void progressValue(int value) {
+ if (this.progressDialog != null) {
+ this.progressDialog.setProgress(value);
+ }
+ }
+
+ /**
+ * Stop progress dialog.
+ */
+ public synchronized void progressStop() {
+ if (this.progressDialog != null) {
+ this.progressDialog.dismiss();
+ this.progressDialog = null;
+ }
+ }
+
+ @SuppressLint("NewApi")
+ private AlertDialog.Builder createDialog(CordovaInterface cordova) {
+ int currentapiVersion = android.os.Build.VERSION.SDK_INT;
+ if (currentapiVersion >= android.os.Build.VERSION_CODES.HONEYCOMB) {
+ return new AlertDialog.Builder(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
+ } else {
+ return new AlertDialog.Builder(cordova.getActivity());
+ }
+ }
+
+ @SuppressLint("InlinedApi")
+ private ProgressDialog createProgressDialog(CordovaInterface cordova) {
+ int currentapiVersion = android.os.Build.VERSION.SDK_INT;
+ if (currentapiVersion >= android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
+ return new ProgressDialog(cordova.getActivity(), AlertDialog.THEME_DEVICE_DEFAULT_LIGHT);
+ } else {
+ return new ProgressDialog(cordova.getActivity());
+ }
+ }
+
+ @SuppressLint("NewApi")
+ private void changeTextDirection(Builder dlg){
+ int currentapiVersion = android.os.Build.VERSION.SDK_INT;
+ dlg.create();
+ AlertDialog dialog = dlg.show();
+ if (currentapiVersion >= android.os.Build.VERSION_CODES.JELLY_BEAN_MR1) {
+ TextView messageview = (TextView)dialog.findViewById(android.R.id.message);
+ messageview.setTextDirection(android.view.View.TEXT_DIRECTION_LOCALE);
+ }
+ }
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/blackberry10/index.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,87 @@
+/*
+* Copyright 2013 Research In Motion Limited.
+*
+* Licensed 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 showDialog(args, dialogType, result) {
+ //Unpack and map the args
+ var msg = JSON.parse(decodeURIComponent(args[0])),
+ title = JSON.parse(decodeURIComponent(args[1])),
+ btnLabel = JSON.parse(decodeURIComponent(args[2]));
+
+ if (!Array.isArray(btnLabel)) {
+ //Converts to array for (string) and (string,string, ...) cases
+ btnLabel = btnLabel.split(",");
+ }
+
+ if (msg && typeof msg === "string") {
+ msg = msg.replace(/^"|"$/g, "").replace(/\\"/g, '"');
+ } else {
+ result.error("message is undefined");
+ return;
+ }
+
+ var messageObj = {
+ title : title,
+ htmlmessage : msg,
+ dialogType : dialogType,
+ optionalButtons : btnLabel
+ };
+
+ //TODO replace with getOverlayWebview() when available in webplatform
+ qnx.webplatform.getWebViews()[2].dialog.show(messageObj, function (data) {
+ if (typeof data === "number") {
+ //Confirm dialog call back needs to be called with one-based indexing [1,2,3 etc]
+ result.callbackOk(++data, false);
+ } else {
+ //Prompt dialog callback expects object
+ result.callbackOk({
+ buttonIndex: data.ok ? 1 : 0,
+ input1: (data.oktext) ? decodeURIComponent(data.oktext) : ""
+ }, false);
+ }
+ });
+
+ result.noResult(true);
+}
+
+module.exports = {
+ alert: function (success, fail, args, env) {
+ var result = new PluginResult(args, env);
+
+ if (Object.keys(args).length < 3) {
+ result.error("Notification action - alert arguments not found.");
+ } else {
+ showDialog(args, "CustomAsk", result);
+ }
+ },
+ confirm: function (success, fail, args, env) {
+ var result = new PluginResult(args, env);
+
+ if (Object.keys(args).length < 3) {
+ result.error("Notification action - confirm arguments not found.");
+ } else {
+ showDialog(args, "CustomAsk", result);
+ }
+ },
+ prompt: function (success, fail, args, env) {
+ var result = new PluginResult(args, env);
+
+ if (Object.keys(args).length < 3) {
+ result.error("Notification action - prompt arguments not found.");
+ } else {
+ showDialog(args, "JavaScriptPrompt", result);
+ }
+ }
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/firefoxos/notification.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/firefoxos/notification.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,154 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var modulemapper = require('cordova/modulemapper');
+
+
+var origOpenFunc = modulemapper.getOriginalSymbol(window, 'window.open');
+
+
+function _empty() {}
+
+
+function modal(message, callback, title, buttonLabels, domObjects) {
+ var mainWindow = window;
+ var modalWindow = origOpenFunc();
+ var modalDocument = modalWindow.document;
+
+ modalDocument.write(
+ '' +
+ '' +
+ '' +
+ '');
+
+ var box = modalDocument.createElement('form');
+ box.setAttribute('role', 'dialog');
+ // prepare and append empty section
+ var section = modalDocument.createElement('section');
+ box.appendChild(section);
+ // add title
+ var boxtitle = modalDocument.createElement('h1');
+ boxtitle.appendChild(modalDocument.createTextNode(title));
+ section.appendChild(boxtitle);
+ // add message
+ var boxMessage = modalDocument.createElement('p');
+ boxMessage.appendChild(modalDocument.createTextNode(message));
+ section.appendChild(boxMessage);
+ // inject what's needed
+ if (domObjects) {
+ section.appendChild(domObjects);
+ }
+ // add buttons and assign callbackButton on click
+ var menu = modalDocument.createElement('menu');
+ box.appendChild(menu);
+ for (var index = 0; index < buttonLabels.length; index++) {
+ addButton(buttonLabels[index], index, (index === 0));
+ }
+ modalDocument.body.appendChild(box);
+
+ function addButton(label, index, recommended) {
+ var thisButtonCallback = makeCallbackButton(index + 1);
+ var button = modalDocument.createElement('button');
+ button.appendChild(modalDocument.createTextNode(label));
+ button.addEventListener('click', thisButtonCallback, false);
+ if (recommended) {
+ // TODO: default one listens to Enter key
+ button.classList.add('recommend');
+ }
+ menu.appendChild(button);
+ }
+
+ // TODO: onUnload listens to the cancel key
+ function onUnload() {
+ var result = 0;
+ if (modalDocument.getElementById('prompt-input')) {
+ result = {
+ input1: '',
+ buttonIndex: 0
+ }
+ }
+ mainWindow.setTimeout(function() {
+ callback(result);
+ }, 10);
+ };
+ modalWindow.addEventListener('unload', onUnload, false);
+
+ // call callback and destroy modal
+ function makeCallbackButton(labelIndex) {
+ return function() {
+ if (modalWindow) {
+ modalWindow.removeEventListener('unload', onUnload, false);
+ modalWindow.close();
+ }
+ // checking if prompt
+ var promptInput = modalDocument.getElementById('prompt-input');
+ var response;
+ if (promptInput) {
+ response = {
+ input1: promptInput.value,
+ buttonIndex: labelIndex
+ };
+ }
+ response = response || labelIndex;
+ callback(response);
+ }
+ }
+}
+
+var Notification = {
+ vibrate: function(milliseconds) {
+ navigator.vibrate(milliseconds);
+ },
+ alert: function(successCallback, errorCallback, args) {
+ var message = args[0];
+ var title = args[1];
+ var _buttonLabels = [args[2]];
+ var _callback = (successCallback || _empty);
+ modal(message, _callback, title, _buttonLabels);
+ },
+ confirm: function(successCallback, errorCallback, args) {
+ var message = args[0];
+ var title = args[1];
+ var buttonLabels = args[2];
+ var _callback = (successCallback || _empty);
+ modal(message, _callback, title, buttonLabels);
+ },
+ prompt: function(successCallback, errorCallback, args) {
+ var message = args[0];
+ var title = args[1];
+ var buttonLabels = args[2];
+ var defaultText = args[3];
+ var inputParagraph = document.createElement('p');
+ inputParagraph.classList.add('input');
+ var inputElement = document.createElement('input');
+ inputElement.setAttribute('type', 'text');
+ inputElement.id = 'prompt-input';
+ if (defaultText) {
+ inputElement.setAttribute('placeholder', defaultText);
+ }
+ inputParagraph.appendChild(inputElement);
+ modal(message, successCallback, title, buttonLabels, inputParagraph);
+ }
+};
+
+
+module.exports = Notification;
+require('cordova/exec/proxy').add('Notification', Notification);
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.bundle/beep.wav
Binary file Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.bundle/beep.wav has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,37 @@
+/*
+ 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.
+ */
+
+#import
+#import
+#import
+#import
+
+@interface CDVNotification : CDVPlugin {}
+
+- (void)alert:(CDVInvokedUrlCommand*)command;
+- (void)confirm:(CDVInvokedUrlCommand*)command;
+- (void)prompt:(CDVInvokedUrlCommand*)command;
+- (void)beep:(CDVInvokedUrlCommand*)command;
+
+@end
+
+@interface CDVAlertView : UIAlertView {}
+@property (nonatomic, copy) NSString* callbackId;
+
+@end
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ios/CDVNotification.m Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,157 @@
+/*
+ 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.
+ */
+
+#import "CDVNotification.h"
+#import
+#import
+
+#define DIALOG_TYPE_ALERT @"alert"
+#define DIALOG_TYPE_PROMPT @"prompt"
+
+static void soundCompletionCallback(SystemSoundID ssid, void* data);
+
+@implementation CDVNotification
+
+/*
+ * showDialogWithMessage - Common method to instantiate the alert view for alert, confirm, and prompt notifications.
+ * Parameters:
+ * message The alert view message.
+ * title The alert view title.
+ * buttons The array of customized strings for the buttons.
+ * defaultText The input text for the textbox (if textbox exists).
+ * callbackId The commmand callback id.
+ * dialogType The type of alert view [alert | prompt].
+ */
+- (void)showDialogWithMessage:(NSString*)message title:(NSString*)title buttons:(NSArray*)buttons defaultText:(NSString*)defaultText callbackId:(NSString*)callbackId dialogType:(NSString*)dialogType
+{
+ CDVAlertView* alertView = [[CDVAlertView alloc]
+ initWithTitle:title
+ message:message
+ delegate:self
+ cancelButtonTitle:nil
+ otherButtonTitles:nil];
+
+ alertView.callbackId = callbackId;
+
+ NSUInteger count = [buttons count];
+
+ for (int n = 0; n < count; n++) {
+ [alertView addButtonWithTitle:[buttons objectAtIndex:n]];
+ }
+
+ if ([dialogType isEqualToString:DIALOG_TYPE_PROMPT]) {
+ alertView.alertViewStyle = UIAlertViewStylePlainTextInput;
+ UITextField* textField = [alertView textFieldAtIndex:0];
+ textField.text = defaultText;
+ }
+
+ [alertView show];
+}
+
+- (void)alert:(CDVInvokedUrlCommand*)command
+{
+ NSString* callbackId = command.callbackId;
+ NSString* message = [command argumentAtIndex:0];
+ NSString* title = [command argumentAtIndex:1];
+ NSString* buttons = [command argumentAtIndex:2];
+
+ [self showDialogWithMessage:message title:title buttons:@[buttons] defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT];
+}
+
+- (void)confirm:(CDVInvokedUrlCommand*)command
+{
+ NSString* callbackId = command.callbackId;
+ NSString* message = [command argumentAtIndex:0];
+ NSString* title = [command argumentAtIndex:1];
+ NSArray* buttons = [command argumentAtIndex:2];
+
+ [self showDialogWithMessage:message title:title buttons:buttons defaultText:nil callbackId:callbackId dialogType:DIALOG_TYPE_ALERT];
+}
+
+- (void)prompt:(CDVInvokedUrlCommand*)command
+{
+ NSString* callbackId = command.callbackId;
+ NSString* message = [command argumentAtIndex:0];
+ NSString* title = [command argumentAtIndex:1];
+ NSArray* buttons = [command argumentAtIndex:2];
+ NSString* defaultText = [command argumentAtIndex:3];
+
+ [self showDialogWithMessage:message title:title buttons:buttons defaultText:defaultText callbackId:callbackId dialogType:DIALOG_TYPE_PROMPT];
+}
+
+/**
+ * Callback invoked when an alert dialog's buttons are clicked.
+ */
+- (void)alertView:(UIAlertView*)alertView clickedButtonAtIndex:(NSInteger)buttonIndex
+{
+ CDVAlertView* cdvAlertView = (CDVAlertView*)alertView;
+ CDVPluginResult* result;
+
+ // Determine what gets returned to JS based on the alert view type.
+ if (alertView.alertViewStyle == UIAlertViewStyleDefault) {
+ // For alert and confirm, return button index as int back to JS.
+ result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsInt:(int)(buttonIndex + 1)];
+ } else {
+ // For prompt, return button index and input text back to JS.
+ NSString* value0 = [[alertView textFieldAtIndex:0] text];
+ NSDictionary* info = @{
+ @"buttonIndex":@(buttonIndex + 1),
+ @"input1":(value0 ? value0 : [NSNull null])
+ };
+ result = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:info];
+ }
+ [self.commandDelegate sendPluginResult:result callbackId:cdvAlertView.callbackId];
+}
+
+static void playBeep(int count) {
+ SystemSoundID completeSound;
+ NSInteger cbDataCount = count;
+ NSURL* audioPath = [[NSBundle mainBundle] URLForResource:@"CDVNotification.bundle/beep" withExtension:@"wav"];
+ #if __has_feature(objc_arc)
+ AudioServicesCreateSystemSoundID((__bridge CFURLRef)audioPath, &completeSound);
+ #else
+ AudioServicesCreateSystemSoundID((CFURLRef)audioPath, &completeSound);
+ #endif
+ AudioServicesAddSystemSoundCompletion(completeSound, NULL, NULL, soundCompletionCallback, (void*)(cbDataCount-1));
+ AudioServicesPlaySystemSound(completeSound);
+}
+
+static void soundCompletionCallback(SystemSoundID ssid, void* data) {
+ int count = (int)data;
+ AudioServicesRemoveSystemSoundCompletion (ssid);
+ AudioServicesDisposeSystemSoundID(ssid);
+ if (count > 0) {
+ playBeep(count);
+ }
+}
+
+- (void)beep:(CDVInvokedUrlCommand*)command
+{
+ NSNumber* count = [command.arguments objectAtIndex:0 withDefault:[NSNumber numberWithInt:1]];
+ playBeep([count intValue]);
+}
+
+
+@end
+
+@implementation CDVAlertView
+
+@synthesize callbackId;
+
+@end
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.cpp Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,85 @@
+/*
+ *
+ * Licensed 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.
+ */
+
+#include "notification.h"
+
+#include
+
+void Dialogs::beep(int scId, int ecId, int times) {
+ Q_UNUSED(scId)
+ Q_UNUSED(ecId)
+ Q_UNUSED(times)
+
+ _player.setVolume(100);
+ _player.setMedia(QUrl::fromLocalFile("/usr/share/sounds/ubuntu/stereo/bell.ogg"));
+ _player.play();
+}
+
+void Dialogs::alert(int scId, int ecId, const QString &message, const QString &title, const QString &buttonLabel) {
+ QStringList list;
+ list.append(buttonLabel);
+
+ confirm(scId, ecId, message, title, list);
+}
+
+void Dialogs::confirm(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels) {
+ Q_UNUSED(ecId);
+
+ if (_alertCallback) {
+ qCritical() << "can't open second dialog";
+ return;
+ }
+ _alertCallback = scId;
+
+ QString s1, s2, s3;
+ if (buttonLabels.size() > 0)
+ s1 = buttonLabels[0];
+ if (buttonLabels.size() > 1)
+ s2 = buttonLabels[1];
+ if (buttonLabels.size() > 2)
+ s3 = buttonLabels[2];
+
+ QString path = m_cordova->get_app_dir() + "/../qml/notification.qml";
+ QString qml = QString("PopupUtils.open(%1, root, { root: root, cordova: cordova, title: %2, text: %3, promptVisible: false, button1Text: %4, button2Text: %5, button3Text: %6 })")
+ .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(title)).arg(CordovaInternal::format(message))
+ .arg(CordovaInternal::format(s1)).arg(CordovaInternal::format(s2)).arg(CordovaInternal::format(s3));
+
+ m_cordova->execQML(qml);
+}
+
+void Dialogs::prompt(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels, const QString &defaultText) {
+ Q_UNUSED(ecId);
+
+ if (_alertCallback) {
+ qCritical() << "can't open second dialog";
+ return;
+ }
+ _alertCallback = scId;
+
+ QString s1, s2, s3;
+ if (buttonLabels.size() > 0)
+ s1 = buttonLabels[0];
+ if (buttonLabels.size() > 1)
+ s2 = buttonLabels[1];
+ if (buttonLabels.size() > 2)
+ s3 = buttonLabels[2];
+ QString path = m_cordova->get_app_dir() + "/../qml/notification.qml";
+ QString qml = QString("PopupUtils.open(%1, root, { root: root, cordova: cordova, title: %2, text: %3, promptVisible: true, defaultPromptText: %7, button1Text: %4, button2Text: %5, button3Text: %6 })")
+ .arg(CordovaInternal::format(path)).arg(CordovaInternal::format(title)).arg(CordovaInternal::format(message))
+ .arg(CordovaInternal::format(s1)).arg(CordovaInternal::format(s2))
+ .arg(CordovaInternal::format(s3)).arg(CordovaInternal::format(defaultText));
+
+ m_cordova->execQML(qml);
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,64 @@
+/*
+ *
+ * Licensed 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.
+ */
+
+#ifndef NOTIFICATION_H
+#define NOTIFICATION_H
+
+#include
+#include
+#include
+#include
+
+class Dialogs: public CPlugin {
+ Q_OBJECT
+public:
+ explicit Dialogs(Cordova *cordova): CPlugin(cordova), _alertCallback(0) {
+ }
+
+ virtual const QString fullName() override {
+ return Dialogs::fullID();
+ }
+
+ virtual const QString shortName() override {
+ return "Notification";
+ }
+
+ static const QString fullID() {
+ return "Notification";
+ }
+public slots:
+ void beep(int scId, int ecId, int times);
+ void alert(int scId, int ecId, const QString &message, const QString &title, const QString &buttonLabel);
+ void confirm(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels);
+ void prompt(int scId, int ecId, const QString &message, const QString &title, const QStringList &buttonLabels, const QString &defaultText);
+
+ void notificationDialogButtonPressed(int buttonId, const QString &text, bool prompt) {
+ if (prompt) {
+ QVariantMap res;
+ res.insert("buttonIndex", buttonId);
+ res.insert("input1", text);
+ this->cb(_alertCallback, res);
+ } else {
+ this->cb(_alertCallback, buttonId);
+ }
+ _alertCallback = 0;
+ }
+
+private:
+ int _alertCallback;
+ QMediaPlayer _player;
+};
+
+#endif
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.qml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/ubuntu/notification.qml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,65 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+import QtQuick 2.0
+import Ubuntu.Components.Popups 0.1
+import Ubuntu.Components 0.1
+
+Dialog {
+ id: dialogue
+ property string button1Text
+ property string button2Text
+ property string button3Text
+ property bool promptVisible
+ property string defaultPromptText
+
+ TextField {
+ id: prompt
+ text: defaultPromptText
+ visible: promptVisible
+ focus: true
+ }
+ Button {
+ text: button1Text
+ color: "orange"
+ onClicked: {
+ root.exec("Notification", "notificationDialogButtonPressed", [1, prompt.text, promptVisible]);
+ PopupUtils.close(dialogue)
+ }
+ }
+ Button {
+ text: button2Text
+ visible: button2Text.length > 0
+ color: "orange"
+ onClicked: {
+ root.exec("Notification", "notificationDialogButtonPressed", [2, prompt.text, promptVisible]);
+ PopupUtils.close(dialogue)
+ }
+ }
+ Button {
+ text: button3Text
+ visible: button3Text.length > 0
+ onClicked: {
+ root.exec("Notification", "notificationDialogButtonPressed", [3, prompt.text, promptVisible]);
+ PopupUtils.close(dialogue)
+ }
+ }
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/windows8/NotificationProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/windows8/NotificationProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,126 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/*global Windows:true */
+
+var cordova = require('cordova');
+
+var isAlertShowing = false;
+var alertStack = [];
+
+module.exports = {
+ alert:function(win, loseX, args) {
+
+ if (isAlertShowing) {
+ var later = function () {
+ module.exports.alert(win, loseX, args);
+ };
+ alertStack.push(later);
+ return;
+ }
+ isAlertShowing = true;
+
+ var message = args[0];
+ var _title = args[1];
+ var _buttonLabel = args[2];
+
+ var md = new Windows.UI.Popups.MessageDialog(message, _title);
+ md.commands.append(new Windows.UI.Popups.UICommand(_buttonLabel));
+ md.showAsync().then(function() {
+ isAlertShowing = false;
+ win && win();
+
+ if (alertStack.length) {
+ setTimeout(alertStack.shift(), 0);
+ }
+
+ });
+ },
+
+ confirm:function(win, loseX, args) {
+
+ if (isAlertShowing) {
+ var later = function () {
+ module.exports.confirm(win, loseX, args);
+ };
+ alertStack.push(later);
+ return;
+ }
+
+ isAlertShowing = true;
+
+ try {
+ var message = args[0];
+ var _title = args[1];
+ var buttons = args[2];
+
+ var md = new Windows.UI.Popups.MessageDialog(message, _title);
+
+ buttons.forEach(function(buttonLabel) {
+ md.commands.append(new Windows.UI.Popups.UICommand(buttonLabel));
+ });
+
+ md.showAsync().then(function(res) {
+ isAlertShowing = false;
+ var result = res ? buttons.indexOf(res.label) + 1 : 0;
+ win && win(result);
+ if (alertStack.length) {
+ setTimeout(alertStack.shift(), 0);
+ }
+
+ });
+ } catch (e) {
+ // set isAlertShowing flag back to false in case of exception
+ isAlertShowing = false;
+ if (alertStack.length) {
+ setTimeout(alertStack.shift(), 0);
+ }
+ // rethrow exception
+ throw e;
+ }
+ },
+
+ beep:function(winX, loseX, args) {
+
+ // set a default args if it is not set
+ args = args && args.length ? args : ["1"];
+
+ var snd = new Audio('ms-winsoundevent:Notification.Default');
+ var count = parseInt(args[0]) || 1;
+ snd.msAudioCategory = "Alerts";
+
+ var onEvent = function () {
+ if (count > 0) {
+ snd.play();
+ } else {
+ snd.removeEventListener("ended", onEvent);
+ snd = null;
+ winX && winX(); // notification.js just sends null, but this is future friendly
+ }
+ count--;
+ };
+ snd.addEventListener("ended", onEvent);
+ onEvent();
+
+ }
+};
+
+require("cordova/exec/proxy").add("Notification",module.exports);
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/Notification.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/wp/Notification.cs Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,482 @@
+/*
+ Licensed 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.
+*/
+
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using Microsoft.Devices;
+using System.Runtime.Serialization;
+using System.Threading;
+using System.Windows.Resources;
+using Microsoft.Phone.Controls;
+using Microsoft.Xna.Framework.Audio;
+using WPCordovaClassLib.Cordova.UI;
+using System.Diagnostics;
+
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+ public class Notification : BaseCommand
+ {
+ static ProgressBar progressBar = null;
+ const int DEFAULT_DURATION = 5;
+
+ private NotificationBox notifyBox;
+
+ private class NotifBoxData
+ {
+ public NotificationBox previous {get;set;}
+ public string callbackId { get; set; }
+ }
+
+ private PhoneApplicationPage Page
+ {
+ get
+ {
+ PhoneApplicationPage page = null;
+ PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
+ if (frame != null)
+ {
+ page = frame.Content as PhoneApplicationPage;
+ }
+ return page;
+ }
+ }
+
+ // blink api - doesn't look like there is an equivalent api we can use...
+
+ [DataContract]
+ public class AlertOptions
+ {
+ [OnDeserializing]
+ public void OnDeserializing(StreamingContext context)
+ {
+ // set defaults
+ this.message = "message";
+ this.title = "Alert";
+ this.buttonLabel = "ok";
+ }
+
+ ///
+ /// message to display in the alert box
+ ///
+ [DataMember]
+ public string message;
+
+ ///
+ /// title displayed on the alert window
+ ///
+ [DataMember]
+ public string title;
+
+ ///
+ /// text to display on the button
+ ///
+ [DataMember]
+ public string buttonLabel;
+ }
+
+ [DataContract]
+ public class PromptResult
+ {
+ [DataMember]
+ public int buttonIndex;
+
+ [DataMember]
+ public string input1;
+
+ public PromptResult(int index, string text)
+ {
+ this.buttonIndex = index;
+ this.input1 = text;
+ }
+ }
+
+ public void alert(string options)
+ {
+ string[] args = JSON.JsonHelper.Deserialize(options);
+ AlertOptions alertOpts = new AlertOptions();
+ alertOpts.message = args[0];
+ alertOpts.title = args[1];
+ alertOpts.buttonLabel = args[2];
+ string aliasCurrentCommandCallbackId = args[3];
+
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ PhoneApplicationPage page = Page;
+ if (page != null)
+ {
+ Grid grid = page.FindName("LayoutRoot") as Grid;
+ if (grid != null)
+ {
+ var previous = notifyBox;
+ notifyBox = new NotificationBox();
+ notifyBox.Tag = new NotifBoxData { previous = previous, callbackId = aliasCurrentCommandCallbackId };
+ notifyBox.PageTitle.Text = alertOpts.title;
+ notifyBox.SubTitle.Text = alertOpts.message;
+ Button btnOK = new Button();
+ btnOK.Content = alertOpts.buttonLabel;
+ btnOK.Click += new RoutedEventHandler(btnOK_Click);
+ btnOK.Tag = 1;
+ notifyBox.ButtonPanel.Children.Add(btnOK);
+ grid.Children.Add(notifyBox);
+
+ if (previous == null)
+ {
+ page.BackKeyPress += page_BackKeyPress;
+ }
+ }
+ }
+ else
+ {
+ DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION));
+ }
+ });
+ }
+
+ public void prompt(string options)
+ {
+ string[] args = JSON.JsonHelper.Deserialize(options);
+ string message = args[0];
+ string title = args[1];
+ string buttonLabelsArray = args[2];
+ string[] buttonLabels = JSON.JsonHelper.Deserialize(buttonLabelsArray);
+ string defaultText = args[3];
+ string aliasCurrentCommandCallbackId = args[4];
+
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ PhoneApplicationPage page = Page;
+ if (page != null)
+ {
+ Grid grid = page.FindName("LayoutRoot") as Grid;
+ if (grid != null)
+ {
+ var previous = notifyBox;
+ notifyBox = new NotificationBox();
+ notifyBox.Tag = new NotifBoxData { previous = previous, callbackId = aliasCurrentCommandCallbackId };
+ notifyBox.PageTitle.Text = title;
+ notifyBox.SubTitle.Text = message;
+
+ //TextBox textBox = new TextBox();
+ //textBox.Text = defaultText;
+ //textBox.AcceptsReturn = true;
+ //notifyBox.ContentScroller.Content = textBox;
+
+ notifyBox.InputText.Text = defaultText;
+ notifyBox.InputText.Visibility = Visibility.Visible;
+
+ for (int i = 0; i < buttonLabels.Length; ++i)
+ {
+ Button button = new Button();
+ button.Content = buttonLabels[i];
+ button.Tag = i + 1;
+ button.Click += promptBoxbutton_Click;
+ notifyBox.ButtonPanel.Orientation = Orientation.Vertical;
+ notifyBox.ButtonPanel.Children.Add(button);
+ }
+
+ grid.Children.Add(notifyBox);
+ if (previous != null)
+ {
+ page.BackKeyPress += page_BackKeyPress;
+ }
+ }
+ }
+ else
+ {
+ DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION));
+ }
+ });
+ }
+
+ public void confirm(string options)
+ {
+ string[] args = JSON.JsonHelper.Deserialize(options);
+ AlertOptions alertOpts = new AlertOptions();
+ alertOpts.message = args[0];
+ alertOpts.title = args[1];
+ alertOpts.buttonLabel = args[2];
+ string aliasCurrentCommandCallbackId = args[3];
+
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ PhoneApplicationPage page = Page;
+ if (page != null)
+ {
+ Grid grid = page.FindName("LayoutRoot") as Grid;
+ if (grid != null)
+ {
+ var previous = notifyBox;
+ notifyBox = new NotificationBox();
+ notifyBox.Tag = new NotifBoxData { previous = previous, callbackId = aliasCurrentCommandCallbackId };
+ notifyBox.PageTitle.Text = alertOpts.title;
+ notifyBox.SubTitle.Text = alertOpts.message;
+
+ string[] labels = JSON.JsonHelper.Deserialize(alertOpts.buttonLabel);
+
+ if (labels == null)
+ {
+ labels = alertOpts.buttonLabel.Split(',');
+ }
+
+ for (int n = 0; n < labels.Length; n++)
+ {
+ Button btn = new Button();
+ btn.Content = labels[n];
+ btn.Tag = n;
+ btn.Click += new RoutedEventHandler(btnOK_Click);
+ notifyBox.ButtonPanel.Children.Add(btn);
+ }
+
+ grid.Children.Add(notifyBox);
+ if (previous == null)
+ {
+ page.BackKeyPress += page_BackKeyPress;
+ }
+ }
+ }
+ else
+ {
+ DispatchCommandResult(new PluginResult(PluginResult.Status.INSTANTIATION_EXCEPTION));
+ }
+ });
+ }
+
+ void promptBoxbutton_Click(object sender, RoutedEventArgs e)
+ {
+ Button button = sender as Button;
+ FrameworkElement promptBox = null;
+ int buttonIndex = 0;
+ string callbackId = string.Empty;
+ string text = string.Empty;
+ if (button != null)
+ {
+ buttonIndex = (int)button.Tag;
+ promptBox = button.Parent as FrameworkElement;
+ while ((promptBox = promptBox.Parent as FrameworkElement) != null &&
+ !(promptBox is NotificationBox)) ;
+ }
+
+ if (promptBox != null)
+ {
+ NotificationBox box = promptBox as NotificationBox;
+
+ text = box.InputText.Text;
+
+ PhoneApplicationPage page = Page;
+ if (page != null)
+ {
+ Grid grid = page.FindName("LayoutRoot") as Grid;
+ if (grid != null)
+ {
+ grid.Children.Remove(promptBox);
+ }
+
+ NotifBoxData data = promptBox.Tag as NotifBoxData;
+ promptBox = data.previous as NotificationBox;
+ callbackId = data.callbackId as string;
+
+ if (promptBox == null)
+ {
+ page.BackKeyPress -= page_BackKeyPress;
+ }
+ }
+ }
+ DispatchCommandResult(new PluginResult(PluginResult.Status.OK, new PromptResult(buttonIndex, text)), callbackId);
+ }
+
+ void page_BackKeyPress(object sender, System.ComponentModel.CancelEventArgs e)
+ {
+ PhoneApplicationPage page = sender as PhoneApplicationPage;
+ string callbackId = "";
+ if (page != null && notifyBox != null)
+ {
+ Grid grid = page.FindName("LayoutRoot") as Grid;
+ if (grid != null)
+ {
+ grid.Children.Remove(notifyBox);
+ NotifBoxData notifBoxData = notifyBox.Tag as NotifBoxData;
+ notifyBox = notifBoxData.previous as NotificationBox;
+ callbackId = notifBoxData.callbackId as string;
+ }
+ if (notifyBox == null)
+ {
+ page.BackKeyPress -= page_BackKeyPress;
+ }
+ e.Cancel = true;
+ }
+
+ DispatchCommandResult(new PluginResult(PluginResult.Status.OK, 0), callbackId);
+ }
+
+ void btnOK_Click(object sender, RoutedEventArgs e)
+ {
+ Button btn = sender as Button;
+ FrameworkElement notifBoxParent = null;
+ int retVal = 0;
+ string callbackId = "";
+ if (btn != null)
+ {
+ retVal = (int)btn.Tag + 1;
+
+ notifBoxParent = btn.Parent as FrameworkElement;
+ while ((notifBoxParent = notifBoxParent.Parent as FrameworkElement) != null &&
+ !(notifBoxParent is NotificationBox)) ;
+ }
+ if (notifBoxParent != null)
+ {
+ PhoneApplicationPage page = Page;
+ if (page != null)
+ {
+ Grid grid = page.FindName("LayoutRoot") as Grid;
+ if (grid != null)
+ {
+ grid.Children.Remove(notifBoxParent);
+ }
+
+ NotifBoxData notifBoxData = notifBoxParent.Tag as NotifBoxData;
+ notifyBox = notifBoxData.previous as NotificationBox;
+ callbackId = notifBoxData.callbackId as string;
+
+ if (notifyBox == null)
+ {
+ page.BackKeyPress -= page_BackKeyPress;
+ }
+ }
+
+ }
+ DispatchCommandResult(new PluginResult(PluginResult.Status.OK, retVal), callbackId);
+ }
+
+
+
+ public void beep(string options)
+ {
+ string[] args = JSON.JsonHelper.Deserialize(options);
+ int times = int.Parse(args[0]);
+
+ string resourcePath = BaseCommand.GetBaseURL() + "Plugins/org.apache.cordova.dialogs/notification-beep.wav";
+
+ StreamResourceInfo sri = Application.GetResourceStream(new Uri(resourcePath, UriKind.Relative));
+
+ if (sri != null)
+ {
+ SoundEffect effect = SoundEffect.FromStream(sri.Stream);
+ SoundEffectInstance inst = effect.CreateInstance();
+ ThreadPool.QueueUserWorkItem((o) =>
+ {
+ // cannot interact with UI !!
+ do
+ {
+ inst.Play();
+ Thread.Sleep(effect.Duration + TimeSpan.FromMilliseconds(100));
+ }
+ while (--times > 0);
+
+ });
+
+ }
+
+ // TODO: may need a listener to trigger DispatchCommandResult after the alarm has finished executing...
+ DispatchCommandResult();
+ }
+
+ // Display an indeterminate progress indicator
+ public void activityStart(string unused)
+ {
+
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
+
+ if (frame != null)
+ {
+ PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
+
+ if (page != null)
+ {
+ var temp = page.FindName("LayoutRoot");
+ Grid grid = temp as Grid;
+ if (grid != null)
+ {
+ if (progressBar != null)
+ {
+ grid.Children.Remove(progressBar);
+ }
+ progressBar = new ProgressBar();
+ progressBar.IsIndeterminate = true;
+ progressBar.IsEnabled = true;
+
+ grid.Children.Add(progressBar);
+ }
+ }
+ }
+ });
+ }
+
+
+ // Remove our indeterminate progress indicator
+ public void activityStop(string unused)
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ if (progressBar != null)
+ {
+ progressBar.IsEnabled = false;
+ PhoneApplicationFrame frame = Application.Current.RootVisual as PhoneApplicationFrame;
+ if (frame != null)
+ {
+ PhoneApplicationPage page = frame.Content as PhoneApplicationPage;
+ if (page != null)
+ {
+ Grid grid = page.FindName("LayoutRoot") as Grid;
+ if (grid != null)
+ {
+ grid.Children.Remove(progressBar);
+ }
+ }
+ }
+ progressBar = null;
+ }
+ });
+ }
+
+ public void vibrate(string vibrateDuration)
+ {
+
+ int msecs = 200; // set default
+
+ try
+ {
+ string[] args = JSON.JsonHelper.Deserialize(vibrateDuration);
+
+ msecs = int.Parse(args[0]);
+ if (msecs < 1)
+ {
+ msecs = 1;
+ }
+ }
+ catch (FormatException)
+ {
+
+ }
+
+ VibrateController.Default.Start(TimeSpan.FromMilliseconds(msecs));
+
+ // TODO: may need to add listener to trigger DispatchCommandResult when the vibration ends...
+ DispatchCommandResult();
+ }
+ }
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/src/wp/NotificationBox.xaml.cs Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,41 @@
+/*
+ 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.
+*/
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+
+namespace WPCordovaClassLib.Cordova.UI
+{
+ public partial class NotificationBox : UserControl
+ {
+ public NotificationBox()
+ {
+ InitializeComponent();
+ }
+ }
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/src/wp/notification-beep.wav
Binary file Touchgui/plugins/org.apache.cordova.dialogs/src/wp/notification-beep.wav has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/tests/plugin.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/tests/plugin.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,29 @@
+
+
+
+
+ Cordova Notification Plugin Tests
+ Apache 2.0
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/tests/tests.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/tests/tests.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,194 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+exports.defineAutoTests = function () {
+ describe('Notification (navigator.notification)', function () {
+ it("should exist", function () {
+ expect(navigator.notification).toBeDefined();
+ });
+
+ it("should contain a beep function", function () {
+ expect(typeof navigator.notification.beep).toBeDefined();
+ expect(typeof navigator.notification.beep).toBe("function");
+ });
+
+ it("should contain an alert function", function () {
+ expect(typeof navigator.notification.alert).toBeDefined();
+ expect(typeof navigator.notification.alert).toBe("function");
+ });
+
+ it("should contain a confirm function", function () {
+ expect(typeof navigator.notification.confirm).toBeDefined();
+ expect(typeof navigator.notification.confirm).toBe("function");
+ });
+
+ it("should contain a prompt function", function () {
+ expect(typeof navigator.notification.prompt).toBeDefined();
+ expect(typeof navigator.notification.prompt).toBe("function");
+ });
+ });
+};
+
+/******************************************************************************/
+/******************************************************************************/
+/******************************************************************************/
+
+exports.defineManualTests = function (contentEl, createActionButton) {
+ var logMessage = function (message) {
+ var log = document.getElementById('info');
+ var logLine = document.createElement('div');
+ logLine.innerHTML = message;
+ log.appendChild(logLine);
+ }
+
+ var clearLog = function () {
+ var log = document.getElementById('info');
+ log.innerHTML = '';
+ }
+
+ var beep = function () {
+ console.log("beep()");
+ navigator.notification.beep(3);
+ };
+
+ var alertDialog = function (message, title, button) {
+ console.log("alertDialog()");
+ navigator.notification.alert(message,
+ function () {
+ console.log("Alert dismissed.");
+ },
+ title, button);
+ console.log("After alert");
+ };
+
+ var confirmDialogA = function (message, title, buttons) {
+ clearLog();
+ navigator.notification.confirm(message,
+ function (r) {
+ if (r === 0) {
+ logMessage("Dismissed dialog without making a selection.");
+ console.log("Dismissed dialog without making a selection.");
+ } else {
+ console.log("You selected " + r);
+ logMessage("You selected " + (buttons.split(","))[r - 1]);
+ }
+ },
+ title,
+ buttons);
+ };
+
+ var confirmDialogB = function (message, title, buttons) {
+ clearLog();
+ navigator.notification.confirm(message,
+ function (r) {
+ if (r === 0) {
+ logMessage("Dismissed dialog without making a selection.");
+ console.log("Dismissed dialog without making a selection.");
+ } else {
+ console.log("You selected " + r);
+ logMessage("You selected " + buttons[r - 1]);
+ }
+ },
+ title,
+ buttons);
+ };
+
+ var promptDialog = function (message, title, buttons) {
+ clearLog();
+ navigator.notification.prompt(message,
+ function (r) {
+ if (r && r.buttonIndex === 0) {
+ var msg = "Dismissed dialog";
+ if (r.input1) {
+ msg += " with input: " + r.input1
+ }
+ logMessage(msg);
+ console.log(msg);
+ } else {
+ console.log("You selected " + r.buttonIndex + " and entered: " + r.input1);
+ logMessage("You selected " + buttons[r.buttonIndex - 1] + " and entered: " + r.input1);
+ }
+ },
+ title,
+ buttons);
+ };
+
+ /******************************************************************************/
+
+ var dialogs_tests = '' +
+ 'Expected result: Device will beep (unless device is on silent). Nothing will get updated in status box.' +
+ '
Dialog Tests
' +
+ '
Dialog boxes will pop up for each of the following tests
' +
+ ' ' +
+ 'Expected result: Dialog will say "You pressed alert". Press continue to close dialog. Nothing will get updated in status box.' +
+ ' ' +
+ 'Expected result: Dialog will say "You pressed confirm". Press Yes, No, or Maybe to close dialog. Status box will tell you what option you selected.' +
+ ' ' +
+ 'Expected result: Dialog will say "You pressed confirm". Press Yes, No, or Maybe, Not Sure to close dialog. Status box will tell you what option you selected, and should use 1-based indexing.' +
+ ' ' +
+ 'Expected result: Dialog will say "You pressed prompt". Enter any message and press Yes, No, or Maybe, Not Sure to close dialog. Status box will tell you what option you selected and message you entered, and should use 1-based indexing.' +
+ ' ' +
+ 'Expected result: Dialog will have title "index.html" and say "You pressed alert" Press OK to close dialog. Nothing will get updated in status box.' +
+ ' ' +
+ 'Expected result: Dialog will have title "index.html" and say "You selected confirm". Press Cancel or OK to close dialog. Nothing will get updated in status box.' +
+ ' ' +
+ 'Expected result: Dialog will have title "index.html" and say "This is a prompt". "Default value" will be in text box. Press Cancel or OK to close dialog. Nothing will get updated in status box.';
+
+ contentEl.innerHTML = '' +
+ dialogs_tests;
+
+ createActionButton('Beep', function () {
+ beep();
+ }, 'beep');
+
+ createActionButton('Alert Dialog', function () {
+ alertDialog('You pressed alert.', 'Alert Dialog', 'Continue');
+ }, 'alert');
+
+ // WP8.1 detection is necessary since it doesn't support confirm dialogs with more than 2 buttons
+ var isRunningOnWP81 = cordova.platformId == "windows" && navigator.userAgent.indexOf('Windows Phone') > -1;
+
+ createActionButton('Confirm Dialog - Deprecated', function () {
+ var buttons = isRunningOnWP81 ? 'Yes,No' : 'Yes,No,Maybe';
+ confirmDialogA('You pressed confirm.', 'Confirm Dialog', buttons);
+ }, 'confirm_deprecated');
+
+ createActionButton('Confirm Dialog', function () {
+ var buttons = isRunningOnWP81 ? ['Yes', 'Actually, No'] : ['Yes', 'No', 'Maybe, Not Sure'];
+ confirmDialogB('You pressed confirm.', 'Confirm Dialog', buttons);
+ }, 'confirm');
+
+ createActionButton('Prompt Dialog', function () {
+ promptDialog('You pressed prompt.', 'Prompt Dialog', ['Yes', 'No', 'Maybe, Not Sure']);
+ }, 'prompt');
+
+ createActionButton('Built-in Alert Dialog', function () {
+ typeof alert === 'function' && alert('You pressed alert');
+ }, 'built_in_alert');
+
+ createActionButton('Built-in Confirm Dialog', function () {
+ typeof confirm === 'function' && confirm('You selected confirm');
+ }, 'built_in_confirm');
+
+ createActionButton('Built-in Prompt Dialog', function () {
+ typeof prompt === 'function' && prompt('This is a prompt', 'Default value');
+ }, 'built_in_prompt');
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/android/notification.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/android/notification.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,74 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var exec = require('cordova/exec');
+
+/**
+ * Provides Android enhanced notification API.
+ */
+module.exports = {
+ activityStart : function(title, message) {
+ // If title and message not specified then mimic Android behavior of
+ // using default strings.
+ if (typeof title === "undefined" && typeof message == "undefined") {
+ title = "Busy";
+ message = 'Please wait...';
+ }
+
+ exec(null, null, 'Notification', 'activityStart', [ title, message ]);
+ },
+
+ /**
+ * Close an activity dialog
+ */
+ activityStop : function() {
+ exec(null, null, 'Notification', 'activityStop', []);
+ },
+
+ /**
+ * Display a progress dialog with progress bar that goes from 0 to 100.
+ *
+ * @param {String}
+ * title Title of the progress dialog.
+ * @param {String}
+ * message Message to display in the dialog.
+ */
+ progressStart : function(title, message) {
+ exec(null, null, 'Notification', 'progressStart', [ title, message ]);
+ },
+
+ /**
+ * Close the progress dialog.
+ */
+ progressStop : function() {
+ exec(null, null, 'Notification', 'progressStop', []);
+ },
+
+ /**
+ * Set the progress dialog value.
+ *
+ * @param {Number}
+ * value 0-100
+ */
+ progressValue : function(value) {
+ exec(null, null, 'Notification', 'progressValue', [ value ]);
+ }
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/beep.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/beep.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,42 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+module.exports = function (quantity) {
+ var count = 0,
+ beepObj,
+ play = function () {
+ //create new object every time due to strage playback behaviour
+ beepObj = new Audio('local:///chrome/plugin/org.apache.cordova.dialogs/notification-beep.wav');
+ beepObj.addEventListener("ended", callback);
+ beepObj.play();
+ },
+ callback = function () {
+ if (--count > 0) {
+ play();
+ } else {
+ delete beepObj;
+ }
+ };
+ count += quantity || 1;
+ if (count > 0) {
+ play();
+ }
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/notification-beep.wav
Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/blackberry10/notification-beep.wav has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger-press.png
Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger-press.png has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger.png
Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/danger.png has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/default.png
Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/default.png has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/gradient.png
Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/gradient.png has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/notification.css
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/notification.css Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,248 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/* Main dialog setup */
+form[role="dialog"] {
+ background:
+ url(../img/pattern.png) repeat left top,
+ url(../img/gradient.png) no-repeat left top / 100% 100%;
+ overflow: hidden;
+ position: absolute;
+ z-index: 100;
+ top: 0;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 1.5rem 0 7rem;
+ font-family: "MozTT", Sans-serif;
+ font-size: 0;
+ /* Using font-size: 0; we avoid the unwanted visual space (about 3px)
+ created by white-spaces and break lines in the code betewen inline-block elements */
+ color: #fff;
+ text-align: left;
+}
+
+form[role="dialog"]:before {
+ content: "";
+ display: inline-block;
+ vertical-align: middle;
+ width: 0.1rem;
+ height: 100%;
+ margin-left: -0.1rem;
+}
+
+form[role="dialog"] > section {
+ font-weight: lighter;
+ font-size: 1.8rem;
+ color: #FAFAFA;
+ padding: 0 1.5rem;
+ -moz-box-sizing: padding-box;
+ width: 100%;
+ display: inline-block;
+ overflow-y: scroll;
+ max-height: 100%;
+ vertical-align: middle;
+ white-space: normal;
+}
+
+form[role="dialog"] h1 {
+ font-weight: normal;
+ font-size: 1.6rem;
+ line-height: 1.5em;
+ color: #fff;
+ margin: 0;
+ padding: 0 1.5rem 1rem;
+ border-bottom: 0.1rem solid #686868;
+}
+
+/* Menu & buttons setup */
+form[role="dialog"] menu {
+ margin: 0;
+ padding: 1.5rem;
+ padding-bottom: 0.5rem;
+ border-top: solid 0.1rem rgba(255, 255, 255, 0.1);
+ background: #2d2d2d url(../img/pattern.png) repeat left top;
+ display: block;
+ overflow: hidden;
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ text-align: center;
+}
+
+form[role="dialog"] menu button::-moz-focus-inner {
+ border: none;
+ outline: none;
+}
+form[role="dialog"] menu button {
+ width: 100%;
+ height: 2.4rem;
+ margin: 0 0 1rem;
+ padding: 0 1.5rem;
+ -moz-box-sizing: border-box;
+ display: inline-block;
+ vertical-align: middle;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ background: #fafafa url(../img/default.png) repeat-x left bottom/ auto 100%;
+ border: 0.1rem solid #a6a6a6;
+ border-radius: 0.3rem;
+ font: 500 1.2rem/2.4rem 'MozTT', Sans-serif;
+ color: #333;
+ text-align: center;
+ text-shadow: 0.1rem 0.1rem 0 rgba(255,255,255,0.3);
+ text-decoration: none;
+ outline: none;
+}
+
+/* Press (default & recommend) */
+form[role="dialog"] menu button:active,
+form[role="dialog"] menu button.recommend:active,
+a.recommend[role="button"]:active {
+ border-color: #008aaa;
+ color: #333;
+}
+
+/* Recommend */
+form[role="dialog"] menu button.recommend {
+ background-image: url(../img/recommend.png);
+ background-color: #00caf2;
+ border-color: #008eab;
+}
+
+/* Danger */
+form[role="dialog"] menu button.danger,
+a.danger[role="button"] {
+ background-image: url(../img/danger.png);
+ background-color: #b70404;
+ color: #fff;
+ text-shadow: none;
+ border-color: #820000;
+}
+
+/* Danger Press */
+form[role="dialog"] menu button.danger:active {
+ background-image: url(../img/danger-press.png);
+ background-color: #890707;
+}
+
+/* Disabled */
+form[role="dialog"] > menu > button[disabled] {
+ background: #5f5f5f;
+ color: #4d4d4d;
+ text-shadow: none;
+ border-color: #4d4d4d;
+ pointer-events: none;
+}
+
+
+form[role="dialog"] menu button:nth-child(even) {
+ margin-left: 1rem;
+}
+
+form[role="dialog"] menu button,
+form[role="dialog"] menu button:nth-child(odd) {
+ margin: 0 0 1rem 0;
+}
+
+form[role="dialog"] menu button {
+ width: calc((100% - 1rem) / 2);
+}
+
+form[role="dialog"] menu button.full {
+ width: 100%;
+}
+
+/* Specific component code */
+form[role="dialog"] p {
+ word-wrap: break-word;
+ margin: 1rem 0 0;
+ padding: 0 1.5rem 1rem;
+ line-height: 3rem;
+}
+
+form[role="dialog"] p img {
+ float: left;
+ margin-right: 2rem;
+}
+
+form[role="dialog"] p strong {
+ font-weight: lighter;
+}
+
+form[role="dialog"] p small {
+ font-size: 1.4rem;
+ font-weight: normal;
+ color: #cbcbcb;
+ display: block;
+}
+
+form[role="dialog"] dl {
+ border-top: 0.1rem solid #686868;
+ margin: 1rem 0 0;
+ overflow: hidden;
+ padding-top: 1rem;
+ font-size: 1.6rem;
+ line-height: 2.2rem;
+}
+
+form[role="dialog"] dl > dt {
+ clear: both;
+ float: left;
+ width: 7rem;
+ padding-left: 1.5rem;
+ font-weight: 500;
+ text-align: left;
+}
+
+form[role="dialog"] dl > dd {
+ padding-right: 1.5rem;
+ font-weight: 300;
+ text-overflow: ellipsis;
+ vertical-align: top;
+ overflow: hidden;
+}
+
+/* input areas */
+input[type="text"],
+input[type="password"],
+input[type="email"],
+input[type="tel"],
+input[type="search"],
+input[type="url"],
+input[type="number"],
+textarea {
+ -moz-box-sizing: border-box;
+ display: block;
+ overflow: hidden;
+ width: 100%;
+ height: 3rem;
+ resize: none;
+ padding: 0 1rem;
+ font-size: 1.6rem;
+ line-height: 3rem;
+ border: 0.1rem solid #ccc;
+ border-radius: 0.3rem;
+ box-shadow: none; /* override the box-shadow from the system (performance issue) */
+ background: #fff url(input_areas/images/ui/shadow.png) repeat-x;
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/pattern.png
Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/pattern.png has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/recommend.png
Binary file Touchgui/plugins/org.apache.cordova.dialogs/www/firefoxos/recommend.png has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.dialogs/www/notification.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.dialogs/www/notification.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,112 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var exec = require('cordova/exec');
+var platform = require('cordova/platform');
+
+/**
+ * Provides access to notifications on the device.
+ */
+
+module.exports = {
+
+ /**
+ * Open a native alert dialog, with a customizable title and button text.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} completeCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Alert)
+ * @param {String} buttonLabel Label of the close button (default: OK)
+ */
+ alert: function(message, completeCallback, title, buttonLabel) {
+ var _title = (title || "Alert");
+ var _buttonLabel = (buttonLabel || "OK");
+ exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]);
+ },
+
+ /**
+ * Open a native confirm dialog, with a customizable title and button text.
+ * The result that the user selects is returned to the result callback.
+ *
+ * @param {String} message Message to print in the body of the alert
+ * @param {Function} resultCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the alert dialog (default: Confirm)
+ * @param {Array} buttonLabels Array of the labels of the buttons (default: ['OK', 'Cancel'])
+ */
+ confirm: function(message, resultCallback, title, buttonLabels) {
+ var _title = (title || "Confirm");
+ var _buttonLabels = (buttonLabels || ["OK", "Cancel"]);
+
+ // Strings are deprecated!
+ if (typeof _buttonLabels === 'string') {
+ console.log("Notification.confirm(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array).");
+ }
+
+ // Some platforms take an array of button label names.
+ // Other platforms take a comma separated list.
+ // For compatibility, we convert to the desired type based on the platform.
+ if (platform.id == "amazon-fireos" || platform.id == "android" || platform.id == "ios" ||
+ platform.id == "windowsphone" || platform.id == "firefoxos" || platform.id == "ubuntu" ||
+ platform.id == "windows8" || platform.id == "windows") {
+
+ if (typeof _buttonLabels === 'string') {
+ _buttonLabels = _buttonLabels.split(","); // not crazy about changing the var type here
+ }
+ } else {
+ if (Array.isArray(_buttonLabels)) {
+ var buttonLabelArray = _buttonLabels;
+ _buttonLabels = buttonLabelArray.toString();
+ }
+ }
+ exec(resultCallback, null, "Notification", "confirm", [message, _title, _buttonLabels]);
+ },
+
+ /**
+ * Open a native prompt dialog, with a customizable title and button text.
+ * The following results are returned to the result callback:
+ * buttonIndex Index number of the button selected.
+ * input1 The text entered in the prompt dialog box.
+ *
+ * @param {String} message Dialog message to display (default: "Prompt message")
+ * @param {Function} resultCallback The callback that is called when user clicks on a button.
+ * @param {String} title Title of the dialog (default: "Prompt")
+ * @param {Array} buttonLabels Array of strings for the button labels (default: ["OK","Cancel"])
+ * @param {String} defaultText Textbox input value (default: empty string)
+ */
+ prompt: function(message, resultCallback, title, buttonLabels, defaultText) {
+ var _message = (message || "Prompt message");
+ var _title = (title || "Prompt");
+ var _buttonLabels = (buttonLabels || ["OK","Cancel"]);
+ var _defaultText = (defaultText || "");
+ exec(resultCallback, null, "Notification", "prompt", [_message, _title, _buttonLabels, _defaultText]);
+ },
+
+ /**
+ * Causes the device to beep.
+ * On Android, the default notification ringtone is played "count" times.
+ *
+ * @param {Integer} count The number of beeps.
+ */
+ beep: function(count) {
+ var defaultedCount = count || 1;
+ exec(null, null, "Notification", "beep", [ defaultedCount ]);
+ }
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/.fetch.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/.fetch.json Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,1 @@
+{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.splashscreen"}}
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/CONTRIBUTING.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,37 @@
+
+
+# Contributing to Apache Cordova
+
+Anyone can contribute to Cordova. And we need your contributions.
+
+There are multiple ways to contribute: report bugs, improve the docs, and
+contribute code.
+
+For instructions on this, start with the
+[contribution overview](http://cordova.apache.org/#contribute).
+
+The details are explained there, but the important items are:
+ - Sign and submit an Apache ICLA (Contributor License Agreement).
+ - Have a Jira issue open that corresponds to your contribution.
+ - Run the tests so your patch doesn't break existing functionality.
+
+We look forward to your contributions!
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/LICENSE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/LICENSE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/NOTICE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/NOTICE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,5 @@
+Apache Cordova
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/README.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,22 @@
+
+
+# org.apache.cordova.splashscreen
+
+Plugin documentation: [doc/index.md](doc/index.md)
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/RELEASENOTES.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,100 @@
+
+# Release Notes
+
+### 0.2.2 (Sept 25, 2013)
+* CB-4889 bumping&resetting version
+* CB-4889 renaming org.apache.cordova.core.splashscreen to org.apache.cordova.splashscreen
+* Rename CHANGELOG.md -> RELEASENOTES.md
+* [CB-4806] Update splashscreen image bounds for iOS 7
+* [CB-4752] Incremented plugin version on dev branch.
+
+### 0.2.3 (Oct 9, 2013)
+* [CB-4806] Re-fix Update splashscreen image bounds for iOS 7
+* [CB-4934] plugin-splashscreen should not show by default on Windows8
+* [CB-4929] plugin-splashscreen not loading proxy windows8
+* [CB-4915] Incremented plugin version on dev branch.
+
+### 0.2.4 (Oct 28, 2013)
+* CB-5128: add repo + issue tag to plugin.xml for splashscreen plugin
+* [CB-5010] Incremented plugin version on dev branch.
+
+### 0.2.5 (Dec 4, 2013)
+* add ubuntu platform
+* Added amazon-fireos platform. Change to use amazon-fireos as a platform if the user agent string contains 'cordova-amazon-fireos'
+* CB-5124 - Remove splashscreen config.xml values from iOS Configuration Docs, move to plugin docs
+
+### 0.2.6 (Jan 02, 2014)
+* CB-5658 Add doc/index.md for Splashscreen plugin
+* Handle error when splash image is missing.
+
+### 0.2.7 (Feb 05, 2014)
+* [CB-3562] Fix aspect ratio on landscape-only iPhone applications
+* CB-4051 fix for splashscreen rotation problem
+
+### 0.3.0 (Apr 17, 2014)
+* Add Tizen support to plugin
+* CB-6422: [windows8] use cordova/exec/proxy
+* CB-4051: [ios] - Re-fix - Splashscreen rotation problem (closes #13)
+* CB-6460: Update license headers
+* CB-6465: Add license headers to Tizen code
+* Add NOTICE file
+
+### 0.3.1 (Jun 05, 2014)
+* documentation translation: cordova-plugin-splashscreen
+* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
+* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
+* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
+* Lisa testing pulling in plugins for plugin: cordova-plugin-splashscreen
+* CB-6810 Add license to CONTRIBUTING.md
+* [wp8] updated quirk for and combined iOS,WP8,BB10 quirks as they are all the same
+* [wp] implemented OnInit so splash screen can be shown before cordova page is loaded
+* [wp] plugin must be autoloaded for AutoHideSplashScreen preference to work
+* CB-6483 Use splash screen image from manifest on Windows8
+* CB-6491 add CONTRIBUTING.md
+* Revert "Merge branch 'tizen' of http://github.com/siovene/cordova-plugin-splashscreen"
+
+### 0.3.2 (Aug 06, 2014)
+* CB-6127 Updated translations for docs
+* CB-7041 ios: Fix image filename logic when setting the iPad splash screen
+* fixes Splashscreen crash on WP8
+* Remove outdated doc
+
+### 0.3.3 (Sep 17, 2014)
+* CB-7249 cordova-plugin-splashscreen documentation translation
+* Renamed test dir, added nested plugin.xml
+* added documentation for manual tests
+* CB-7196 port splashscreen tests to framework
+
+### 0.3.4 (Oct 03, 2014)
+* Finalized iOS splash screen (image name) tests. 176 tests in all, 44 for each type of device (iPad, iPhone, iPhone5, iPhone6, iPhone 6 Plus).
+* CB-7633 - (Re-fix based on updated unit tests) iPhone 6 Plus support
+* Updated iOS tests for locked orientations
+* Added more iOS splash screen tests.
+* CB-7633 - Add support for iPhone 6/6+
+* Added failing iPhone 6/6 Plus tests.
+* Added 'npm test'
+* CB-7663 - iOS unit tests for splash screen
+* Properly formatted splashscreen preference docs.
+
+### 0.3.5 (Dec 02, 2014)
+* CB-7204 - Race condition when hiding and showing spinner (closes #21)
+* CB-7700 cordova-plugin-splashscreen documentation translation: cordova-plugin-splashscreen
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/de/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,75 @@
+
+
+# org.apache.cordova.splashscreen
+
+Dieses Plugin zeigt und verbirgt einen Splash-Screen beim Start der Anwendung.
+
+## Installation
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## Unterstützte Plattformen
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Windows Phone 7 und 8
+* Windows 8
+
+## Methoden
+
+* SplashScreen.Show
+* SplashScreen.Hide
+
+### Android Eigenarten
+
+Sie müssen in der config.xml folgende Einstellungen vornehmen:
+
+`` ``
+
+Wo Foo ist der Name der Datei Splashscreen, vorzugsweise eine 9-Patch-Datei. Stellen Sie sicher, Splashcreen Dateien zu Ihrem Res/Xml-Verzeichnis unter den entsprechenden Ordnern hinzuzufügen. Der zweite Parameter stellt dar, wie lange das Splashscreen in Millisekunden angezeigt werden. Es wird standardmäßig auf 3000 ms. Weitere Informationen finden Sie unter [Symbole und Splash-Screens][1] .
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## SplashScreen.Hide
+
+Schließen Sie den Splash-Screen.
+
+ Navigator.SplashScreen.Hide();
+
+
+### BlackBerry 10, WP8, iOS Eigenarten
+
+Die `config.xml` der Datei `AutoHideSplashScreen` muss `false` . Verstecken des Begrüßungsbildschirms für zwei Sekunden Verzögerung, fügen Sie einen Timer wie die folgende in der `deviceready` -Ereignishandler:
+
+ setTimeout(function() {navigator.splashscreen.hide();
+ }, 2000);
+
+
+## SplashScreen.Show
+
+Zeigt den Begrüßungsbildschirm.
+
+ Navigator.SplashScreen.Show();
+
+
+Ihre Anwendung kann nicht aufgerufen werden `navigator.splashscreen.show()` bis die app gestartet hat und das `deviceready` -Ereignis ausgelöst hat. Aber da in der Regel der Splash-Screen soll sichtbar sein, bevor die Anwendung gestartet wurde, scheint die Niederlage der Zweck des Begrüßungsbildschirms. Somit einige Konfiguration in `config.xml` wird automatisch `show` den Splash-Screen unmittelbar nach Ihrer app starten und bevor es voll gestartet und hat das `deviceready` Ereignis. Weitere Informationen zu dieser Konfiguration finden Sie unter [Symbole und Splash-Screens][1] . Aus diesem Grund ist es unwahrscheinlich, dass Sie aufrufen müssen `navigator.splashscreen.show()` den Splash-Screen beim Starten der app sichtbar zu machen.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/es/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,75 @@
+
+
+# org.apache.cordova.splashscreen
+
+Este plugin muestra y esconde una pantalla de bienvenida durante el inicio de la aplicación.
+
+## Instalación
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## Plataformas soportadas
+
+* Amazon fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Windows Phone 7 y 8
+* Windows 8
+
+## Métodos
+
+* splashscreen.show
+* splashscreen.hide
+
+### Rarezas Android
+
+En el archivo config.xml, tienes que añadir las siguientes preferencias:
+
+`` ``
+
+Donde foo es el nombre del archivo splashscreen, preferiblemente un archivo de 9 parche. Asegúrese de agregar tus archivos splashcreen en tu directorio res/xml bajo las carpetas apropiadas. El segundo parámetro representa cuánto aparecerán el splashscreen en milisegundos. Valor predeterminado es ms 3000. Ver [los iconos y salpicadura pantallas][1] para obtener más información.
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.hide
+
+Despedir a la pantalla de bienvenida.
+
+ Navigator.SplashScreen.Hide();
+
+
+### BlackBerry 10, WP8, iOS Quirk
+
+El `config.xml` del archivo `AutoHideSplashScreen` la configuración debe ser `false` . Para retrasar oculta la pantalla splash durante dos segundos, agregue un temporizador como la siguiente en el `deviceready` controlador de eventos:
+
+ setTimeout(function() {navigator.splashscreen.hide();
+ }, 2000);
+
+
+## splashscreen.show
+
+Muestra la pantalla de bienvenida.
+
+ Navigator.SplashScreen.Show();
+
+
+La aplicación no se puede llamar `navigator.splashscreen.show()` hasta que haya iniciado la aplicación y el `deviceready` evento ha despedido. Pero puesto que normalmente la pantalla está destinada a ser visible antes de que comience su aplicación, que parecería que el propósito de la pantalla de bienvenida. Proporcionar cierta configuración en `config.xml` automáticamente `show` la pantalla de presentación inmediatamente después de su lanzamiento de la aplicación y antes de ser completamente ha iniciado y recibió el `deviceready` evento. Ver [los iconos y salpicadura pantallas][1] para obtener más información sobre haciendo esta configuración. Por esta razón, es poco probable que necesitas llamar a `navigator.splashscreen.show()` para hacer la pantalla visible para el inicio de la aplicación.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/fr/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,75 @@
+
+
+# org.apache.cordova.splashscreen
+
+Ce plugin affiche et masque un écran de démarrage lors du lancement de l'application.
+
+## Installation
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## Plates-formes prises en charge
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Windows Phone 7 et 8
+* Windows 8
+
+## Méthodes
+
+* splashscreen.Show
+* splashscreen.Hide
+
+### Quirks Android
+
+Dans votre fichier config.xml, vous devez ajouter les préférences suivantes :
+
+`` ``
+
+Où foo est le nom du fichier splashscreen, préférablement un fichier de 9 correctif. Assurez-vous d'ajouter vos fichiers splashcreen dans votre répertoire res/xml dans les dossiers appropriés. Le deuxième paramètre représente combien de temps le splashscreen apparaîtra en millisecondes. Il est par défaut à 3000 ms. Pour plus d'informations, consultez [icônes et écrans de démarrage][1] .
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.Hide
+
+Faire disparaître de l'écran de démarrage.
+
+ Navigator.SplashScreen.Hide() ;
+
+
+### BlackBerry 10, WP8, iOS Quirk
+
+La `config.xml` du fichier `AutoHideSplashScreen` doit être `false` . Pour retarder la cacher l'écran de démarrage pendant deux secondes, ajouter un minuteur comme suit dans la `deviceready` gestionnaire d'événements :
+
+ setTimeout(function() {navigator.splashscreen.hide() ;
+ }, 2000) ;
+
+
+## splashscreen.Show
+
+Affiche l'écran de démarrage.
+
+ Navigator.SplashScreen.Show() ;
+
+
+Votre application ne peut pas appeler `navigator.splashscreen.show()` jusqu'à ce que l'application a commencé et le `deviceready` événement a été déclenché. Mais puisqu'en général, l'écran de démarrage est destiné à être visible avant que votre application a commencé, qui semblerait à l'encontre des objectifs de l'écran de démarrage. Fournir une configuration en `config.xml` sera automatiquement `show` l'écran de démarrage immédiatement après votre lancement de l'app et avant qu'il a complètement démarré et a reçu le `deviceready` événement. Voir les [icônes et les écrans de démarrage][1] pour plus d'informations sur la conduite de cette configuration. Pour cette raison, il est peu probable que vous devez appeler `navigator.splashscreen.show()` pour rendre l'écran de démarrage visible pour le démarrage de l'application.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,88 @@
+
+
+# org.apache.cordova.splashscreen
+
+This plugin displays and hides a splash screen during application launch.
+
+## Installation
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## Supported Platforms
+
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- iOS
+- Windows Phone 7 and 8
+- Windows 8
+
+
+## Methods
+
+- splashscreen.show
+- splashscreen.hide
+
+### Android Quirks
+
+In your config.xml, you need to add the following preferences:
+
+
+
+
+Where foo is the name of the splashscreen file, preferably a 9 patch file. Make sure to add your splashcreen files to your res/xml directory under the appropriate folders. The second parameter represents how long the splashscreen will appear in milliseconds. It defaults to 3000 ms. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)
+for more information.
+
+## splashscreen.hide
+
+Dismiss the splash screen.
+
+ navigator.splashscreen.hide();
+
+
+### BlackBerry 10, WP8, iOS Quirk
+
+The `config.xml` file's `AutoHideSplashScreen` setting must be
+`false`. To delay hiding the splash screen for two seconds, add a
+timer such as the following in the `deviceready` event handler:
+
+ setTimeout(function() {
+ navigator.splashscreen.hide();
+ }, 2000);
+
+## splashscreen.show
+
+Displays the splash screen.
+
+ navigator.splashscreen.show();
+
+
+Your application cannot call `navigator.splashscreen.show()` until the app has
+started and the `deviceready` event has fired. But since typically the splash
+screen is meant to be visible before your app has started, that would seem to
+defeat the purpose of the splash screen. Providing some configuration in
+`config.xml` will automatically `show` the splash screen immediately after your
+app launch and before it has fully started and received the `deviceready`
+event. See [Icons and Splash Screens](http://cordova.apache.org/docs/en/edge/config_ref_images.md.html)
+for more information on doing this configuration. For this reason, it is
+unlikely you need to call `navigator.splashscreen.show()` to make the splash
+screen visible for app startup.
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/it/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,75 @@
+
+
+# org.apache.cordova.splashscreen
+
+Questo plugin Visualizza e nasconde una schermata iniziale durante l'avvio dell'applicazione.
+
+## Installazione
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## Piattaforme supportate
+
+* Amazon fuoco OS
+* Android
+* BlackBerry 10
+* iOS
+* Windows Phone 7 e 8
+* Windows 8
+
+## Metodi
+
+* splashscreen
+* splashscreen.Hide
+
+### Stranezze Android
+
+Nel vostro config. xml, è necessario aggiungere le seguenti preferenze:
+
+`` ``
+
+Dove foo è il nome del file splashscreen, preferibilmente un file 9 patch. Assicurati di aggiungere i tuoi file splashcreen res/xml nella directory sotto cartelle appropriate. Il secondo parametro rappresenta quanto tempo lo splashscreen apparirà in millisecondi. Il valore predefinito è 3000 ms. Per ulteriori informazioni, vedere [icone e schermate iniziali][1] .
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.Hide
+
+Respingere la schermata iniziale.
+
+ Navigator.SplashScreen.Hide();
+
+
+### BlackBerry 10, WP8, iOS Quirk
+
+Il `config.xml` di file `AutoHideSplashScreen` impostazione deve essere `false` . Per ritardare nascondendo la schermata iniziale per due secondi, aggiungere un timer ad esempio nel `deviceready` gestore di evento:
+
+ setTimeout(function() {navigator.splashscreen.hide();
+ }, 2000);
+
+
+## splashscreen
+
+Visualizza la schermata iniziale.
+
+ Navigator.SplashScreen.Show();
+
+
+L'applicazione non può chiamare `navigator.splashscreen.show()` fino a quando ha iniziato l'app e il `deviceready` ha generato l'evento. Ma poiché in genere la schermata iniziale è destinata ad essere visibile prima app ha iniziato, che sembrerebbe per sconfiggere lo scopo della schermata iniziale. Fornendo qualche configurazione in `config.xml` verrà automaticamente `show` la schermata iniziale subito dopo il lancio dell'app e prima che completamente ha iniziato e ha ricevuto il `deviceready` evento. Per ulteriori informazioni su facendo questa configurazione, vedere [icone e schermate iniziali][1] . Per questo motivo, è improbabile che dovete chiamare `navigator.splashscreen.show()` per rendere la schermata visibile per avvio di app.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/ja/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,74 @@
+
+
+# org.apache.cordova.splashscreen
+
+このプラグインが表示され、アプリケーションの起動中にスプラッシュ スクリーンを非表示にします。
+
+## インストール
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## サポートされているプラットフォーム
+
+* アマゾン火 OS
+* アンドロイド
+* ブラックベリー 10
+* iOS
+* Windows Phone 7 と 8
+* Windows 8
+
+## メソッド
+
+* splashscreen.show
+* splashscreen.hide
+
+### Android の癖
+
+あなたの config.xml を以下の設定を追加する必要があります。
+
+`` ``
+
+Foo ができれば 9 パッチファイル splashscreen ファイルの名前です。 解像度/xml ディレクトリの適切なフォルダーの下に splashcreen ファイルを追加することを確認します。 2 番目のパラメーターは、スプラッシュ ・ スクリーンがの表示時間 (ミリ秒単位) を表します。 デフォルトでは 3000 ミリ秒です。 詳細については、[アイコンとスプラッシュ画面][1]を参照してください。
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.hide
+
+スプラッシュ スクリーンを閉じます。
+
+ navigator.splashscreen.hide();
+
+
+### ブラックベリー 10、WP8、iOS の気まぐれ
+
+`config.xml`ファイルの `AutoHideSplashScreen` 設定する必要があります `false` 。 遅延を 2 秒間スプラッシュ スクリーンを非表示、タイマーを追加しますで次のように `deviceready` イベント ハンドラー。
+
+ setTimeout(function() {navigator.splashscreen.hide();}, 2000年);
+
+
+## splashscreen.show
+
+スプラッシュ画面が表示されます。
+
+ navigator.splashscreen.show();
+
+
+アプリケーションを呼び出すことはできません `navigator.splashscreen.show()` 、アプリが開始されるまで、 `deviceready` イベントが発生します。 しかし、以来、通常スプラッシュ画面アプリ開始前に表示するものですと思われる、スプラッシュ スクリーンの目的の敗北します。 いくつかの構成を提供する `config.xml` は自動的に `show` スプラッシュ画面、アプリを起動後すぐに、それが完全に起動し、受信する前に、 `deviceready` イベント。 詳細についてはこの構成を行うには、[アイコンとスプラッシュ画面][1]を参照してください。 このような理由から、それは可能性を呼び出す必要があります `navigator.splashscreen.show()` アプリ起動時のスプラッシュ画面を見やすくします。
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/ko/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,75 @@
+
+
+# org.apache.cordova.splashscreen
+
+이 플러그인은 표시 하 고 응용 프로그램 실행 하는 동안 시작 화면을 숨깁니다.
+
+## 설치
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## 지원 되는 플랫폼
+
+* 아마존 화재 운영 체제
+* 안 드 로이드
+* 블랙베리 10
+* iOS
+* Windows Phone 7과 8
+* 윈도우 8
+
+## 메서드
+
+* splashscreen.show
+* splashscreen.hide
+
+### 안 드 로이드 단점
+
+당신의 config.xml에 다음 환경 설정에 추가 해야 합니다.
+
+`` ``
+
+여기서 foo splashscreen 파일, 선호 9 패치 파일의 이름입니다. 적절 한 폴더 아래 res/xml 디렉토리에 splashcreen 파일을 추가 해야 합니다. 두 번째 매개 변수는 splashscreen 얼마나 밀리초 단위로 표시 됩니다 나타냅니다. 3000 ms 기본값으로 사용 됩니다. 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오.
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.hide
+
+시작 화면을 닫습니다.
+
+ navigator.splashscreen.hide();
+
+
+### 블랙베리 10, WP8, iOS 특질
+
+`config.xml`파일의 `AutoHideSplashScreen` 설정을 해야 합니다 `false` . 2 초 동안 시작 화면을 숨기고 지연에 다음과 같이 타이머 추가 `deviceready` 이벤트 처리기:
+
+ setTimeout(function() {navigator.splashscreen.hide();
+ }, 2000);
+
+
+## splashscreen.show
+
+시작 화면을 표시합니다.
+
+ navigator.splashscreen.show();
+
+
+응용 프로그램 호출할 수 없습니다 `navigator.splashscreen.show()` 응용 프로그램은 시작 될 때까지 및 `deviceready` 이벤트를 해 고 했다. 하지만 그 스플래시 스크린의 목적 것 같다 일반적으로 시작 화면이 당신의 애플 리 케이 션 시작 하기 전에 표시 될 운명이 다, 이후. 몇 가지 구성을 제공 `config.xml` 자동으로 `show` 시작 화면 응용 프로그램 실행 후 즉시 및 그것은 완벽 하 게 시작 하 고 받은 전에 `deviceready` 이벤트. 이 구성 하 고 자세한 내용은 [아이콘 및 시작 화면을][1] 참조 하십시오. 이러한 이유로, 그것은 가능성이 호출 해야 `navigator.splashscreen.show()` 시작 화면은 응용 프로그램 시작에 대 한 표시 되도록 합니다.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/pl/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,75 @@
+
+
+# org.apache.cordova.splashscreen
+
+Ten plugin wyświetla i ukrywa ekran powitalny podczas uruchamiania aplikacji.
+
+## Instalacja
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## Obsługiwane platformy
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Windows Phone 7 i 8
+* Windows 8
+
+## Metody
+
+* splashscreen.show
+* splashscreen.Hide
+
+### Dziwactwa Androida
+
+W pliku config.xml musisz dodać następujące preferencje:
+
+`` ``
+
+Gdzie foo jest nazwą pliku ekranu powitalnego, najlepiej 9 łatce. Upewnij się dodać pliki splashcreen do katalogu res/xml w odpowiednich folderach. Drugi parametr reprezentuje, jak długo ekranu powitalnego pojawi się w milisekundach. Domyślnie 3000 ms. Aby uzyskać więcej informacji, zobacz [ikony i ekrany powitalne w aplikacjach][1] .
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.Hide
+
+Odrzucić ten opryskaæ têcza.
+
+ Navigator.splashscreen.Hide();
+
+
+### Jeżyna 10, WP8, iOS dziwactwo
+
+`config.xml`Pliku `AutoHideSplashScreen` ustawienie musi być `false` . Opóźnienia, ukrywanie ekranu powitalnego przez dwie sekundy, dodać timer następujących w `deviceready` obsługa zdarzeń:
+
+ setTimeout(function() {navigator.splashscreen.hide();
+ }, 2000);
+
+
+## splashscreen.show
+
+Wyświetla ekran powitalny.
+
+ Navigator.splashscreen.show();
+
+
+Aplikacja nie może wywołać `navigator.splashscreen.show()` aż aplikacja została uruchomiona i `deviceready` imprezy został zwolniony. Ale ponieważ zazwyczaj opryskać tęcza ma być widoczne przed rozpoczęciem aplikacji, wydaje się sprzeczne z celem ekranu powitalnego. Dostarczanie niektórych konfiguracji w `config.xml` będzie automatycznie `show` ekran powitalny, natychmiast po uruchomienie aplikacji i przed pełni rozpoczął i otrzymał `deviceready` zdarzenie. Aby uzyskać więcej informacji na robienie tej konfiguracji, zobacz [ikony i ekrany powitalne w aplikacjach][1] . Z tego powodu, jest mało prawdopodobne, należy zadzwonić `navigator.splashscreen.show()` Aby wyświetlić ekran powitalny dla uruchamiania aplikacji.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/ru/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,75 @@
+
+
+# org.apache.cordova.splashscreen
+
+Этот плагин отображает и скрывает экран-заставку при запуске приложения.
+
+## Установка
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## Поддерживаемые платформы
+
+* Amazon Fire OS
+* Android
+* BlackBerry 10
+* iOS
+* Windows Phone 7 и 8
+* Windows 8
+
+## Методы
+
+* splashscreen.show
+* splashscreen.hide
+
+### Особенности Android
+
+В вашем файле config.xml необходимо добавить следующие настройки:
+
+`` ``
+
+Где foo это имя файла splashscreen, желательно 9 заплатку. Убедитесь в том добавить ваши splashcreen файлы в папку res/xml в соответствующие папки. Второй параметр представляет, как долго splashscreen появится в миллисекундах. По умолчанию он 3000 МС. Увидеть [иконки и заставки][1] для получения дополнительной информации.
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.hide
+
+Закройте экран-заставка.
+
+ Navigator.SplashScreen.Hide();
+
+
+### Особенности BlackBerry 10, WP8, iOS
+
+`config.xml`Файла `AutoHideSplashScreen` должен быть `false` . Для задержки скрытия заставки на две секунды, добавить таймер, например в `deviceready` обработчик событий:
+
+ setTimeout(function() {navigator.splashscreen.hide();
+ }, 2000);
+
+
+## splashscreen.show
+
+Отображает экран-заставку.
+
+ Navigator.SplashScreen.Show();
+
+
+Ваше приложение не может вызвать `navigator.splashscreen.show()` до тех пор, пока приложение началась и `deviceready` событие инициировано. Но поскольку обычно экран-заставка должен быть видимым до начала вашего приложения, что казалось бы поражение цели экрана-заставки. Предоставление некоторых конфигурации в `config.xml` будет автоматически `show` экран-заставку сразу же после запуска вашего приложения и перед его полностью запущен и получил `deviceready` событие. Увидеть [иконки и заставки][1] для получения дополнительной информации на делать этой конфигурации. По этой причине маловероятно, вам нужно вызвать `navigator.splashscreen.show()` для отображения экрана-заставки для запуска приложения.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/doc/zh/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,74 @@
+
+
+# org.apache.cordova.splashscreen
+
+這個外掛程式顯示和隱藏在應用程式啟動期間的初始螢幕。
+
+## 安裝
+
+ cordova plugin add org.apache.cordova.splashscreen
+
+
+## 支援的平臺
+
+* 亞馬遜火 OS
+* Android 系統
+* 黑莓 10
+* iOS
+* Windows Phone 7 和 8
+* Windows 8
+
+## 方法
+
+* splashscreen.show
+* splashscreen.hide
+
+### Android 的怪癖
+
+在你的 config.xml,您需要添加以下優惠:
+
+`` ``
+
+美孚在哪裡閃屏檔,最好是 9 修補程式檔的名稱。 請確保您的 splashcreen 檔添加到 res/xml 目錄下相應的資料夾。 第二個參數表示多久閃屏會顯示以毫秒為單位。 它將預設為 3000 毫秒。 有關更多資訊,請參見[圖示和啟動畫面][1]。
+
+ [1]: http://cordova.apache.org/docs/en/edge/config_ref_images.md.html
+
+## splashscreen.hide
+
+解雇的閃屏。
+
+ navigator.splashscreen.hide() ;
+
+
+### 黑莓 10,WP8,iOS 怪癖
+
+`config.xml`檔的 `AutoHideSplashScreen` 設置必須為 `false` 。 若要延遲兩秒鐘隱藏的閃屏,添加如下所示在計時器 `deviceready` 事件處理常式:
+
+ setTimeout(function() {navigator.splashscreen.hide() ;},2000年) ;
+
+
+## splashscreen.show
+
+顯示初始螢幕。
+
+ navigator.splashscreen.show() ;
+
+
+您的應用程式無法調用 `navigator.splashscreen.show()` 直到應用程式已經開始, `deviceready` 觸發了事件。 但是,由於通常的閃屏為了是可見的在您的應用程式啟動之前,這似乎會打敗閃屏的目的。 提供一些配置在 `config.xml` 將自動 `show` 閃屏您的應用程式啟動後立即和之前它已經完全起步並收到 `deviceready` 事件。 做這種配置的詳細資訊,請參閱[圖示和啟動畫面][1]。 出於這個原因,它不太可能您需要調用 `navigator.splashscreen.show()` ,使初始螢幕可見為應用程式啟動。
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/plugin.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/plugin.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,126 @@
+
+
+
+
+ Splashscreen
+ Cordova Splashscreen Plugin
+ Apache 2.0
+ cordova,splashscreen
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git
+ https://issues.apache.org/jira/browse/CB/component/12320653
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/android/SplashScreen.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/android/SplashScreen.java Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,43 @@
+/*
+ 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.
+*/
+
+package org.apache.cordova.splashscreen;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.json.JSONArray;
+
+public class SplashScreen extends CordovaPlugin {
+
+ @Override
+ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) {
+ if (action.equals("hide")) {
+ this.webView.postMessage("splashscreen", "hide");
+ } else if (action.equals("show")){
+ this.webView.postMessage("splashscreen", "show");
+ }
+ else {
+ return false;
+ }
+
+ callbackContext.success();
+ return true;
+ }
+
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/blackberry10/index.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,28 @@
+/*
+ * Copyright 2013 Research In Motion Limited.
+ *
+ * Licensed 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.
+ */
+
+module.exports = {
+ show: function (success, fail, args, env) {
+ var result = new PluginResult(args, env);
+ result.error("Not supported on platform", false);
+ },
+
+ hide: function (success, fail, args, env) {
+ var result = new PluginResult(args, env);
+ window.qnx.webplatform.getApplication().windowVisible = true;
+ result.ok(undefined, false);
+ }
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,43 @@
+/*
+ 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.
+ */
+
+#import
+#import
+
+typedef struct {
+ BOOL iPhone;
+ BOOL iPad;
+ BOOL iPhone5;
+ BOOL iPhone6;
+ BOOL iPhone6Plus;
+ BOOL retina;
+
+} CDV_iOSDevice;
+
+@interface CDVSplashScreen : CDVPlugin {
+ UIActivityIndicatorView* _activityView;
+ UIImageView* _imageView;
+ NSString* _curImageName;
+ BOOL _visible;
+}
+
+- (void)show:(CDVInvokedUrlCommand*)command;
+- (void)hide:(CDVInvokedUrlCommand*)command;
+
+@end
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ios/CDVSplashScreen.m Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,307 @@
+/*
+ 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.
+ */
+
+#import "CDVSplashScreen.h"
+#import
+#import
+
+#define kSplashScreenDurationDefault 0.25f
+
+
+@implementation CDVSplashScreen
+
+- (void)pluginInitialize
+{
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(pageDidLoad) name:CDVPageDidLoadNotification object:self.webView];
+
+ [self setVisible:YES];
+}
+
+- (void)show:(CDVInvokedUrlCommand*)command
+{
+ [self setVisible:YES];
+}
+
+- (void)hide:(CDVInvokedUrlCommand*)command
+{
+ [self setVisible:NO];
+}
+
+- (void)pageDidLoad
+{
+ id autoHideSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"AutoHideSplashScreen" lowercaseString]];
+
+ // if value is missing, default to yes
+ if ((autoHideSplashScreenValue == nil) || [autoHideSplashScreenValue boolValue]) {
+ [self setVisible:NO];
+ }
+}
+
+- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context
+{
+ [self updateImage];
+}
+
+- (void)createViews
+{
+ /*
+ * The Activity View is the top spinning throbber in the status/battery bar. We init it with the default Grey Style.
+ *
+ * whiteLarge = UIActivityIndicatorViewStyleWhiteLarge
+ * white = UIActivityIndicatorViewStyleWhite
+ * gray = UIActivityIndicatorViewStyleGray
+ *
+ */
+ NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]];
+ UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
+
+ if ([topActivityIndicator isEqualToString:@"whiteLarge"]) {
+ topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhiteLarge;
+ } else if ([topActivityIndicator isEqualToString:@"white"]) {
+ topActivityIndicatorStyle = UIActivityIndicatorViewStyleWhite;
+ } else if ([topActivityIndicator isEqualToString:@"gray"]) {
+ topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
+ }
+
+ UIView* parentView = self.viewController.view;
+ parentView.userInteractionEnabled = NO; // disable user interaction while splashscreen is shown
+ _activityView = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:topActivityIndicatorStyle];
+ _activityView.center = CGPointMake(parentView.bounds.size.width / 2, parentView.bounds.size.height / 2);
+ _activityView.autoresizingMask = UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleLeftMargin
+ | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleRightMargin;
+ [_activityView startAnimating];
+
+ // Set the frame & image later.
+ _imageView = [[UIImageView alloc] init];
+ [parentView addSubview:_imageView];
+
+ id showSplashScreenSpinnerValue = [self.commandDelegate.settings objectForKey:[@"ShowSplashScreenSpinner" lowercaseString]];
+ // backwards compatibility - if key is missing, default to true
+ if ((showSplashScreenSpinnerValue == nil) || [showSplashScreenSpinnerValue boolValue]) {
+ [parentView addSubview:_activityView];
+ }
+
+ // Frame is required when launching in portrait mode.
+ // Bounds for landscape since it captures the rotation.
+ [parentView addObserver:self forKeyPath:@"frame" options:0 context:nil];
+ [parentView addObserver:self forKeyPath:@"bounds" options:0 context:nil];
+
+ [self updateImage];
+}
+
+- (void)destroyViews
+{
+ [_imageView removeFromSuperview];
+ [_activityView removeFromSuperview];
+ _imageView = nil;
+ _activityView = nil;
+ _curImageName = nil;
+
+ self.viewController.view.userInteractionEnabled = YES; // re-enable user interaction upon completion
+ [self.viewController.view removeObserver:self forKeyPath:@"frame"];
+ [self.viewController.view removeObserver:self forKeyPath:@"bounds"];
+}
+
+- (CDV_iOSDevice) getCurrentDevice
+{
+ CDV_iOSDevice device;
+
+ UIScreen* mainScreen = [UIScreen mainScreen];
+ CGFloat mainScreenHeight = mainScreen.bounds.size.height;
+ CGFloat mainScreenWidth = mainScreen.bounds.size.width;
+
+ int limit = MAX(mainScreenHeight,mainScreenWidth);
+
+ device.iPad = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad);
+ device.iPhone = (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone);
+ device.retina = ([mainScreen scale] == 2.0);
+ device.iPhone5 = (device.iPhone && limit == 568.0);
+ // note these below is not a true device detect, for example if you are on an
+ // iPhone 6/6+ but the app is scaled it will prob set iPhone5 as true, but
+ // this is appropriate for detecting the runtime screen environment
+ device.iPhone6 = (device.iPhone && limit == 667.0);
+ device.iPhone6Plus = (device.iPhone && limit == 736.0);
+
+ return device;
+}
+
+- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device
+{
+ // Use UILaunchImageFile if specified in plist. Otherwise, use Default.
+ NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
+
+ NSUInteger supportedOrientations = [orientationDelegate supportedInterfaceOrientations];
+
+ // Checks to see if the developer has locked the orientation to use only one of Portrait or Landscape
+ BOOL supportsLandscape = (supportedOrientations & UIInterfaceOrientationMaskLandscape);
+ BOOL supportsPortrait = (supportedOrientations & UIInterfaceOrientationMaskPortrait || supportedOrientations & UIInterfaceOrientationMaskPortraitUpsideDown);
+ // this means there are no mixed orientations in there
+ BOOL isOrientationLocked = !(supportsPortrait && supportsLandscape);
+
+ if (imageName) {
+ imageName = [imageName stringByDeletingPathExtension];
+ } else {
+ imageName = @"Default";
+ }
+
+ if (device.iPhone5) { // does not support landscape
+ imageName = [imageName stringByAppendingString:@"-568h"];
+ } else if (device.iPhone6) { // does not support landscape
+ imageName = [imageName stringByAppendingString:@"-667h"];
+ } else if (device.iPhone6Plus) { // supports landscape
+ if (isOrientationLocked) {
+ imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"")];
+ } else {
+ switch (currentOrientation) {
+ case UIInterfaceOrientationLandscapeLeft:
+ case UIInterfaceOrientationLandscapeRight:
+ imageName = [imageName stringByAppendingString:@"-Landscape"];
+ break;
+ default:
+ break;
+ }
+ }
+ imageName = [imageName stringByAppendingString:@"-736h"];
+
+ } else if (device.iPad) { // supports landscape
+ if (isOrientationLocked) {
+ imageName = [imageName stringByAppendingString:(supportsLandscape ? @"-Landscape" : @"-Portrait")];
+ } else {
+ switch (currentOrientation) {
+ case UIInterfaceOrientationLandscapeLeft:
+ case UIInterfaceOrientationLandscapeRight:
+ imageName = [imageName stringByAppendingString:@"-Landscape"];
+ break;
+
+ case UIInterfaceOrientationPortrait:
+ case UIInterfaceOrientationPortraitUpsideDown:
+ default:
+ imageName = [imageName stringByAppendingString:@"-Portrait"];
+ break;
+ }
+ }
+ }
+
+ return imageName;
+}
+
+// Sets the view's frame and image.
+- (void)updateImage
+{
+ NSString* imageName = [self getImageName:self.viewController.interfaceOrientation delegate:(id)self.viewController device:[self getCurrentDevice]];
+
+ if (![imageName isEqualToString:_curImageName]) {
+ UIImage* img = [UIImage imageNamed:imageName];
+ _imageView.image = img;
+ _curImageName = imageName;
+ }
+
+ // Check that splash screen's image exists before updating bounds
+ if (_imageView.image) {
+ [self updateBounds];
+ } else {
+ NSLog(@"WARNING: The splashscreen image named %@ was not found", imageName);
+ }
+}
+
+- (void)updateBounds
+{
+ UIImage* img = _imageView.image;
+ CGRect imgBounds = (img) ? CGRectMake(0, 0, img.size.width, img.size.height) : CGRectZero;
+
+ CGSize screenSize = [self.viewController.view convertRect:[UIScreen mainScreen].bounds fromView:nil].size;
+ UIInterfaceOrientation orientation = self.viewController.interfaceOrientation;
+ CGAffineTransform imgTransform = CGAffineTransformIdentity;
+
+ /* If and only if an iPhone application is landscape-only as per
+ * UISupportedInterfaceOrientations, the view controller's orientation is
+ * landscape. In this case the image must be rotated in order to appear
+ * correctly.
+ */
+ if (UIInterfaceOrientationIsLandscape(orientation) && !CDV_IsIPad()) {
+ imgTransform = CGAffineTransformMakeRotation(M_PI / 2);
+ imgBounds.size = CGSizeMake(imgBounds.size.height, imgBounds.size.width);
+ }
+
+ // There's a special case when the image is the size of the screen.
+ if (CGSizeEqualToSize(screenSize, imgBounds.size)) {
+ CGRect statusFrame = [self.viewController.view convertRect:[UIApplication sharedApplication].statusBarFrame fromView:nil];
+ if (!(IsAtLeastiOSVersion(@"7.0"))) {
+ imgBounds.origin.y -= statusFrame.size.height;
+ }
+ } else if (imgBounds.size.width > 0) {
+ CGRect viewBounds = self.viewController.view.bounds;
+ CGFloat imgAspect = imgBounds.size.width / imgBounds.size.height;
+ CGFloat viewAspect = viewBounds.size.width / viewBounds.size.height;
+ // This matches the behaviour of the native splash screen.
+ CGFloat ratio;
+ if (viewAspect > imgAspect) {
+ ratio = viewBounds.size.width / imgBounds.size.width;
+ } else {
+ ratio = viewBounds.size.height / imgBounds.size.height;
+ }
+ imgBounds.size.height *= ratio;
+ imgBounds.size.width *= ratio;
+ }
+
+ _imageView.transform = imgTransform;
+ _imageView.frame = imgBounds;
+}
+
+- (void)setVisible:(BOOL)visible
+{
+ if (visible == _visible) {
+ return;
+ }
+ _visible = visible;
+
+ id fadeSplashScreenValue = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreen" lowercaseString]];
+ id fadeSplashScreenDuration = [self.commandDelegate.settings objectForKey:[@"FadeSplashScreenDuration" lowercaseString]];
+
+ float fadeDuration = fadeSplashScreenDuration == nil ? kSplashScreenDurationDefault : [fadeSplashScreenDuration floatValue];
+
+ if ((fadeSplashScreenValue == nil) || ![fadeSplashScreenValue boolValue]) {
+ fadeDuration = 0;
+ }
+
+ // Never animate the showing of the splash screen.
+ if (visible) {
+ if (_imageView == nil) {
+ [self createViews];
+ }
+ } else if (fadeDuration == 0) {
+ [self destroyViews];
+ } else {
+ [UIView transitionWithView:self.viewController.view
+ duration:fadeDuration
+ options:UIViewAnimationOptionTransitionNone
+ animations:^(void) {
+ [_imageView setAlpha:0];
+ [_activityView setAlpha:0];
+ }
+ completion:^(BOOL finished) {
+ if (finished) {
+ [self destroyViews];
+ }
+ }
+ ];
+ }
+}
+
+@end
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/tizen/SplashScreenProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/tizen/SplashScreenProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,43 @@
+/*
+ *
+ * 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() {
+
+win = null;
+
+module.exports = {
+ show: function() {
+ if ( win === null ) {
+ win = window.open('splashscreen.html');
+ }
+ },
+
+ hide: function() {
+ if ( win !== null ) {
+ win.close();
+ win = null;
+ }
+ }
+};
+
+require("cordova/tizen/commandProxy").add("SplashScreen", module.exports);
+
+})();
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.cpp Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,42 @@
+/*
+ *
+ * Copyright 2013 Canonical Ltd.
+ *
+ * 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.
+ *
+*/
+
+#include
+
+#include "splashscreen.h"
+#include
+
+#define SPLASHSCREEN_STATE_NAME "splashscreen"
+
+Splashscreen::Splashscreen(Cordova *cordova): CPlugin(cordova) {
+}
+
+void Splashscreen::show(int, int) {
+ m_cordova->rootObject()->setProperty("splashscreenPath", m_cordova->getSplashscreenPath());
+
+ m_cordova->pushViewState(SPLASHSCREEN_STATE_NAME);
+}
+
+void Splashscreen::hide(int, int) {
+ m_cordova->popViewState(SPLASHSCREEN_STATE_NAME);
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/ubuntu/splashscreen.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,52 @@
+/*
+ *
+ * Copyright 2013 Canonical Ltd.
+ *
+ * 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.
+ *
+*/
+
+#ifndef SPLASHSCREEN_H
+#define SPLASHSCREEN_H
+
+#include
+#include
+
+class Splashscreen: public CPlugin {
+ Q_OBJECT
+public:
+ explicit Splashscreen(Cordova *cordova);
+
+ virtual const QString fullName() override {
+ return Splashscreen::fullID();
+ }
+
+ virtual const QString shortName() override {
+ return "SplashScreen";
+ }
+
+ static const QString fullID() {
+ return "SplashScreen";
+ }
+
+public slots:
+ void show(int, int);
+ void hide(int, int);
+};
+
+#endif // SPLASHSCREEN_H
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/src/wp/SplashScreen.cs
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/src/wp/SplashScreen.cs Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,167 @@
+/*
+ Licensed 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.
+*/
+
+using System;
+using System.Net;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Documents;
+using System.Windows.Ink;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Animation;
+using System.Windows.Shapes;
+using Microsoft.Phone.Info;
+using System.Windows.Controls.Primitives;
+using System.Diagnostics;
+using System.Windows.Media.Imaging;
+using System.Windows.Resources;
+using System.IO;
+using System.Xml.Linq;
+using System.Linq;
+using System.Windows.Threading;
+
+namespace WPCordovaClassLib.Cordova.Commands
+{
+ ///
+ /// Listens for changes to the state of the battery on the device.
+ /// Currently only the "isPlugged" parameter available via native APIs.
+ ///
+ public class SplashScreen : BaseCommand
+ {
+ private Popup popup;
+ private bool autohide = true;
+
+ private static bool WasShown = false;
+
+ public SplashScreen()
+ {
+ Image SplashScreen = new Image();
+ BitmapImage splash_image = new BitmapImage();
+ splash_image.SetSource(Application.GetResourceStream(new Uri(@"SplashScreenImage.jpg", UriKind.Relative)).Stream);
+ SplashScreen.Source = splash_image;
+
+ // Instansiate the popup and set the Child property of Popup to SplashScreen
+ popup = new Popup() {IsOpen = false, Child = SplashScreen };
+ // Orient the popup accordingly
+ popup.HorizontalAlignment = HorizontalAlignment.Stretch;
+ popup.VerticalAlignment = VerticalAlignment.Center;
+
+
+ LoadConfigValues();
+ }
+
+ public override void OnInit()
+ {
+ // we only want to autoload the first time a page is loaded.
+ if (!WasShown)
+ {
+ WasShown = true;
+ show();
+ }
+ }
+
+ void LoadConfigValues()
+ {
+ StreamResourceInfo streamInfo = Application.GetResourceStream(new Uri("config.xml", UriKind.Relative));
+
+ if (streamInfo != null)
+ {
+ StreamReader sr = new StreamReader(streamInfo.Stream);
+ //This will Read Keys Collection for the xml file
+ XDocument document = XDocument.Parse(sr.ReadToEnd());
+
+ var preferences = from results in document.Descendants()
+ where (string)results.Attribute("name") == "AutoHideSplashScreen"
+ select (string)results.Attribute("value") == "true";
+
+ if (preferences.Count() > 0 && preferences.First() == false)
+ {
+ autohide = false;
+ }
+ }
+ }
+
+ public void show(string options = null)
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ if (popup.IsOpen)
+ {
+ return;
+ }
+
+ popup.Child.Opacity = 0;
+
+ Storyboard story = new Storyboard();
+ DoubleAnimation animation;
+ animation = new DoubleAnimation();
+ animation.From = 0.0;
+ animation.To = 1.0;
+ animation.Duration = new Duration(TimeSpan.FromSeconds(0.2));
+
+ Storyboard.SetTarget(animation, popup.Child);
+ Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity"));
+ story.Children.Add(animation);
+
+ Debug.WriteLine("Fading the splash screen in");
+
+ story.Begin();
+
+ popup.IsOpen = true;
+
+ if (autohide)
+ {
+ DispatcherTimer timer = new DispatcherTimer();
+ timer.Tick += (object sender, EventArgs e) =>
+ {
+ hide();
+ };
+ timer.Interval = TimeSpan.FromSeconds(1.2);
+ timer.Start();
+ }
+ });
+ }
+
+
+ public void hide(string options = null)
+ {
+ Deployment.Current.Dispatcher.BeginInvoke(() =>
+ {
+ if (!popup.IsOpen)
+ {
+ return;
+ }
+
+ popup.Child.Opacity = 1.0;
+
+ Storyboard story = new Storyboard();
+ DoubleAnimation animation;
+ animation = new DoubleAnimation();
+ animation.From = 1.0;
+ animation.To = 0.0;
+ animation.Duration = new Duration(TimeSpan.FromSeconds(0.4));
+
+ Storyboard.SetTarget(animation, popup.Child);
+ Storyboard.SetTargetProperty(animation, new PropertyPath("Opacity"));
+ story.Children.Add(animation);
+ story.Completed += (object sender, EventArgs e) =>
+ {
+ popup.IsOpen = false;
+ };
+ story.Begin();
+ });
+ }
+ }
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/contents.xcworkspacedata Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,7 @@
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,41 @@
+
+
+
+
+ IDESourceControlProjectFavoriteDictionaryKey
+
+ IDESourceControlProjectIdentifier
+ 6BE9AD73-1B9F-4362-98D7-DC631BEC6185
+ IDESourceControlProjectName
+ CDVSplashScreenTest
+ IDESourceControlProjectOriginsDictionary
+
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git
+
+ IDESourceControlProjectPath
+ tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj
+ IDESourceControlProjectRelativeInstallPathDictionary
+
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ ../../../../..
+
+ IDESourceControlProjectURL
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git
+ IDESourceControlProjectVersion
+ 111
+ IDESourceControlProjectWCCIdentifier
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ IDESourceControlProjectWCConfigurations
+
+
+ IDESourceControlRepositoryExtensionIdentifierKey
+ public.vcs.git
+ IDESourceControlWCCIdentifierKey
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ IDESourceControlWCCName
+ cordova-plugin-splashscreen
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest.xcworkspace/xcshareddata/xcschemes/CordovaLib.xcscheme Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTest.m Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,702 @@
+/*
+ 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.
+ */
+
+#import
+#import
+#import
+#import "CDVSplashScreen.h"
+#import "ImageNameTestDelegates.h"
+
+const CDV_iOSDevice CDV_iOSDeviceZero = { 0, 0, 0, 0, 0, 0 };
+
+@interface ImageNameTest : XCTestCase
+
+@property (nonatomic, strong) CDVSplashScreen* plugin;
+
+@end
+
+@interface CDVSplashScreen ()
+
+// expose private interface
+- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id)orientationDelegate device:(CDV_iOSDevice)device;
+
+@end
+
+@implementation ImageNameTest
+
+- (void)setUp {
+ [super setUp];
+ // Put setup code here. This method is called before the invocation of each test method in the class.
+
+ self.plugin = [[CDVSplashScreen alloc] init];
+}
+
+- (void)tearDown {
+ // Put teardown code here. This method is called after the invocation of each test method in the class.
+ [super tearDown];
+}
+
+- (void) orientationHelper:(id)delegate expectedImageNameDictionary:(NSDictionary*)expectedImageNameDictionary device:(CDV_iOSDevice)device{
+
+ NSString* name = nil;
+ NSString* expectedImageName = nil;
+ UIInterfaceOrientation currentOrientation;
+ NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone";
+
+ // LandscapeLeft, should always return expectedImageName
+ currentOrientation = UIInterfaceOrientationLandscapeLeft;
+ name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
+ expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeLeft"];
+ XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name);
+
+ // LandscapeRight - should always return expectedImageName
+ currentOrientation = UIInterfaceOrientationLandscapeRight;
+ name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
+ expectedImageName = [expectedImageNameDictionary objectForKey:@"landscapeRight"];
+ XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Landscape", deviceName, name);
+
+ // Portrait - should always return expectedImageName
+ currentOrientation = UIInterfaceOrientationPortrait;
+ name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
+ expectedImageName = [expectedImageNameDictionary objectForKey:@"portrait"];
+ XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name);
+
+ // PortraitUpsideDown - should always return expectedImageName
+ currentOrientation = UIInterfaceOrientationPortraitUpsideDown;
+ name = [self.plugin getImageName:currentOrientation delegate:delegate device:device];
+ expectedImageName = [expectedImageNameDictionary objectForKey:@"portraitUpsideDown"];
+ XCTAssertTrue([expectedImageName isEqualToString:name], @"%@ - %@ failed (%@)", @"Portrait", deviceName, name);
+}
+
+- (void)testiPadOrientation {
+
+ CDV_iOSDevice device = CDV_iOSDeviceZero;
+ device.iPad = YES;
+
+ // One orientation
+
+ PortraitOnly* delegate = [[PortraitOnly alloc] init];
+ [self orientationHelper:delegate expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Portrait",
+ @"landscapeRight" : @"Default-Portrait",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+
+ PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
+ [self orientationHelper:delegate2 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Portrait",
+ @"landscapeRight" : @"Default-Portrait",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+
+ LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate3 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Landscape",
+ @"portraitUpsideDown" : @"Default-Landscape"
+ }
+ device:device];
+
+ LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate4 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Landscape",
+ @"portraitUpsideDown" : @"Default-Landscape"
+ }
+ device:device];
+
+ // All Portrait
+
+ AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
+ [self orientationHelper:delegate5 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Portrait",
+ @"landscapeRight" : @"Default-Portrait",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+
+ // All Landscape
+
+ AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
+ [self orientationHelper:delegate6 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Landscape",
+ @"portraitUpsideDown" : @"Default-Landscape"
+ }
+ device:device];
+
+
+ // All orientations
+
+ AllOrientations* delegate7 = [[AllOrientations alloc] init];
+ [self orientationHelper:delegate7 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+
+ // Portrait and Landscape Left
+
+ PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate8 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+
+ // Portrait and Landscape Right
+
+ PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate9 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Left
+
+ PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate10 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Right
+
+ PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate11 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape",
+ @"landscapeRight" : @"Default-Landscape",
+ @"portrait" : @"Default-Portrait",
+ @"portraitUpsideDown" : @"Default-Portrait"
+ }
+ device:device];
+}
+
+- (void)testiPhoneOrientation {
+
+ CDV_iOSDevice device = CDV_iOSDeviceZero;
+ device.iPhone = YES;
+
+ // One orientation
+
+ PortraitOnly* delegate = [[PortraitOnly alloc] init];
+ [self orientationHelper:delegate expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
+ [self orientationHelper:delegate2 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate3 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate4 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ // All Portrait
+
+ AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
+ [self orientationHelper:delegate5 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ // All Landscape
+
+ AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
+ [self orientationHelper:delegate6 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+
+ // All orientations
+
+ AllOrientations* delegate7 = [[AllOrientations alloc] init];
+ [self orientationHelper:delegate7 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ // Portrait and Landscape Left
+
+ PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate8 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ // Portrait and Landscape Right
+
+ PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate9 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Left
+
+ PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate10 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Right
+
+ PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate11 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default",
+ @"landscapeRight" : @"Default",
+ @"portrait" : @"Default",
+ @"portraitUpsideDown" : @"Default"
+ }
+ device:device];
+}
+
+- (void)testiPhone5Orientation {
+
+ CDV_iOSDevice device = CDV_iOSDeviceZero;
+ device.iPhone = YES;
+ device.iPhone5 = YES;
+
+ // One orientation
+
+ PortraitOnly* delegate = [[PortraitOnly alloc] init];
+ [self orientationHelper:delegate expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
+ [self orientationHelper:delegate2 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate3 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate4 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ // All Portrait
+
+ AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
+ [self orientationHelper:delegate5 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ // All Landscape
+
+ AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
+ [self orientationHelper:delegate6 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+
+ // All orientations
+
+ AllOrientations* delegate7 = [[AllOrientations alloc] init];
+ [self orientationHelper:delegate7 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ // Portrait and Landscape Left
+
+ PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate8 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ // Portrait and Landscape Right
+
+ PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate9 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Left
+
+ PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate10 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Right
+
+ PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate11 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-568h",
+ @"landscapeRight" : @"Default-568h",
+ @"portrait" : @"Default-568h",
+ @"portraitUpsideDown" : @"Default-568h"
+ }
+ device:device];
+}
+
+- (void)testiPhone6Orientation {
+
+ CDV_iOSDevice device = CDV_iOSDeviceZero;
+ device.iPhone = YES;
+ device.iPhone6 = YES;
+
+ // One orientation
+
+ PortraitOnly* delegate = [[PortraitOnly alloc] init];
+ [self orientationHelper:delegate expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
+ [self orientationHelper:delegate2 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate3 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate4 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ // All Portrait
+
+ AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
+ [self orientationHelper:delegate5 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ // All Landscape
+
+ AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
+ [self orientationHelper:delegate6 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+
+ // All orientations
+
+ AllOrientations* delegate7 = [[AllOrientations alloc] init];
+ [self orientationHelper:delegate7 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ // Portrait and Landscape Left
+
+ PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate8 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ // Portrait and Landscape Right
+
+ PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate9 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Left
+
+ PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate10 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Right
+
+ PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate11 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-667h",
+ @"landscapeRight" : @"Default-667h",
+ @"portrait" : @"Default-667h",
+ @"portraitUpsideDown" : @"Default-667h"
+ }
+ device:device];
+}
+
+- (void)testiPhone6PlusOrientation {
+
+ CDV_iOSDevice device = CDV_iOSDeviceZero;
+ device.iPhone = YES;
+ device.iPhone6Plus = YES;
+
+ // One orientation
+
+ PortraitOnly* delegate = [[PortraitOnly alloc] init];
+ [self orientationHelper:delegate expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-736h",
+ @"landscapeRight" : @"Default-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+
+ PortraitUpsideDownOnly* delegate2 = [[PortraitUpsideDownOnly alloc] init];
+ [self orientationHelper:delegate2 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-736h",
+ @"landscapeRight" : @"Default-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+
+ LandscapeLeftOnly* delegate3 = [[LandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate3 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-Landscape-736h",
+ @"portraitUpsideDown" : @"Default-Landscape-736h"
+ }
+ device:device];
+
+ LandscapeRightOnly* delegate4 = [[LandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate4 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-Landscape-736h",
+ @"portraitUpsideDown" : @"Default-Landscape-736h"
+ }
+ device:device];
+
+ // All Portrait
+
+ AllPortraitOnly* delegate5 = [[AllPortraitOnly alloc] init];
+ [self orientationHelper:delegate5 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-736h",
+ @"landscapeRight" : @"Default-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+
+ // All Landscape
+
+ AllLandscapeOnly* delegate6 = [[AllLandscapeOnly alloc] init];
+ [self orientationHelper:delegate6 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-Landscape-736h",
+ @"portraitUpsideDown" : @"Default-Landscape-736h"
+ }
+ device:device];
+
+
+ // All orientations
+
+ AllOrientations* delegate7 = [[AllOrientations alloc] init];
+ [self orientationHelper:delegate7 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+
+ // Portrait and Landscape Left
+
+ PortraitAndLandscapeLeftOnly* delegate8 = [[PortraitAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate8 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+
+ // Portrait and Landscape Right
+
+ PortraitAndLandscapeRightOnly* delegate9 = [[PortraitAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate9 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Left
+
+ PortraitUpsideDownAndLandscapeLeftOnly* delegate10 = [[PortraitUpsideDownAndLandscapeLeftOnly alloc] init];
+ [self orientationHelper:delegate10 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+
+ // PortraitUpsideDown and Landscape Right
+
+ PortraitUpsideDownAndLandscapeRightOnly* delegate11 = [[PortraitUpsideDownAndLandscapeRightOnly alloc] init];
+ [self orientationHelper:delegate11 expectedImageNameDictionary:@{
+ @"landscapeLeft" : @"Default-Landscape-736h",
+ @"landscapeRight" : @"Default-Landscape-736h",
+ @"portrait" : @"Default-736h",
+ @"portraitUpsideDown" : @"Default-736h"
+ }
+ device:device];
+}
+
+
+
+@end
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,57 @@
+/*
+ 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.
+ */
+
+#import
+#import
+
+@interface PortraitOnly : NSObject
+@end
+
+@interface PortraitUpsideDownOnly : NSObject
+@end
+
+@interface AllPortraitOnly : NSObject
+@end
+
+
+@interface LandscapeLeftOnly : NSObject
+@end
+
+@interface LandscapeRightOnly : NSObject
+@end
+
+@interface AllLandscapeOnly : NSObject
+@end
+
+
+@interface AllOrientations : NSObject
+@end
+
+@interface PortraitAndLandscapeLeftOnly : NSObject
+@end
+
+@interface PortraitAndLandscapeRightOnly : NSObject
+@end
+
+@interface PortraitUpsideDownAndLandscapeLeftOnly : NSObject
+@end
+
+@interface PortraitUpsideDownAndLandscapeRightOnly : NSObject
+@end
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/ImageNameTestDelegates.m Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,200 @@
+/*
+ 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.
+ */
+
+#import
+#import "ImageNameTestDelegates.h"
+
+@implementation PortraitOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitUpsideDownOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortraitUpsideDown;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation AllPortraitOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+
+@implementation LandscapeLeftOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskLandscapeLeft;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation LandscapeRightOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation AllLandscapeOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+
+@implementation AllOrientations
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskAll;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitAndLandscapeLeftOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeLeft;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitAndLandscapeRightOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitUpsideDownAndLandscapeLeftOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeLeft;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
+@implementation PortraitUpsideDownAndLandscapeRightOnly
+
+- (NSUInteger)supportedInterfaceOrientations {
+ return UIInterfaceOrientationMaskPortraitUpsideDown | UIInterfaceOrientationMaskLandscapeRight;
+}
+
+- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
+ return [self supportedInterfaceOrientations] & (1 << interfaceOrientation) ;
+}
+
+- (BOOL)shouldAutorotate {
+ return YES;
+}
+
+@end
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenLibTests/Info.plist Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,24 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ org.apache.cordova.$(PRODUCT_NAME:rfc1034identifier)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ $(PRODUCT_NAME)
+ CFBundlePackageType
+ BNDL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.pbxproj Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,505 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */; };
+ 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B019DA114400DA31AC /* ImageNameTest.m */; };
+ 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B219DA116500DA31AC /* Foundation.framework */; };
+ 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F51B419DA127E00DA31AC /* UIKit.framework */; };
+ 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */; };
+ 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */; };
+ 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 7E9F519019DA0F8300DA31AC /* libCordova.a */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 68A32D7114102E1C006B237C;
+ remoteInfo = CordovaLib;
+ };
+ 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E9F517219DA09CE00DA31AC /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 7E9F519419DA102000DA31AC;
+ remoteInfo = CDVSplashScreenLib;
+ };
+ 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = D2AAC07D0554694100DB518D;
+ remoteInfo = CordovaLib;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 7E9F519319DA102000DA31AC /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "include/$(PRODUCT_NAME)";
+ dstSubfolderSpec = 16;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CordovaLib.xcodeproj; path = "../node_modules/cordova-ios/CordovaLib/CordovaLib.xcodeproj"; sourceTree = ""; };
+ 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libCDVSplashScreenLib.a; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CDVSplashScreenLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 7E9F51A219DA102000DA31AC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+ 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CDVSplashScreen.m; path = ../../../src/ios/CDVSplashScreen.m; sourceTree = SOURCE_ROOT; };
+ 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CDVSplashScreen.h; path = ../../../src/ios/CDVSplashScreen.h; sourceTree = SOURCE_ROOT; };
+ 7E9F51B019DA114400DA31AC /* ImageNameTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTest.m; sourceTree = ""; };
+ 7E9F51B219DA116500DA31AC /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; };
+ 7E9F51B419DA127E00DA31AC /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
+ 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageNameTestDelegates.h; sourceTree = ""; };
+ 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ImageNameTestDelegates.m; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 7E9F519219DA102000DA31AC /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7E9F519C19DA102000DA31AC /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E9F51BA19DA1B2000DA31AC /* libCordova.a in Frameworks */,
+ 7E9F51B919DA1B1600DA31AC /* libCDVSplashScreenLib.a in Frameworks */,
+ 7E9F51B519DA127E00DA31AC /* UIKit.framework in Frameworks */,
+ 7E9F51B319DA116500DA31AC /* Foundation.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 7E9F517119DA09CE00DA31AC = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51B419DA127E00DA31AC /* UIKit.framework */,
+ 7E9F51B219DA116500DA31AC /* Foundation.framework */,
+ 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */,
+ 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */,
+ 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */,
+ 7E9F517D19DA0A0A00DA31AC /* Products */,
+ );
+ sourceTree = "";
+ };
+ 7E9F517D19DA0A0A00DA31AC /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */,
+ 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 7E9F518C19DA0F8300DA31AC /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F519019DA0F8300DA31AC /* libCordova.a */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 7E9F519619DA102000DA31AC /* CDVSplashScreenLib */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51A919DA10AE00DA31AC /* CDVSplashScreen.m */,
+ 7E9F51AA19DA10AE00DA31AC /* CDVSplashScreen.h */,
+ );
+ path = CDVSplashScreenLib;
+ sourceTree = SOURCE_ROOT;
+ };
+ 7E9F51A019DA102000DA31AC /* CDVSplashScreenLibTests */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51A119DA102000DA31AC /* Supporting Files */,
+ 7E9F51B019DA114400DA31AC /* ImageNameTest.m */,
+ 7E9F51B619DA12C600DA31AC /* ImageNameTestDelegates.h */,
+ 7E9F51B719DA14FD00DA31AC /* ImageNameTestDelegates.m */,
+ );
+ path = CDVSplashScreenLibTests;
+ sourceTree = "";
+ };
+ 7E9F51A119DA102000DA31AC /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ 7E9F51A219DA102000DA31AC /* Info.plist */,
+ );
+ name = "Supporting Files";
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */;
+ buildPhases = (
+ 7E9F519119DA102000DA31AC /* Sources */,
+ 7E9F519219DA102000DA31AC /* Frameworks */,
+ 7E9F519319DA102000DA31AC /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = CDVSplashScreenLib;
+ productName = CDVSplashScreenLib;
+ productReference = 7E9F519519DA102000DA31AC /* libCDVSplashScreenLib.a */;
+ productType = "com.apple.product-type.library.static";
+ };
+ 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */;
+ buildPhases = (
+ 7E9F519B19DA102000DA31AC /* Sources */,
+ 7E9F519C19DA102000DA31AC /* Frameworks */,
+ 7E9F519D19DA102000DA31AC /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */,
+ 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */,
+ );
+ name = CDVSplashScreenLibTests;
+ productName = CDVSplashScreenLibTests;
+ productReference = 7E9F519F19DA102000DA31AC /* CDVSplashScreenLibTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 7E9F517219DA09CE00DA31AC /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0600;
+ TargetAttributes = {
+ 7E9F519419DA102000DA31AC = {
+ CreatedOnToolsVersion = 6.0;
+ };
+ 7E9F519E19DA102000DA31AC = {
+ CreatedOnToolsVersion = 6.0;
+ };
+ };
+ };
+ buildConfigurationList = 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 7E9F517119DA09CE00DA31AC;
+ productRefGroup = 7E9F517D19DA0A0A00DA31AC /* Products */;
+ projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 7E9F518C19DA0F8300DA31AC /* Products */;
+ ProjectRef = 7E9F518B19DA0F8300DA31AC /* CordovaLib.xcodeproj */;
+ },
+ );
+ projectRoot = "";
+ targets = (
+ 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */,
+ 7E9F519E19DA102000DA31AC /* CDVSplashScreenLibTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+ 7E9F519019DA0F8300DA31AC /* libCordova.a */ = {
+ isa = PBXReferenceProxy;
+ fileType = archive.ar;
+ path = libCordova.a;
+ remoteRef = 7E9F518F19DA0F8300DA31AC /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 7E9F519D19DA102000DA31AC /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 7E9F519119DA102000DA31AC /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E9F51AB19DA10AE00DA31AC /* CDVSplashScreen.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 7E9F519B19DA102000DA31AC /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 7E9F51B119DA114400DA31AC /* ImageNameTest.m in Sources */,
+ 7E9F51B819DA14FD00DA31AC /* ImageNameTestDelegates.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 7E9F51AD19DA10DE00DA31AC /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 7E9F519419DA102000DA31AC /* CDVSplashScreenLib */;
+ targetProxy = 7E9F51AC19DA10DE00DA31AC /* PBXContainerItemProxy */;
+ };
+ 7E9F51AF19DA10E100DA31AC /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = CordovaLib;
+ targetProxy = 7E9F51AE19DA10E100DA31AC /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+ 7E9F517619DA09CE00DA31AC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Debug;
+ };
+ 7E9F517719DA09CE00DA31AC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ };
+ name = Release;
+ };
+ 7E9F51A419DA102000DA31AC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
+ "\"$(OBJROOT)/UninstalledProducts/include\"",
+ "\"$(BUILT_PRODUCTS_DIR)\"",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ };
+ name = Debug;
+ };
+ 7E9F51A519DA102000DA31AC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(TARGET_BUILD_DIR)/usr/local/lib/include\"",
+ "\n\"$(OBJROOT)/UninstalledProducts/include\"\n\"$(BUILT_PRODUCTS_DIR)\"",
+ );
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ OTHER_LDFLAGS = "-ObjC";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ SKIP_INSTALL = YES;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 7E9F51A719DA102000DA31AC /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ );
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ };
+ name = Debug;
+ };
+ 7E9F51A819DA102000DA31AC /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = YES;
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(SDKROOT)/Developer/Library/Frameworks",
+ "$(inherited)",
+ );
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ INFOPLIST_FILE = CDVSplashScreenLibTests/Info.plist;
+ IPHONEOS_DEPLOYMENT_TARGET = 8.0;
+ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
+ MTL_ENABLE_DEBUG_INFO = NO;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SDKROOT = iphoneos;
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 7E9F517519DA09CE00DA31AC /* Build configuration list for PBXProject "CDVSplashScreenTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E9F517619DA09CE00DA31AC /* Debug */,
+ 7E9F517719DA09CE00DA31AC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7E9F51A319DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLib" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E9F51A419DA102000DA31AC /* Debug */,
+ 7E9F51A519DA102000DA31AC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 7E9F51A619DA102000DA31AC /* Build configuration list for PBXNativeTarget "CDVSplashScreenLibTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 7E9F51A719DA102000DA31AC /* Debug */,
+ 7E9F51A819DA102000DA31AC /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 7E9F517219DA09CE00DA31AC /* Project object */;
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,7 @@
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/project.xcworkspace/xcshareddata/CDVSplashScreenTest.xccheckout Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,41 @@
+
+
+
+
+ IDESourceControlProjectFavoriteDictionaryKey
+
+ IDESourceControlProjectIdentifier
+ 6BE9AD73-1B9F-4362-98D7-DC631BEC6185
+ IDESourceControlProjectName
+ CDVSplashScreenTest
+ IDESourceControlProjectOriginsDictionary
+
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git
+
+ IDESourceControlProjectPath
+ tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj
+ IDESourceControlProjectRelativeInstallPathDictionary
+
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ ../../../../..
+
+ IDESourceControlProjectURL
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-splashscreen.git
+ IDESourceControlProjectVersion
+ 111
+ IDESourceControlProjectWCCIdentifier
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ IDESourceControlProjectWCConfigurations
+
+
+ IDESourceControlRepositoryExtensionIdentifierKey
+ public.vcs.git
+ IDESourceControlWCCIdentifierKey
+ BEF5A5D0FF64801E558286389440357A9233D7DB
+ IDESourceControlWCCName
+ cordova-plugin-splashscreen
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLib.xcscheme Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/CDVSplashScreenTest/CDVSplashScreenTest.xcodeproj/xcshareddata/xcschemes/CDVSplashScreenLibTests.xcscheme Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/README.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,21 @@
+# iOS Tests for CDVSplashScreen
+
+You need to install `node.js` to pull in `cordova-ios`.
+
+First install cordova-ios:
+
+ npm install
+
+... in the current folder.
+
+
+# Testing from Xcode
+
+1. Launch the `CDVSplashScreenTest.xcworkspace` file.
+2. Choose "CDVSplashScreenLibTests" from the scheme drop-down menu
+3. Click and hold on the `Play` button, and choose the `Wrench` icon to run the tests
+
+
+# Testing from the command line
+
+ npm test
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/package.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/ios/package.json Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,13 @@
+{
+ "name": "cordova-plugin-splashscreen-test-ios",
+ "version": "1.0.0",
+ "description": "iOS Unit Tests for Splashscreen Plugin",
+ "author": "Apache Software Foundation",
+ "license": "Apache Version 2.0",
+ "dependencies": {
+ "cordova-ios": "^3.6.0"
+ },
+ "scripts": {
+ "test": "xcodebuild -scheme CordovaLib && xcodebuild test -scheme CDVSplashScreenLibTests -destination 'platform=iOS Simulator,name=iPhone 5'"
+ }
+}
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/plugin.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/plugin.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,29 @@
+
+
+
+
+ Cordova Splashscreen Plugin Tests
+ Apache 2.0
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/tests/tests.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/tests/tests.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,62 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+exports.defineAutoTest = function () {
+ describe('Splashscreen (cordova)', function () {
+ it("splashscreen.spec.1 should exist", function () {
+ expect(navigator.splashscreen).toBeDefined();
+ });
+
+ it("splashscreen.spec.2 exec method should exist", function () {
+ expect(navigator.splashscreen.show).toBeDefined();
+ expect(typeof navigator.splashscreen.show).toBe('function');
+ });
+
+ it("splashscreen.spec.3 exec method should exist", function () {
+ expect(navigator.splashscreen.hide).toBeDefined();
+ expect(typeof navigator.splashscreen.hide).toBe('function');
+ });
+ });
+};
+
+exports.defineManualTests = function (contentEl, createActionButton) {
+ function showFor(duration) {
+ navigator.splashscreen.show();
+ window.setTimeout(function () {
+ navigator.splashscreen.hide();
+ }, 1000 * duration);
+ }
+
+ contentEl.innerHTML = '
Splashscreen Tests
' +
+ '
Note for WP: AutoHideSplashScreen must be set to false in config.xml
' +
+ '' +
+ 'Expected result: Will show the Cordova splashscreen for 1 second' +
+ '
' +
+ 'Expected result: Will show the Cordova splashscreen for 5 seconds';
+
+ createActionButton('Show for 1 second', function () {
+ showFor(1);
+ }, 'show1');
+
+ createActionButton('Show for 5 seconds', function () {
+ showFor(5);
+ }, 'show5');
+};
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/www/splashscreen.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/www/splashscreen.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,33 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var exec = require('cordova/exec');
+
+var splashscreen = {
+ show:function() {
+ exec(null, null, "SplashScreen", "show", []);
+ },
+ hide:function() {
+ exec(null, null, "SplashScreen", "hide", []);
+ }
+};
+
+module.exports = splashscreen;
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.splashscreen/www/windows8/SplashScreenProxy.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.splashscreen/www/windows8/SplashScreenProxy.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,106 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+/*jslint sloppy:true */
+/*global Windows:true, require, module, window, document, WinJS */
+
+var cordova = require('cordova'),
+ channel = require('cordova/channel');
+
+/* This is the actual implementation part that returns the result on Windows 8
+*/
+
+var position = { x: 0, y: 0, width: 0, height: 0 }; // defined by evt.detail.splashScreen.imageLocation
+var splash = null; //
+var localSplash; // the image to display
+var localSplashImage;
+var bgColor = "#464646";
+
+
+
+function updateImageLocation() {
+ localSplash.style.width = window.innerWidth + "px";
+ localSplash.style.height = window.innerHeight + "px";
+ localSplash.style.top = "0px";
+ localSplash.style.left = "0px";
+
+ localSplashImage.style.top = position.y + "px";
+ localSplashImage.style.left = position.x + "px";
+ localSplashImage.style.height = position.height + "px";
+ localSplashImage.style.width = position.width + "px";
+}
+
+function onResize(evt) {
+ if (splash) {
+ position = splash.imageLocation;
+ updateImageLocation();
+ }
+}
+
+var SplashScreen = {
+ setBGColor: function (cssBGColor) {
+ bgColor = cssBGColor;
+ if (localSplash) {
+ localSplash.style.backgroundColor = bgColor;
+ }
+ },
+ show: function () {
+ window.addEventListener("resize", onResize, false);
+ localSplash = document.createElement("div");
+ localSplash.style.backgroundColor = bgColor;
+ localSplash.style.position = "absolute";
+
+ localSplashImage = document.createElement("img");
+ localSplashImage.src = "ms-appx:///images/splashscreen.png";
+ localSplashImage.style.position = "absolute";
+
+ updateImageLocation();
+
+ localSplash.appendChild(localSplashImage);
+ document.body.appendChild(localSplash);
+ },
+ hide: function () {
+ window.removeEventListener("resize", onResize, false);
+ document.body.removeChild(localSplash);
+ localSplash = null;
+ }
+};
+
+module.exports = SplashScreen;
+
+function activated(evt) {
+ if (evt.detail.kind === Windows.ApplicationModel.Activation.ActivationKind.launch) {
+ splash = evt.detail.splashScreen;
+ position = evt.detail.splashScreen.imageLocation;
+ }
+}
+
+
+
+
+channel.onCordovaReady.subscribe(function (evt) {
+ document.addEventListener("DOMContentLoaded", function (evt) {
+ WinJS.Application.addEventListener("activated", activated, false);
+ }, false);
+});
+
+require("cordova/exec/proxy").add("SplashScreen", SplashScreen);
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/.fetch.json
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/.fetch.json Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,1 @@
+{"source":{"type":"local","path":"/opt/intel/XDK_IoT_Edition/xdk/components/server/cordova-plugins/org.apache.cordova.vibration"}}
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/CONTRIBUTING.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/CONTRIBUTING.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,37 @@
+
+
+# Contributing to Apache Cordova
+
+Anyone can contribute to Cordova. And we need your contributions.
+
+There are multiple ways to contribute: report bugs, improve the docs, and
+contribute code.
+
+For instructions on this, start with the
+[contribution overview](http://cordova.apache.org/#contribute).
+
+The details are explained there, but the important items are:
+ - Sign and submit an Apache ICLA (Contributor License Agreement).
+ - Have a Jira issue open that corresponds to your contribution.
+ - Run the tests so your patch doesn't break existing functionality.
+
+We look forward to your contributions!
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/LICENSE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/LICENSE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed 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.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/NOTICE
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/NOTICE Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,7 @@
+Apache Cordova
+Copyright 2012 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+
+This product includes software developed by Joerg Wiedenmann under the zlib license (http://www.gzip.org/zlib/zlib_license.html)
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/README.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/README.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,23 @@
+
+
+# org.apache.cordova.vibration
+
+Plugin documentation: [doc/index.md](doc/index.md)
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/RELEASENOTES.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/RELEASENOTES.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,110 @@
+
+# Release Notes
+
+### 0.3.0 (Sept 5, 2013)
+* Initial FirefoxOS support
+* [CB-4661] VIBRATE permission for Android
+
+### 0.3.2 (Sept 25, 2013)
+* CB-4889 bumping&resetting version
+* CB-4889 renaming org.apache.cordova.core.vibration to org.apache.cordova.vibration
+* Rename CHANGELOG.md -> RELEASENOTES.md
+* updated to work with ffos commandProxy
+* fixed plugin.xml for vibration
+* [CB-4593] [Blackberry10] Added vibration support for bb10
+* updated plugin to work with ffos
+* [CB-4752] Incremented plugin version on dev branch.
+
+### 0.3.3 (Oct 9, 2013)
+* add missing android namespace
+* [CB-4915] Incremented plugin version on dev branch.
+
+### 0.3.4 (Oct 28, 2013)
+* add repo + issue tag to plugin.xml for vibration plugin
+* corrected plugin.xml to write properly to config.xml for ffos
+* [CB-5010] Incremented plugin version on dev branch.
+
+### 0.3.5 (Dec 4, 2013)
+* add ubuntu platform
+* Added amazon-fireos platform. Change to include amazon-fireos as a platform if the user agent string contains 'cordova-amazon-fireos'
+* CB-4747 Fixed Blackberry background vibrate
+
+### 0.3.6 (Jan 02, 2014)
+* CB-5658 Add doc/index.md for Vibration plugin
+
+### 0.3.7 (Feb 05, 2014)
+* Add support for Tizen.
+* CB-3206 - Supported platforms updated
+
+### 0.3.8 (Apr 17, 2014)
+* CB-6465: Add license headers to Tizen code
+* CB-6460: Update license headers
+* Add NOTICE file
+
+### 0.3.9 (Jun 05, 2014)
+* updated notice file
+* Github close #11
+* Extended vibrateWithPattern to allow for pattern repetition, implemented a complementary cancelVibration function and adapted documentation.
+* Implemented vibrateWithPattern (for android) and adapted documentation.
+* CB-6811 Add license to CONTRIBUTING.md
+* CB-6491 add CONTRIBUTING.md
+
+### 0.3.10 (Aug 06, 2014)
+* ubuntu: Implemented vibrateWithPattern/cancelVibration
+* **FFOS** update VibrationProxy.js
+* CB-6127 Updated translations for docs
+
+### 0.3.11 (Sep 17, 2014)
+* CB-7249 cordova-plugin-vibration documentation translation
+* CB-6724 documented Windows support for vibrate with pattern and cancel vibrate in manual test doc and moved tests to tests dir
+* add longer pattern sequence for testing, change expected result for old vibrate with pattern test
+* added more test cases, changed vibrate with pattern durations, changed where vibrateOn is set to true
+* clear settimeout when user cancels vibration
+* add setTimeout function to update vibrateOn var if user doesn't cancel vibrate, add note about iOS
+* on/off button for cancel tests, add results box and msgs
+* added tests for old vibrateWithPattern and cancelVibration calls
+* added 'Android only' to buttons for specific tests, changed where console.log is executed for user to see earlier
+* added tests to ensure compliance with w3c spec
+* CB-6963 ported vibration automated & manual tests
+* CB-6966 renamed folder to tests + added nested plugin.xml
+* CB-6966 Ported Vibration automated & manual tests
+* removed duplicate messaging
+* CB-5459 slight change to the vibration documentation for pattern due to merge issue
+* changes to how 0 is getting added to array in order to align with w3c spec
+* changes to vibration.java to align with w3c, changes to vibration.js for backwards compatibility
+* changes made to align with w3c spec
+* Updated doc with Windows support for vibrate with pattern
+* Added note to doc about w3c alignment and min time for Windows
+* update doc with another way to cancel vibration
+* update doc to show vibrate([num]) is a standard vibrate
+* vibrate([num]) is treated as a vibrate not vibrate with pattern
+* added new example to documentation
+* updated doc for w3c alignment
+* changes to how 0 is getting added to array in order to align with w3c spec
+* changes to vibration.java to align with w3c, changes to vibration.js for backwards compatibility
+* changes made to align with w3c spec
+
+### 0.3.12 (Dec 02, 2014)
+* CB-8018 Add `vibrate(pattern)` fallback on vibrate for **Windows Phone 8**
+* CB-7977 Mention `deviceready` in plugin docs
+* CB-7700 cordova-plugin-vibration documentation translation: cordova-plugin-vibration
+* CB-7571 Bump version of nested plugin to match parent plugin
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/de/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/de/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+Dieses Plugin richtet mit dem W3C Vibration Spezifikation http://www.w3.org/TR/vibration/
+
+Dieses Plugin bietet eine Möglichkeit, das Gerät zu vibrieren.
+
+## Installation
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## Unterstützte Plattformen
+
+Navigator.Vibrate
+Navigator.Notification.Vibrate - Amazon Fire OS - Android - BlackBerry 10 - Firefox OS - iOS - Windows Phone 7 und 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration - Android
+
+## vibrieren (empfohlen)
+
+Diese Funktion hat drei verschiedene Funktionalitäten, die auf der Grundlage von an sie übergebenen Parameter.
+
+### Standard vibrieren
+
+Vibriert das Gerät für einen bestimmten Zeitraum.
+
+ navigator.vibrate(time)
+
+
+oder
+
+ navigator.vibrate([time])
+
+
+-**Zeit**: Millisekunden das Gerät vibriert. *(Anzahl)*
+
+#### Beispiel
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### iOS Macken
+
+* **Zeit**: ignoriert die angegebene Zeit und für eine voreingestellte Zeit vibriert.
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### Windows und Blackberry-Kniffe
+
+* **Zeit**: Max. Zeit 5000ms (5 s) und min Zeit ist 1ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### Vibrieren Sie mit einem Muster (Android und Windows nur)
+
+Vibriert das Gerät mit einem vorgegebenen Muster
+
+ navigator.vibrate(pattern);
+
+
+* **Muster**: Folge von Dauer (in Millisekunden) für den ein-oder Ausschalten der Vibrator. *(Array von Zahlen)*
+
+#### Beispiel
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### "Abbrechen" Vibration (nicht in iOS unterstützt)
+
+Sofort bricht alle derzeit ausgeführten Schwingungen.
+
+ navigator.vibrate(0)
+
+
+oder
+
+ navigator.vibrate([])
+
+
+oder
+
+ navigator.vibrate([0])
+
+
+Übergabe eines Parameters 0, wird ein leeres Array, oder ein Array mit einem Element der Wert 0 auftretender Schwingungen abbrechen.
+
+## *Notification.Vibrate (veraltet)
+
+Vibriert das Gerät für einen bestimmten Zeitraum.
+
+ navigator.notification.vibrate(time)
+
+
+* **Zeit**: Millisekunden das Gerät vibriert. *(Anzahl)*
+
+### Beispiel
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### iOS Macken
+
+* **Zeit**: ignoriert die angegebene Zeit und für eine voreingestellte Zeit vibriert.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *Notification.vibrateWithPattern (veraltet)
+
+Vibriert das Gerät mit einem vorgegebenen Muster.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **Muster**: Folge von Dauer (in Millisekunden) für den ein-oder Ausschalten der Vibrator. *(Array von Zahlen)*
+* **Wiederholen**: optionale Index in das Array Muster an der wiederholte (wird wiederholt, bis abgebrochen) zu starten, oder-1 für Wiederholung (Standard). *(Anzahl)*
+
+### Beispiel
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *Notification.cancelVibration (veraltet)
+
+Sofort bricht alle derzeit ausgeführten Schwingungen.
+
+ navigator.notification.cancelVibration()
+
+
+* Note - durch Angleichung an die w3c-Spezifikation, die markierten Methoden abgeschafft werden wird
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/es/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/es/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+Este plugin se alinea con la vibración W3C especificación http://www.w3.org/TR/vibration/
+
+Este plugin proporciona una manera de vibrar el dispositivo.
+
+## Instalación
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## Plataformas soportadas
+
+Navigator.Vibrate
+Navigator.Notification.Vibrate - Amazon fuego OS - sistema operativo Android - BlackBerry 10 - Firefox - iOS - Windows Phone 7 y 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration - Android
+
+## vibrar (recomendado)
+
+Esta función tiene tres diferentes funcionalidades basadas en los parámetros pasados a él.
+
+### Estándar de vibrar
+
+Vibra el dispositivo para una cantidad dada de tiempo.
+
+ navigator.vibrate(time)
+
+
+o
+
+ navigator.vibrate([time])
+
+
+-**tiempo**: milisegundos a vibrar el dispositivo. *(Número)*
+
+#### Ejemplo
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### iOS rarezas
+
+* **time**: ignora el tiempo especificado y vibra por un tiempo preestablecido.
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### Windows y rarezas de Blackberry
+
+* **tiempo**: tiempo máximo es 5000ms (5s) y min tiempo 1ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### Vibrar con un patrón (Android y Windows solamente)
+
+Vibra el dispositivo con un patrón determinado
+
+ navigator.vibrate(pattern);
+
+
+* **patrón**: secuencia de duraciones (en milisegundos) que desea activar o desactivar el vibrador. *(Matriz de números)*
+
+#### Ejemplo
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### Cancelar vibración (no soportada en iOS)
+
+Inmediatamente se cancela cualquier vibración actualmente en ejecución.
+
+ navigator.vibrate(0)
+
+
+o
+
+ navigator.vibrate([])
+
+
+o
+
+ navigator.vibrate([0])
+
+
+Pasando en un parámetro de 0, una matriz vacía o una matriz con un elemento de valor 0 se cancelará cualquier vibraciones.
+
+## *Notification.Vibrate (obsoleto)
+
+Vibra el dispositivo para una cantidad dada de tiempo.
+
+ navigator.notification.vibrate(time)
+
+
+* **tiempo**: milisegundos a vibrar el dispositivo. *(Número)*
+
+### Ejemplo
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### iOS rarezas
+
+* **time**: ignora el tiempo especificado y vibra por un tiempo preestablecido.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *Notification.vibrateWithPattern (obsoleto)
+
+Vibra el dispositivo con un patrón determinado.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **patrón**: secuencia de duraciones (en milisegundos) que desea activar o desactivar el vibrador. *(Matriz de números)*
+* **repito**: índice opcional en la matriz de patrón en el cual comenzar repitiendo (se repite hasta que se cancele), o -1 para la no repetición (por defecto). *(Número)*
+
+### Ejemplo
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *Notification.cancelVibration (obsoleto)
+
+Inmediatamente se cancela cualquier vibración actualmente en ejecución.
+
+ navigator.notification.cancelVibration()
+
+
+* Nota: debido a la alineación con la especificación del w3c, los métodos favoritos a ser eliminados
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/fr/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/fr/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+Ce plugin s'aligne avec le W3C vibration spécification http://www.w3.org/TR/vibration/
+
+Ce plugin permet de vibrer l'appareil.
+
+## Installation
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## Plates-formes prises en charge
+
+Navigator.VIBRATE
+Navigator.notification.VIBRATE - Amazon Fire OS - Android - BlackBerry 10 - Firefox OS - iOS - Windows Phone 7 et 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration - Android
+
+## vibrer (recommandée)
+
+Cette fonction a trois différentes fonctionnalités basées sur les paramètres passés à elle.
+
+### Norme vibrer
+
+Vibre l'appareil pendant un certain temps.
+
+ navigator.vibrate(time)
+
+
+ou
+
+ navigator.vibrate([time])
+
+
+-**temps**: millisecondes à vibrer l'appareil. *(Nombre)*
+
+#### Exemple
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### iOS Quirks
+
+* **temps**: ne tient pas compte de la durée spécifiée et vibre pendant un temps prédéterminé.
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### Windows et les bizarreries de Blackberry
+
+* **temps**: temps Max est 5000ms (5 s) et heure min est de 1 ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### Vibrer avec un motif (Android et Windows uniquement)
+
+Vibre l'appareil avec un motif donné
+
+ navigator.vibrate(pattern);
+
+
+* **modèle**: séquence de la durée (en millisecondes) pour lequel activer ou désactiver le vibreur. *(Tableau de nombres)*
+
+#### Exemple
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### Annuler les vibrations (ne pas de prise en charge d'iOS)
+
+Immédiatement annule des vibrations en cours d'exécution.
+
+ navigator.vibrate(0)
+
+
+ou
+
+ navigator.vibrate([])
+
+
+ou
+
+ navigator.vibrate([0])
+
+
+En passant un paramètre de 0, un tableau vide, ou un tableau contenant un seul élément de valeur 0 annulera toute vibration.
+
+## *notification.VIBRATE (obsolète)
+
+Vibre l'appareil pendant un certain temps.
+
+ navigator.notification.vibrate(time)
+
+
+* **temps**: millisecondes à vibrer l'appareil. *(Nombre)*
+
+### Exemple
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### iOS Quirks
+
+* **temps**: ne tient pas compte de la durée spécifiée et vibre pendant un temps prédéterminé.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *notification.vibrateWithPattern (obsolète)
+
+Vibre l'appareil avec un modèle donné.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **modèle**: séquence de la durée (en millisecondes) pour lequel activer ou désactiver le vibreur. *(Tableau de nombres)*
+* **répéter**: optionnel index dans le tableau de configuration à laquelle commencer à répéter (répétera jusqu'à annulation), ou -1 pour aucune répétition (par défaut). *(Nombre)*
+
+### Exemple
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *notification.cancelVibration (obsolète)
+
+Immédiatement annule des vibrations en cours d'exécution.
+
+ navigator.notification.cancelVibration()
+
+
+* Remarque : en raison de l'alignement avec les spécifications w3c, les méthodes étoilées seront progressivement
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,175 @@
+
+
+# org.apache.cordova.vibration
+
+This plugin aligns with the W3C vibration specification http://www.w3.org/TR/vibration/
+
+This plugin provides a way to vibrate the device.
+
+This plugin defines global objects including `navigator.vibrate`.
+
+Although in the global scope, they are not available until after the `deviceready` event.
+
+ document.addEventListener("deviceready", onDeviceReady, false);
+ function onDeviceReady() {
+ console.log(navigator.vibrate);
+ }
+
+## Installation
+
+ cordova plugin add org.apache.cordova.vibration
+
+## Supported Platforms
+
+navigator.vibrate,
+navigator.notification.vibrate
+- Amazon Fire OS
+- Android
+- BlackBerry 10
+- Firefox OS
+- iOS
+- Windows Phone 7 and 8
+
+navigator.notification.vibrateWithPattern, navigator.notification.cancelVibration
+- Android
+- Windows Phone 8
+
+## vibrate (recommended)
+
+This function has three different functionalities based on parameters passed to it.
+
+###Standard vibrate
+
+Vibrates the device for a given amount of time.
+
+ navigator.vibrate(time)
+
+or
+
+ navigator.vibrate([time])
+
+
+-__time__: Milliseconds to vibrate the device. _(Number)_
+
+####Example
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+####iOS Quirks
+
+- __time__: Ignores the specified time and vibrates for a pre-set amount of time.
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+####Windows and Blackberry Quirks
+
+- __time__: Max time is 5000ms (5s) and min time is 1ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+###Vibrate with a pattern (Android and Windows only)
+Vibrates the device with a given pattern
+
+ navigator.vibrate(pattern);
+
+- __pattern__: Sequence of durations (in milliseconds) for which to turn on or off the vibrator. _(Array of Numbers)_
+
+####Example
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+####Windows Phone 8 Quirks
+
+- vibrate(pattern) falls back on vibrate with default duration
+
+###Cancel vibration (not supported in iOS)
+
+Immediately cancels any currently running vibration.
+
+ navigator.vibrate(0)
+
+or
+
+ navigator.vibrate([])
+
+or
+
+ navigator.vibrate([0])
+
+Passing in a parameter of 0, an empty array, or an array with one element of value 0 will cancel any vibrations.
+
+## *notification.vibrate (deprecated)
+
+Vibrates the device for a given amount of time.
+
+ navigator.notification.vibrate(time)
+
+- __time__: Milliseconds to vibrate the device. _(Number)_
+
+### Example
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+### iOS Quirks
+
+- __time__: Ignores the specified time and vibrates for a pre-set amount of time.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+## *notification.vibrateWithPattern (deprecated)
+
+Vibrates the device with a given pattern.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+- __pattern__: Sequence of durations (in milliseconds) for which to turn on or off the vibrator. _(Array of Numbers)_
+- __repeat__: Optional index into the pattern array at which to start repeating (will repeat until canceled), or -1 for no repetition (default). _(Number)_
+
+### Example
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+## *notification.cancelVibration (deprecated)
+
+Immediately cancels any currently running vibration.
+
+ navigator.notification.cancelVibration()
+
+*Note - due to alignment with w3c spec, the starred methods will be phased out
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/it/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/it/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+Questo plugin si allinea con il W3C vibrazione specifica http://www.w3.org/TR/vibration/
+
+Questo plugin consente di vibrare il dispositivo.
+
+## Installazione
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## Piattaforme supportate
+
+Navigator.vibrate
+Navigator.Notification.vibrate - Amazon fuoco OS - OS di Firefox - 10 BlackBerry - Android - iOS - Windows Phone 7 e 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration - Android
+
+## vibrare (consigliato)
+
+Questa funzione ha tre differenti funzionalità basate su parametri passati ad esso.
+
+### Standard vibrare
+
+Vibra il dispositivo per un determinato periodo di tempo.
+
+ navigator.vibrate(time)
+
+
+o
+
+ navigator.vibrate([time])
+
+
+-**tempo**: millisecondi a vibrare il dispositivo. *(Numero)*
+
+#### Esempio
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### iOS stranezze
+
+* **tempo**: ignora il tempo specificato e vibra per un tempo pre-impostato.
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### Windows e stranezze di Blackberry
+
+* **tempo**: tempo Max 5000ms (5s) edè min tempo di 1ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### Vibrare con un pattern (Android e solo per Windows)
+
+Vibra il dispositivo con un determinato modello
+
+ navigator.vibrate(pattern);
+
+
+* **modello**: sequenza di durate (in millisecondi) per il quale attivare o disattivare il vibratore. *(Matrice di numeri)*
+
+#### Esempio
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### Annullare le vibrazioni (non supportata in iOS)
+
+Annulla immediatamente qualsiasi vibrazione attualmente in esecuzione.
+
+ navigator.vibrate(0)
+
+
+o
+
+ navigator.vibrate([])
+
+
+o
+
+ navigator.vibrate([0])
+
+
+Passa un parametro 0, matrice vuota o una matrice con un elemento di valore 0 annullerà eventuali vibrazioni.
+
+## *Notification.vibrate (obsoleto)
+
+Vibra il dispositivo per un determinato periodo di tempo.
+
+ navigator.notification.vibrate(time)
+
+
+* **tempo**: millisecondi a vibrare il dispositivo. *(Numero)*
+
+### Esempio
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### iOS stranezze
+
+* **tempo**: ignora il tempo specificato e vibra per un tempo pre-impostato.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *Notification.vibrateWithPattern (obsoleto)
+
+Vibra il dispositivo con un determinato modello.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **modello**: sequenza di durate (in millisecondi) per il quale attivare o disattivare il vibratore. *(Matrice di numeri)*
+* **ripetere**: opzionale indice nell'array modello presso cui iniziare ripetendo (ripeterà finché non annullato), o -1 per nessuna ripetizione (impostazione predefinita). *(Numero)*
+
+### Esempio
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *Notification.cancelVibration (obsoleto)
+
+Annulla immediatamente qualsiasi vibrazione attualmente in esecuzione.
+
+ navigator.notification.cancelVibration()
+
+
+* Nota - a causa di allineamento con le specifiche w3c, saranno essere ritirati i metodi speciali
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/ja/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/ja/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+このプラグインに準拠 W3C 振動仕様 http://www.w3.org/TR/vibration/
+
+このプラグインは、デバイスを振動させる方法を提供します。
+
+## インストール
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## サポートされているプラットフォーム
+
+navigator.vibrate
+navigator.notification.vibrate - アマゾン火 OS - アンドロイド - ブラックベリー 10 - Firefox OS - iOS - Windows Phone 7 と 8
+
+navigator.notification.vibrateWithPattern、
+navigator.notification.cancelVibration - アンドロイド
+
+## 振動 (推奨)
+
+この関数は、渡されたパラメーターに基づいて 3 つのさまざまな機能。
+
+### 標準を振動します。
+
+一定の時間のため、デバイスが振動します。
+
+ navigator.vibrate(time)
+
+
+または
+
+ navigator.vibrate([time])
+
+
+-**時刻**: ミリ秒、デバイスを振動させる。*(数)*
+
+#### 例
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### iOS の癖
+
+* **時間**: 指定された時間を無視し、時間の事前に設定された量のために振動します。
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### Windows とブラックベリー癖
+
+* **時間**: 5000 (5 秒) は、最大時間と最小時間は 1 ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### (人造人間と Windows のみ) パターンで振動します。
+
+特定のパターンを持つデバイスが振動します。
+
+ navigator.vibrate(pattern);
+
+
+* **パターン**: シーケンスの継続時間 (ミリ秒単位) をオンまたはオフ、バイブします。*(数字の配列)*
+
+#### 例
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### [キャンセル] 振動 (iOS ではサポートされていません)
+
+すぐに、現在実行中の振動をキャンセルします。
+
+ navigator.vibrate(0)
+
+
+または
+
+ navigator.vibrate([])
+
+
+または
+
+ navigator.vibrate([0])
+
+
+0 のパラメーターを渡して、空の配列、または 0 の値の 1 つの要素を持つ配列は任意振動がキャンセルされます。
+
+## *notification.vibrate (非推奨)
+
+一定の時間のため、デバイスが振動します。
+
+ navigator.notification.vibrate(time)
+
+
+* **時刻**: ミリ秒、デバイスを振動させる。*(数)*
+
+### 例
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### iOS の癖
+
+* **時間**: 指定された時間を無視し、時間の事前に設定された量のために振動します。
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *notification.vibrateWithPattern (非推奨)
+
+特定のパターンを持つデバイスが振動します。
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **パターン**: シーケンスの継続時間 (ミリ秒単位) をオンまたはオフ、バイブします。*(数字の配列)*
+* **繰り返します**: 省略可能な配列のインデックスのパターン (でしょう) を繰り返す取り消されるまで、繰り返しを開始するまたは反復なし (既定値) の場合は-1。*(数)*
+
+### 例
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *notification.cancelVibration (非推奨)
+
+すぐに、現在実行中の振動をキャンセルします。
+
+ navigator.notification.cancelVibration()
+
+
+* 注 - w3c の仕様を配置、ため主演メソッドがフェーズ アウトされます。
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/ko/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/ko/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+이 플러그인에 W3C 진동 사양 http://www.w3.org/TR/vibration/ 정렬
+
+이 플러그인에는 장치를 진동 하는 방법을 제공 합니다.
+
+## 설치
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## 지원 되는 플랫폼
+
+navigator.vibrate
+navigator.notification.vibrate-아마존 화재 OS-안 드 로이드-블랙베리 10-파이어 폭스 OS-iOS-Windows Phone 7과 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration-안 드 로이드
+
+## 진동 (권장)
+
+이 함수는 전달 된 매개 변수에 따라 세 가지 다른 기능.
+
+### 기준 진동
+
+주어진 시간 동안 장치를 진동.
+
+ navigator.vibrate(time)
+
+
+또는
+
+ navigator.vibrate([time])
+
+
+-**시간**: 진동 장치 (밀리초)입니다. *(수)*
+
+#### 예를 들어
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### iOS 단점
+
+* **시간**: 지정 된 시간을 무시 하 고 미리 설정 된 시간 동안 진동.
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### 윈도 즈와 블랙베리 단점
+
+* **시간**: 최대 시간은 2000ms (5s) 이며 최소 시간 1ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### (안 드 로이드와 Windows에만 해당) 패턴으로 진동
+
+지정 된 패턴으로 장치를 진동
+
+ navigator.vibrate(pattern);
+
+
+* **패턴**:의 기간 (밀리초)에서 진동을 켜거나 끌 수 있는 순서. *(숫자의 배열)*
+
+#### 예를 들어
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### 진동 (iOS에서 지원 되지 않음) 취소
+
+즉시 모든 현재 실행 중인 진동을 취소합니다.
+
+ navigator.vibrate(0)
+
+
+또는
+
+ navigator.vibrate([])
+
+
+또는
+
+ navigator.vibrate([0])
+
+
+0의 매개 변수 전달, 빈 배열, 또는 0 값의 한 요소 배열은 어떤 진동을 취소할 것 이다.
+
+## *notification.vibrate (사용 되지 않음)
+
+주어진 시간 동안 장치를 진동.
+
+ navigator.notification.vibrate(time)
+
+
+* **시간**: 진동 장치 (밀리초)입니다. *(수)*
+
+### 예를 들어
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### iOS 단점
+
+* **시간**: 지정 된 시간을 무시 하 고 미리 설정 된 시간 동안 진동.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *notification.vibrateWithPattern (사용 되지 않음)
+
+지정 된 패턴으로 장치 진동.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **패턴**:의 기간 (밀리초)에서 진동을 켜거나 끌 수 있는 순서. *(숫자의 배열)*
+* **반복**: 반복 (취소 될 때까지 반복 됩니다), 시작 하는 또는-1 (기본값) 없는 반복에 대 한 패턴 배열에 선택적 인덱스. *(수)*
+
+### 예를 들어
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *notification.cancelVibration (사용 되지 않음)
+
+즉시 모든 현재 실행 중인 진동을 취소합니다.
+
+ navigator.notification.cancelVibration()
+
+
+* 참고-때문에 w3c 사양 가진 줄 맞춤, 별표 메서드 밖으로 단계별로 됩니다.
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/pl/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/pl/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+Ten plugin wyrównuje z http://www.w3.org/TR/vibration/ specyfikacji W3C wibracji
+
+Ten plugin umożliwia wibracje urządzenia.
+
+## Instalacja
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## Obsługiwane platformy
+
+Navigator.vibrate
+Navigator.Notification.vibrate - Amazon ogień OS - OS Android - BlackBerry 10 - Firefox - iOS - Windows Phone 7 i 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration - Android
+
+## wibracje (zalecane)
+
+Funkcja ta ma trzy różne funkcje na podstawie parametrów przekazywanych do niej.
+
+### Standardowe wibracje
+
+Wibruje urządzenie na określoną ilość czasu.
+
+ navigator.vibrate(time)
+
+
+lub
+
+ navigator.vibrate([time])
+
+
+-**czas**: milisekund wibracje urządzenia. *(Liczba)*
+
+#### Przykład
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### Dziwactwa iOS
+
+* **czas**: ignoruje określony czas i wibruje na wstępnie określoną ilość czasu.
+
+ Navigator.vibrate(3000); 3000 jest ignorowany
+
+#### Windows i Blackberry dziwactwa
+
+* **czas**: Max czas jest 5000ms (5s) i min czas 1ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### Wibracje z wzorem (Android i Windows tylko)
+
+Wibruje urządzenie z danego wzoru
+
+ navigator.vibrate(pattern);
+
+
+* **wzór**: sekwencja czas trwania (w milisekundach), dla której chcesz włączyć lub wyłączyć wibrator. *(Tablica liczb)*
+
+#### Przykład
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### Anuluj wibracji (nieobsługiwane w iOS)
+
+Niezwłocznie anuluje aktualnie uruchomione wibracje.
+
+ navigator.vibrate(0)
+
+
+lub
+
+ navigator.vibrate([])
+
+
+lub
+
+ navigator.vibrate([0])
+
+
+Przekazując parametr 0, pustą tablicę lub tablicy z jednym z elementów wartości 0 spowoduje anulowanie wibracji.
+
+## *Notification.vibrate (przestarzałe)
+
+Wibruje urządzenie na określoną ilość czasu.
+
+ navigator.notification.vibrate(time)
+
+
+* **czas**: milisekund wibracje urządzenia. *(Liczba)*
+
+### Przykład
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### Dziwactwa iOS
+
+* **czas**: ignoruje określony czas i wibruje na wstępnie określoną ilość czasu.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *Notification.vibrateWithPattern (przestarzałe)
+
+Wibruje urządzenie z danego wzoru.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **wzór**: sekwencja czas trwania (w milisekundach), dla której chcesz włączyć lub wyłączyć wibrator. *(Tablica liczb)*
+* **Powtórz**: opcjonalny indeks do tablicy wzór który zacząć powtarzać (będzie powtarzać do momentu anulowane), lub -1 nie powtarzania (domyślnie). *(Liczba)*
+
+### Przykład
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *Notification.cancelVibration (przestarzałe)
+
+Niezwłocznie anuluje aktualnie uruchomione wibracje.
+
+ navigator.notification.cancelVibration()
+
+
+* Uwaga - ze względu na dostosowanie specyfikacji w3c, oznaczonych gwiazdką metody zostaną wycofane
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/ru/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/ru/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+Этот плагин выравнивает с http://www.w3.org/TR/vibration/ спецификации W3C вибрации
+
+Этот плагин позволяет вибрировать устройство.
+
+## Установка
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## Поддерживаемые платформы
+
+Navigator.Vibrate
+Navigator.Notification.Vibrate - Amazon Fire OS - Android - BlackBerry 10 - Firefox OS - iOS - Windows Phone 7 и 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration - Android
+
+## вибрировать (рекомендуется)
+
+Эта функция имеет три различных функций, на основе параметров, передаваемых ему.
+
+### Стандарт вибрировать
+
+Устройство вибрирует за определенное количество времени.
+
+ navigator.vibrate(time)
+
+
+или
+
+ navigator.vibrate([time])
+
+
+-**time**: Сколько миллисекунд будет вибрировать устройство. *(Число)*
+
+#### Пример
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### Особенности iOS
+
+* **time**: игнорирует указанное время и вибрирует предопределенный отрезок времени.
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### Окна и Blackberry причуды
+
+* **время**: время Макс 5000ms (5с) и минимальное время 1 мс
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### Вибрировать с узором (Android и Windows только)
+
+Вибрирует на устройства с заданным шаблоном
+
+ navigator.vibrate(pattern);
+
+
+* **шаблон**: последовательность длительностей (в миллисекундах), для которого требуется включить или выключить вибростол. *(Массив из чисел)*
+
+#### Пример
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### Отмена вибрации (не поддерживается в iOS)
+
+Немедленно отменяет любые выполняющиеся вибрации.
+
+ navigator.vibrate(0)
+
+
+или
+
+ navigator.vibrate([])
+
+
+или
+
+ navigator.vibrate([0])
+
+
+Проходя в параметре 0, пустой массив, или массив с одним элементом значения 0 будет отменить любые вибрации.
+
+## *Notification.Vibrate (устарело)
+
+Устройство вибрирует за определенное количество времени.
+
+ navigator.notification.vibrate(time)
+
+
+* **time**: Сколько миллисекунд будет вибрировать устройство. *(Число)*
+
+### Пример
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### Особенности iOS
+
+* **time**: игнорирует указанное время и вибрирует предопределенный отрезок времени.
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *Notification.vibrateWithPattern (устарело)
+
+Вибрирует на устройства с заданным шаблоном.
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **шаблон**: последовательность длительностей (в миллисекундах), для которого требуется включить или выключить вибростол. *(Массив из чисел)*
+* **повторяю**: дополнительный индекс в массиве шаблон для начала повторять (будет повторять пока не отменен), или -1 для не повторения (по умолчанию). *(Число)*
+
+### Пример
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *Notification.cancelVibration (устарело)
+
+Немедленно отменяет любые выполняющиеся вибрации.
+
+ navigator.notification.cancelVibration()
+
+
+* Обратите внимание - из-за соответствие спецификации w3c, Избранные методы будут поэтапно
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/doc/zh/index.md
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/doc/zh/index.md Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,170 @@
+
+
+# org.apache.cordova.vibration
+
+這個外掛程式將對齊與 W3C 振動規範 HTTP://www.w3.org/TR/vibration/
+
+這個外掛程式提供了方法振動設備。
+
+## 安裝
+
+ cordova plugin add org.apache.cordova.vibration
+
+
+## 支援的平臺
+
+navigator.vibrate
+navigator.notification.vibrate-亞馬遜火 OS-Android-黑莓 10-火狐瀏覽器作業系統 — — iOS-Windows Phone 7 和 8
+
+navigator.notification.vibrateWithPattern,
+navigator.notification.cancelVibration-安卓系統
+
+## 震動 (推薦)
+
+此函數具有三個不同的功能,基於參數傳遞給它。
+
+### 標準振動
+
+為給定時間振動設備。
+
+ navigator.vibrate(time)
+
+
+或
+
+ navigator.vibrate([time])
+
+
+-**時間**: 毫秒以振動裝置。*(人數)*
+
+#### 示例
+
+ // Vibrate for 3 seconds
+ navigator.vibrate(3000);
+
+ // Vibrate for 3 seconds
+ navigator.vibrate([3000]);
+
+
+#### iOS 的怪癖
+
+* **時間**: 忽略指定的時間和震動的一個預先設定的時間。
+
+ navigator.vibrate(3000); // 3000 is ignored
+
+#### Windows 和黑莓的怪癖
+
+* **時間**: 最長時間是 5000ms (5s) 和最小時間為 1ms
+
+ navigator.vibrate(8000); // will be truncated to 5000
+
+### 以一種模式 (安卓系統和僅限 Windows) 振動
+
+振動具有給定模式的設備
+
+ navigator.vibrate(pattern);
+
+
+* **模式**: 序列的持續時間 (以毫秒為單位) 為其打開或關閉振動器。*(數位陣列)*
+
+#### 示例
+
+ // Vibrate for 1 second
+ // Wait for 1 second
+ // Vibrate for 3 seconds
+ // Wait for 1 second
+ // Vibrate for 5 seconds
+ navigator.vibrate([1000, 1000, 3000, 1000, 5000]);
+
+
+### 取消振動 (iOS 中不支援)
+
+立即取消任何當前正在運行的振動。
+
+ navigator.vibrate(0)
+
+
+或
+
+ navigator.vibrate([])
+
+
+或
+
+ navigator.vibrate([0])
+
+
+在一個為 0 的參數中傳遞,空陣列或陣列的一個元素的值為 0 將取消任何振動。
+
+## *notification.vibrate (已棄用)
+
+為給定時間振動設備。
+
+ navigator.notification.vibrate(time)
+
+
+* **時間**: 毫秒以振動裝置。*(人數)*
+
+### 示例
+
+ // Vibrate for 2.5 seconds
+ navigator.notification.vibrate(2500);
+
+
+### iOS 的怪癖
+
+* **時間**: 忽略指定的時間和震動的一個預先設定的時間。
+
+ navigator.notification.vibrate();
+ navigator.notification.vibrate(2500); // 2500 is ignored
+
+
+## *notification.vibrateWithPattern (已棄用)
+
+振動具有給定模式的設備。
+
+ navigator.notification.vibrateWithPattern(pattern, repeat)
+
+
+* **模式**: 序列的持續時間 (以毫秒為單位) 為其打開或關閉振動器。*(數位陣列)*
+* **重複**: 在其開始重複 (會重複,直到被取消),或-1 為不重複 (預設值) 模式陣列中的可選索引。*(人數)*
+
+### 示例
+
+ // Immediately start vibrating
+ // vibrate for 100ms,
+ // wait for 100ms,
+ // vibrate for 200ms,
+ // wait for 100ms,
+ // vibrate for 400ms,
+ // wait for 100ms,
+ // vibrate for 800ms,
+ // (do not repeat)
+ navigator.notification.vibrateWithPattern([0, 100, 100, 200, 100, 400, 100, 800]);
+
+
+## *notification.cancelVibration (已棄用)
+
+立即取消任何當前正在運行的振動。
+
+ navigator.notification.cancelVibration()
+
+
+* 請注意--對齊方式與 w3c 規範,因出演的方法將被淘汰
\ No newline at end of file
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/plugin.xml
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/plugin.xml Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,137 @@
+
+
+
+
+
+ Vibration
+ Cordova Vibration Plugin
+ Apache 2.0
+ cordova,vibration
+ https://git-wip-us.apache.org/repos/asf/cordova-plugin-vibration.git
+ https://issues.apache.org/jira/browse/CB/component/12320639
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/android/Vibration.java
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/src/android/Vibration.java Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,126 @@
+/*
+ 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.
+*/
+package org.apache.cordova.vibration;
+
+import org.apache.cordova.CallbackContext;
+import org.apache.cordova.CordovaPlugin;
+import org.json.JSONArray;
+import org.json.JSONException;
+import android.content.Context;
+import android.os.Vibrator;
+
+/**
+ * This class provides access to vibration on the device.
+ */
+public class Vibration extends CordovaPlugin {
+
+ /**
+ * Constructor.
+ */
+ public Vibration() {
+ }
+
+ /**
+ * Executes the request and returns PluginResult.
+ *
+ * @param action The action to execute.
+ * @param args JSONArray of arguments for the plugin.
+ * @param callbackContext The callback context used when calling back into JavaScript.
+ * @return True when the action was valid, false otherwise.
+ */
+ public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
+ if (action.equals("vibrate")) {
+ this.vibrate(args.getLong(0));
+ }
+ else if (action.equals("vibrateWithPattern")) {
+ JSONArray pattern = args.getJSONArray(0);
+ int repeat = args.getInt(1);
+ //add a 0 at the beginning of pattern to align with w3c
+ long[] patternArray = new long[pattern.length()+1];
+ patternArray[0] = 0;
+ for (int i = 0; i < pattern.length(); i++) {
+ patternArray[i+1] = pattern.getLong(i);
+ }
+ this.vibrateWithPattern(patternArray, repeat);
+ }
+ else if (action.equals("cancelVibration")) {
+ this.cancelVibration();
+ }
+ else {
+ return false;
+ }
+
+ // Only alert and confirm are async.
+ callbackContext.success();
+
+ return true;
+ }
+
+ //--------------------------------------------------------------------------
+ // LOCAL METHODS
+ //--------------------------------------------------------------------------
+
+ /**
+ * Vibrates the device for a given amount of time.
+ *
+ * @param time Time to vibrate in ms.
+ */
+ public void vibrate(long time) {
+ // Start the vibration, 0 defaults to half a second.
+ if (time == 0) {
+ time = 500;
+ }
+ Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE);
+ vibrator.vibrate(time);
+ }
+
+ /**
+ * Vibrates the device with a given pattern.
+ *
+ * @param pattern Pattern with which to vibrate the device.
+ * Pass in an array of longs that
+ * are the durations for which to
+ * turn on or off the vibrator in
+ * milliseconds. The first value
+ * indicates the number of milliseconds
+ * to wait before turning the vibrator
+ * on. The next value indicates the
+ * number of milliseconds for which
+ * to keep the vibrator on before
+ * turning it off. Subsequent values
+ * alternate between durations in
+ * milliseconds to turn the vibrator
+ * off or to turn the vibrator on.
+ *
+ * @param repeat Optional index into the pattern array at which
+ * to start repeating, or -1 for no repetition (default).
+ */
+ public void vibrateWithPattern(long[] pattern, int repeat) {
+ Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE);
+ vibrator.vibrate(pattern, repeat);
+ }
+
+ /**
+ * Immediately cancels any currently running vibration.
+ */
+ public void cancelVibration() {
+ Vibrator vibrator = (Vibrator) this.cordova.getActivity().getSystemService(Context.VIBRATOR_SERVICE);
+ vibrator.cancel();
+ }
+}
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/index.js
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/index.js Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,80 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+var vibration;
+
+module.exports = {
+ vibrate: function (success, fail, args, env) {
+ var result = new PluginResult(args, env),
+ duration = args[0],
+ response = vibration.getInstance().vibrate(duration);
+ result.ok(response, false);
+ }
+};
+
+///////////////////////////////////////////////////////////////////
+// JavaScript wrapper for JNEXT plugin
+///////////////////////////////////////////////////////////////////
+
+JNEXT.Vibration = function () {
+ var self = this,
+ hasInstance = false;
+
+ self.vibrate = function (duration) {
+ //This is how Javascript calls into native
+ return JNEXT.invoke(self.m_id, "vibrate " + duration);
+ };
+
+ self.init = function () {
+ //Checks that the jnext library is present and loads it
+ if (!JNEXT.require("libVibration")) {
+ return false;
+ }
+
+ //Creates the native object that this interface will call
+ self.m_id = JNEXT.createObject("libVibration.Vibration");
+
+ if (self.m_id === "") {
+ return false;
+ }
+
+ //Registers for the JNEXT event loop
+ JNEXT.registerEvents(self);
+ };
+
+ self.m_id = "";
+
+ //Used by JNEXT library to get the ID
+ self.getId = function () {
+ return self.m_id;
+ };
+
+ //Not truly required but useful for instance management
+ self.getInstance = function () {
+ if (!hasInstance) {
+ self.init();
+ hasInstance = true;
+ }
+ return self;
+ };
+};
+
+vibration = new JNEXT.Vibration();
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/device/libVibration.so
Binary file Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/device/libVibration.so has changed
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.cpp
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.cpp Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,341 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+#include "plugin.h"
+#include "tokenizer.h"
+
+#ifdef _WINDOWS
+#include
+BOOL APIENTRY DllMain( HANDLE hModule,
+ DWORD ul_reason_for_call,
+ LPVOID lpReserved )
+{
+ return TRUE;
+}
+#else
+#include
+#include
+
+extern int errno;
+#endif
+
+SendPluginEv SendPluginEvent;
+
+string g_GetSysErrMsg( void )
+{
+ string strError = "Unknown";
+ // Problem loading
+#ifdef _WINDOWS
+ int nErrorCode = GetLastError();
+ LPTSTR s;
+ if ( ::FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL, nErrorCode, 0, ( LPTSTR ) &s, 0, NULL ) )
+ {
+ strError = s;
+ }
+ else
+ {
+ char szBuf[ 20 ];
+ _snprintf_s( szBuf, _countof(szBuf), 19, "%d", nErrorCode );
+ strError = szBuf;
+ }
+#else
+ char szError[80];
+ if ( strerror_r( errno, szError, sizeof(szError) ) )
+ {
+ strError = "no description found";
+ }
+ else
+ {
+ strError = szError;
+ }
+#endif
+ return strError;
+}
+
+void g_sleep( unsigned int mseconds )
+{
+#ifdef _WINDOWS
+ Sleep( mseconds );
+#else
+ usleep( mseconds * 1000 );
+#endif
+}
+
+string& g_trim( string& str )
+{
+ // Whitespace characters
+ char whspc[] = " \t\r\n\v\f";
+
+ // Whack off first part
+ size_t pos = str.find_first_not_of( whspc );
+
+ if ( pos != string::npos )
+ str.replace( 0, pos, "" );
+
+ // Whack off trailing stuff
+ pos = str.find_last_not_of( whspc );
+
+ if ( pos != string::npos )
+ str.replace( pos + 1, str.length() - pos, "" );
+
+ return str;
+}
+
+void g_tokenize( const string& str, const string& delimiters, vector& tokens )
+{
+ tokenize( str, tokens, delimiters );
+}
+
+char* SetEventFunc( SendPluginEv funcPtr )
+{
+ static char * szObjList = onGetObjList();
+ SendPluginEvent = funcPtr;
+ return szObjList;
+}
+
+
+const int nMAXSIZE = 512;
+char* g_pszRetVal = NULL;
+
+//-----------------------------------------------------------
+// Map from an object Id to an object instance
+//-----------------------------------------------------------
+typedef std::map StringToJExt_T;
+
+//-----------------------------------------------------------
+// Map from a browser context to an id mapping
+//-----------------------------------------------------------
+typedef std::map VoidToMap_T;
+
+VoidToMap_T g_context2Map;
+
+class GlobalSharedModule
+{
+
+public:
+ GlobalSharedModule( void )
+ {
+ g_pszRetVal = new char[ nMAXSIZE ];
+ }
+
+ ~GlobalSharedModule()
+ {
+ delete [] g_pszRetVal;
+
+ VoidToMap_T::iterator posMaps;
+
+ for ( posMaps = g_context2Map.begin(); posMaps != g_context2Map.end(); ++posMaps )
+ {
+ StringToJExt_T& id2Obj = *posMaps->second;
+ StringToJExt_T::iterator posMap;
+
+ for ( posMap = id2Obj.begin(); posMap != id2Obj.end(); ++posMap )
+ {
+ JSExt* pJSExt = posMap->second;
+
+ if ( pJSExt->CanDelete() )
+ {
+ delete pJSExt;
+ }
+ }
+
+ id2Obj.erase( id2Obj.begin(), id2Obj.end() );
+ }
+
+ g_context2Map.erase( g_context2Map.begin(), g_context2Map.end() );
+ }
+};
+
+GlobalSharedModule g_sharedModule;
+
+char* g_str2global( const string& strRetVal )
+{
+ int nLen = strRetVal.size();
+
+ if ( nLen >= nMAXSIZE )
+ {
+ delete [] g_pszRetVal;
+ g_pszRetVal = new char[ nLen + 1 ];
+ }
+
+ else
+ {
+ // To minimaize the number of memory reallocations, the assumption
+ // is that in most times this will be the case
+ delete [] g_pszRetVal;
+ g_pszRetVal = new char[ nMAXSIZE ];
+ }
+
+ strcpy( g_pszRetVal, strRetVal.c_str() );
+ return g_pszRetVal;
+}
+
+bool g_unregisterObject( const string& strObjId, void* pContext )
+{
+ // Called by the plugin extension implementation
+ // if the extension handles the deletion of its object
+
+ StringToJExt_T * pID2Obj = NULL;
+
+ VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+ if ( iter != g_context2Map.end() )
+ {
+ pID2Obj = iter->second;
+ }
+ else
+ {
+ return false;
+ }
+
+ StringToJExt_T& mapID2Obj = *pID2Obj;
+
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r == mapID2Obj.end() )
+ {
+ return false;
+ }
+
+ mapID2Obj.erase( strObjId );
+ return true;
+}
+
+char* InvokeFunction( const char* szCommand, void* pContext )
+{
+ StringToJExt_T * pID2Obj = NULL;
+
+ VoidToMap_T::iterator iter = g_context2Map.find( pContext );
+
+ if ( iter != g_context2Map.end() )
+ {
+ pID2Obj = iter->second;
+ }
+ else
+ {
+ pID2Obj = new StringToJExt_T;
+ g_context2Map[ pContext ] = pID2Obj;
+ }
+
+ StringToJExt_T& mapID2Obj = *pID2Obj;
+
+ string strFullCommand = szCommand;
+ vector arParams;
+ g_tokenize( strFullCommand, " ", arParams );
+ string strCommand = arParams[ 0 ];
+ string strRetVal = szERROR;
+
+ if ( strCommand == szCREATE )
+ {
+ string strClassName = arParams[ 1 ];
+ string strObjId = arParams[ 2 ];
+
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r != mapID2Obj.end() )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :Object already exists.";
+ return g_str2global( strRetVal );
+ }
+
+ JSExt* pJSExt = onCreateObject( strClassName, strObjId );
+
+ if ( pJSExt == NULL )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :Unknown object type ";
+ strRetVal += strClassName;
+ return g_str2global( strRetVal );
+ }
+
+ pJSExt->m_pContext = pContext;
+ mapID2Obj[ strObjId ] = pJSExt;
+
+ strRetVal = szOK;
+ strRetVal += strObjId;
+ return g_str2global( strRetVal );
+ }
+ else
+ if ( strCommand == szINVOKE )
+ {
+ string strObjId = arParams[ 1 ];
+ string strMethod = arParams[ 2 ];
+
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r == mapID2Obj.end() )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :No object found for id.";
+ return g_str2global( strRetVal );
+ }
+
+ JSExt* pJSExt = r->second;
+
+ size_t nLoc = strFullCommand.find( strObjId );
+
+ if ( nLoc == string::npos )
+ {
+ strRetVal += strObjId;
+ strRetVal += " :Internal InvokeMethod error.";
+ return g_str2global( strRetVal );
+ }
+
+ if ( strMethod == szDISPOSE )
+ {
+ StringToJExt_T::iterator r = mapID2Obj.find( strObjId );
+
+ if ( r == mapID2Obj.end() )
+ {
+ strRetVal = szERROR;
+ strRetVal += strObjId;
+ return g_str2global( strRetVal );
+ }
+
+ JSExt * pJSExt = mapID2Obj[ strObjId ];
+
+ if ( pJSExt->CanDelete() )
+ {
+ delete pJSExt;
+ }
+
+ mapID2Obj.erase( strObjId );
+ strRetVal = szOK;
+ strRetVal += strObjId;
+ return g_str2global( strRetVal );
+ }
+
+ size_t nSuffixLoc = nLoc + strObjId.size();
+ string strInvoke = strFullCommand.substr( nSuffixLoc );
+ strInvoke = g_trim( strInvoke );
+ strRetVal = pJSExt->InvokeMethod( strInvoke );
+ return g_str2global( strRetVal );
+ }
+
+ strRetVal += " :Unknown command ";
+ strRetVal += strCommand;
+ return g_str2global( strRetVal );
+}
+
+//%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
diff -r 000000000000 -r e8ccd40d0ef6 Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Touchgui/plugins/org.apache.cordova.vibration/src/blackberry10/native/public/plugin.h Thu Jun 04 14:50:33 2015 +0200
@@ -0,0 +1,91 @@
+/*
+ *
+ * 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.
+ *
+*/
+
+#ifndef _PLUGIN_H
+#define _PLUGIN_H
+
+#include