Repository: kivy/python-for-android

Issue:
Match official requestPermissions interface
The Android API for requesting runtime permission has the following signature:
```java
void requestPermissions (Activity activity,
                String[] permissions,
                int requestCode)
```
Currently via our `PythonActivity.java` class, we're providing:
```java
public void requestNewPermission(String permission)
```
See https://github.com/kivy/python-for-android/blob/02519cc/pythonforandroid/bootstraps/sdl2/build/src/main/java/org/kivy/android/PythonActivity.java#L608
It would be great if our interface was also somewhat matching the official name/signature.

- official documentation [ActivityCompat#requestPermissions()](https://developer.android.com/reference/android/support/v4/app/ActivityCompat#requestPermissions(android.app.Activity,%20java.lang.String[],%20int))
- PR discussion https://github.com/kivy/python-for-android/pull/1528#discussion_r255345553

This would be a non-breaking change since we can keep our current `requestNewPermission()` method and just add the new `requestPermissions()` one.


Discussion:
The `android` module, the only one that directly calls this, is bundled with p4a anyway (in an always-compatible version as a natural consequence). So why would there a need to keep the old signaure around?
Yes that's also a true. Then at least the android permission module should still provide some backward compatible interface. Currently it's `def request_permission(permission):` and we should also have a `def request_permissions(permissions):`
yeah for the android module it makes sense to keep both I suppose (`request_permission` and `request_permissions`). As for the strings, even the android module also already takes strings, the predefined constants are just for nicer code and don't need to be actually used (but of course it would need to be taught to also take an array of strings)
Yes that's what I mean, it should take an array of string

Resolving patch:
diff --git a/pythonforandroid/recipes/android/src/android/permissions.py b/pythonforandroid/recipes/android/src/android/permissions.py
--- a/pythonforandroid/recipes/android/src/android/permissions.py
+++ b/pythonforandroid/recipes/android/src/android/permissions.py
@@ -421,9 +421,13 @@ class Permission:
         )
 
 
-def request_permission(permission):
+def request_permissions(permissions):
     python_activity = autoclass('org.kivy.android.PythonActivity')
-    python_activity.requestNewPermission(permission + "")
+    python_activity.requestPermissions(permissions)
+
+
+def request_permission(permission):
+    request_permissions([permission])
 
 
 def check_permission(permission):
diff --git a/pythonforandroid/recipes/pyjnius/__init__.py b/pythonforandroid/recipes/pyjnius/__init__.py
--- a/pythonforandroid/recipes/pyjnius/__init__.py
+++ b/pythonforandroid/recipes/pyjnius/__init__.py
@@ -6,7 +6,9 @@
 
 
 class PyjniusRecipe(CythonRecipe):
-    version = '1.1.3'
+    # "6553ad4" is one commit after last release (1.2.0)
+    # it fixes method resolution, required for resolving requestPermissions()
+    version = '6553ad4'
     url = 'https://github.com/kivy/pyjnius/archive/{version}.zip'
     name = 'pyjnius'
     depends = [('genericndkbuild', 'sdl2', 'sdl'), 'six']


Test patch: