diff cagou/plugins/plugin_transfer_voice.py @ 400:71f51198478c

android: handle runtime permissions: - some mandatory permissions are requested on Cagou start, Cagou won't start at all and display a warning message if they are not granted (we request 5 times before showing the warning) - transfer plugin can now use "android_permissions" in plugin_info, to indicate what is necessary. The permissions will then be requested, and the plugin widget won't be shown if they are not granted (and a warning not will then be displayed)
author Goffi <goffi@goffi.org>
date Sun, 09 Feb 2020 23:47:29 +0100
parents 1da3c379205b
children 3c9ba4a694ef
line wrap: on
line diff
--- a/cagou/plugins/plugin_transfer_voice.py	Sun Feb 09 23:47:29 2020 +0100
+++ b/cagou/plugins/plugin_transfer_voice.py	Sun Feb 09 23:47:29 2020 +0100
@@ -36,6 +36,7 @@
     "platforms": ["android"],
     "description": _("transmit a voice record"),
     "icon_medium": "{media}/icons/muchoslava/png/micro_off_50.png",
+    "android_permissons": ["RECORD_AUDIO"],
 }