mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
app/internal/window: [Android] replace RegisterFragment with Do
Do is a function for accessing the underlying Android View in a safe context, the main thread. Do is - more general than RegisterFragment and may be expanded to other platforms - simpler to implement (from the Gio side) and as a bonus, the Do implementation avoids a race condition where a call to RegisterFragment during an Activity re-create would be ignored. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -37,10 +37,14 @@ program's source code:
|
||||
Android -- Dangerous Permissions
|
||||
|
||||
Certain permissions on Android are marked with a protection level of
|
||||
"dangerous". This means that, in addition to including the relevant Gio
|
||||
permission packages, your app will need to prompt the user specifically
|
||||
to request access. This can be done with a java Fragment, installed using
|
||||
(*app.Window).RegisterFragment(). For more information on dangerous
|
||||
permissions, see: https://developer.android.com/guide/topics/permissions/overview#dangerous_permissions
|
||||
"dangerous". This means that, in addition to including the relevant
|
||||
Gio permission packages, your app will need to prompt the user
|
||||
specifically to request access. To access the Android Activity
|
||||
required for prompting, use the Do method on Window. Do exposes
|
||||
the underlying Android View, on which the getContext method returns
|
||||
the Activity.
|
||||
|
||||
For more information on dangerous permissions, see:
|
||||
https://developer.android.com/guide/topics/permissions/overview#dangerous_permissions
|
||||
*/
|
||||
package permission
|
||||
|
||||
Reference in New Issue
Block a user