You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by infil00p <gi...@git.apache.org> on 2015/09/30 21:48:26 UTC
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
GitHub user infil00p opened a pull request:
https://github.com/apache/cordova-android/pull/223
Cordova-Android 5.0/Marshmallow Updates - Take 2
This has some changes based on the feedback from Pull Request #220
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/infil00p/cordova-android smores
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cordova-android/pull/223.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #223
----
commit d3044f3524866a0056f0c2632b5fdb68eafdf0f3
Author: Joe Bowser <bo...@apache.org>
Date: 2015-07-14T21:31:07Z
Commiting code to handle permissions, and the special case of the Geolocation Plugin
commit e62696e72e36a62304f39ecf3a8fae5148a36072
Author: Joe Bowser <bo...@apache.org>
Date: 2015-07-14T21:58:55Z
Finally got it kinda working, Geolocation is not going to work in browser anymore
commit e766eaed2826110cca3afd561c2efe9a7f91d804
Author: Joe Bowser <bo...@apache.org>
Date: 2015-08-20T20:47:57Z
Bump up to API level 23
commit d42c53b0c7fb04f372fa711dd0481c33be5bf0fe
Author: Joe Bowser <bo...@apache.org>
Date: 2015-08-28T23:50:16Z
Refactoring based on feedback from Andrew
commit e00cae122c246c7e8aa468460ff25ea7671d8ceb
Author: Joe Bowser <bo...@apache.org>
Date: 2015-08-31T22:32:53Z
Got the PoC working with the Contacts plugin, going to work through all the plugins
commit 10c913268555f5f7745e3d70419ee0efaf1afd96
Author: Joe Bowser <bo...@apache.org>
Date: 2015-09-18T20:52:12Z
Working on getting the Geolocation Plugin to work by default with the default WebView. Crosswalk will need to make similar modifications.
commit 9825a0f2f54a401fd240d6571ffc7f0a71254899
Author: Joe Bowser <bo...@apache.org>
Date: 2015-09-24T21:55:30Z
Manually updating version to 5.0.0-dev for engine tags
commit c2a84323f2d9046c6ab84f3eefd4675871af31c3
Author: Joe Bowser <bo...@apache.org>
Date: 2015-09-30T19:20:40Z
Refactor of the Cordova Plugin/Permissions API
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-android/pull/223#discussion_r41164437
--- Diff: framework/src/org/apache/cordova/CordovaInterface.java ---
@@ -69,4 +69,20 @@ Licensed to the Apache Software Foundation (ASF) under one
* Returns a shared thread pool that can be used for background tasks.
*/
public ExecutorService getThreadPool();
+
+ /**
+ * Sends a permission request to the activity for one permission.
+ */
+ public void requestPermission(CordovaPlugin plugin, int requestCode, String permission);
+
+ /**
+ * Sends a permission request to the activity for a group of permissions
+ */
+ public void requestPermissions(CordovaPlugin plugin, int requestCode, String [] permissions);
--- End diff --
Thanks for making the change! :+1:
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-android/pull/223#discussion_r42330756
--- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
@@ -359,4 +361,38 @@ public boolean onReceivedClientCertRequest(CordovaWebView view, ICordovaClientCe
*/
public void onConfigurationChanged(Configuration newConfig) {
}
+
+ /**
+ * Called by the Plugin Manager when we need to actually request permissions
+ *
+ * @param requestCode Passed to the activity to track the request
+ *
+ * @return Returns the permission that was stored in the plugin
+ */
+
+ public void requestPermissions(int requestCode) {
--- End diff --
The design feels a bit hacky - designed around how geolocation plugin has to do this. In fact, your changes for camera plugin for Masrhmallow don't override this method and the `hasPermission` method. What's the guidance to a cordova plugin should they care to override this or not?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
Posted by chaffeqa <gi...@git.apache.org>.
Github user chaffeqa commented on the pull request:
https://github.com/apache/cordova-android/pull/223#issuecomment-149679498
:+1: thanks a ton @infil00p !
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
Posted by infil00p <gi...@git.apache.org>.
Github user infil00p commented on the pull request:
https://github.com/apache/cordova-android/pull/223#issuecomment-149619074
I rebased this into the repository, closing.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-android/pull/223#discussion_r41170824
--- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
@@ -40,6 +42,7 @@ Licensed to the Apache Software Foundation (ASF) under one
public CordovaInterface cordova;
protected CordovaPreferences preferences;
private String serviceName;
+ protected String [] permissions;
--- End diff --
I feel this is somewhat confusing. What is the derived plugin supposed to with this field? I do not see any of the core plugins doing anything with this field. Did I miss something?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
Posted by nikhilkh <gi...@git.apache.org>.
Github user nikhilkh commented on a diff in the pull request:
https://github.com/apache/cordova-android/pull/223#discussion_r41171305
--- Diff: framework/src/org/apache/cordova/CordovaPlugin.java ---
@@ -40,6 +42,7 @@ Licensed to the Apache Software Foundation (ASF) under one
public CordovaInterface cordova;
protected CordovaPreferences preferences;
private String serviceName;
+ protected String [] permissions;
--- End diff --
Each of the core plugins are creating their own version of this field either on the instance or `static`. This can be quite confusing. How would you explain to a plugin developer - what they are expected to do with this field.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org
[GitHub] cordova-android pull request: Cordova-Android 5.0/Marshmallow Upda...
Posted by infil00p <gi...@git.apache.org>.
Github user infil00p closed the pull request at:
https://github.com/apache/cordova-android/pull/223
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org