You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2015/10/28 20:00:49 UTC

[6/6] cordova-plugin-geolocation git commit: Tweaking the geolocation plugin to contain all the permissions code. Sadly, we have to do this.

Tweaking the geolocation plugin to contain all the permissions code.  Sadly, we have to do this.


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/3f0c0636
Tree: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/tree/3f0c0636
Diff: http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/diff/3f0c0636

Branch: refs/heads/master
Commit: 3f0c06368a02c0921e44562a60da7d3833f9926c
Parents: cc7e3cb
Author: Joe Bowser <bo...@apache.org>
Authored: Tue Oct 6 13:29:03 2015 -0700
Committer: Joe Bowser <bo...@apache.org>
Committed: Wed Oct 28 12:00:27 2015 -0700

----------------------------------------------------------------------
 src/android/Geolocation.java | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-plugin-geolocation/blob/3f0c0636/src/android/Geolocation.java
----------------------------------------------------------------------
diff --git a/src/android/Geolocation.java b/src/android/Geolocation.java
index 3db8a56..79c6d2c 100644
--- a/src/android/Geolocation.java
+++ b/src/android/Geolocation.java
@@ -89,9 +89,19 @@ public class Geolocation extends CordovaPlugin {
                 return false;
             }
         }
-
         return true;
     }
 
+    /*
+     * We override this so that we can access the permissions variable, which no longer exists in
+     * the parent class, since we can't initialize it reliably in the constructor!
+     */
+
+    public void requestPermissions(int requestCode)
+    {
+        cordova.requestPermissions(this, requestCode, permissions);
+    }
+
+
 
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org