Updated Branches: refs/heads/master e7519214d -> 0d61d10b1
[CB-3694] first pass wp8 support Project: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/repo Commit: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/commit/0d61d10b Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/0d61d10b Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/0d61d10b Branch: refs/heads/master Commit: 0d61d10b10bc6b2c148f3b1ce3cdcc89771d8ae9 Parents: e751921 Author: Benn Mapes <[email protected]> Authored: Mon Jun 24 15:34:35 2013 -0700 Committer: Benn Mapes <[email protected]> Committed: Mon Jun 24 15:34:35 2013 -0700 ---------------------------------------------------------------------- plugin.xml | 15 +++++++++++++++ src/wp8/GeoLocation.cs | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/0d61d10b/plugin.xml ---------------------------------------------------------------------- diff --git a/plugin.xml b/plugin.xml index b0aed14..3716806 100644 --- a/plugin.xml +++ b/plugin.xml @@ -70,5 +70,20 @@ id="org.apache.cordova.core.GeoBroker" <source-file src="src/wp7/GeoLocation.cs" /> </platform> + + <!-- wp8 --> + <platform name="wp8"> + <config-file target="config.xml" parent="/*"> + <feature name="GeoLocation"> + <param name="wp-package" value="GeoLocation"/> + </feature> + </config-file> + + <config-file target="Properties/WMAppManifest.xml" parent="/Deployment/App/Capabilities"> + <Capability Name="ID_CAP_LOCATION" /> + </config-file> + + <source-file src="src/wp8/GeoLocation.cs" /> + </platform> </plugin> http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/0d61d10b/src/wp8/GeoLocation.cs ---------------------------------------------------------------------- diff --git a/src/wp8/GeoLocation.cs b/src/wp8/GeoLocation.cs new file mode 100644 index 0000000..c53cb29 --- /dev/null +++ b/src/wp8/GeoLocation.cs @@ -0,0 +1,34 @@ +/* + 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.Collections.Generic; +using System.Runtime.Serialization; +using System.Threading; +using System.Device.Location; + +namespace WPCordovaClassLib.Cordova.Commands +{ + /// <summary> + /// This is a command stub, the browser provides the correct implementation. We use this to trigger the static analyzer that we require this permission + /// </summary> + public class GeoLocation + { + /* Unreachable code, by design -jm */ + private void triggerGeoInclusion() + { + new GeoCoordinateWatcher(); + } + } +}
