comparison 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
comparison
equal deleted inserted replaced
399:672880661797 400:71f51198478c
34 "name": _("voice"), 34 "name": _("voice"),
35 "main": "VoiceRecorder", 35 "main": "VoiceRecorder",
36 "platforms": ["android"], 36 "platforms": ["android"],
37 "description": _("transmit a voice record"), 37 "description": _("transmit a voice record"),
38 "icon_medium": "{media}/icons/muchoslava/png/micro_off_50.png", 38 "icon_medium": "{media}/icons/muchoslava/png/micro_off_50.png",
39 "android_permissons": ["RECORD_AUDIO"],
39 } 40 }
40 41
41 42
42 class VoiceRecorder(BoxLayout): 43 class VoiceRecorder(BoxLayout):
43 callback = properties.ObjectProperty() 44 callback = properties.ObjectProperty()