comparison cagou/core/platform_/base.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 4d660b252487
children 355326a3501c
comparison
equal deleted inserted replaced
399:672880661797 400:71f51198478c
73 pass 73 pass
74 74
75 def updateParamsExtra(self, extra): 75 def updateParamsExtra(self, extra):
76 pass 76 pass
77 77
78 def check_plugin_permissions(self, plug_info, callback, errback):
79 """Check that plugin permissions for this platform are granted"""
80 callback()
81
78 def open_url(self, url, wid=None): 82 def open_url(self, url, wid=None):
79 """Open an URL in the way appropriate for the platform 83 """Open an URL in the way appropriate for the platform
80 84
81 @param url(str): URL to open 85 @param url(str): URL to open
82 @param wid(CagouWidget, None): widget requesting the opening 86 @param wid(CagouWidget, None): widget requesting the opening