Skip to content
This repository was archived by the owner on May 15, 2024. It is now read-only.
This repository was archived by the owner on May 15, 2024. It is now read-only.

Permissions requests and threading #373

@Ryan-Palmer

Description

@Ryan-Palmer

I recently had an issue using the location plugin from F#, where the first location request would never return after granting permissions.

This can be found initially here
#288
then here
#314

The TL;DR is that I was accidentally using the plugin off the UI thread.

Permissions request must however be made on the UI thread as they need to show a dialog etc

My suggestion is either that

a.) permissions requests that come from background threads, either directly or via other plugins like location, throw an exception to alert the user that they are on the wrong thread

b.) alternatively those requests might be diverted to the main thread, and then continue on the original background thread after returning. Perhaps this could be done with some kind of combination of the main thread dispatch plugin and using ConfigureAwait on the TaskCompletionSource internally? I haven't thought it through that much.

Metadata

Metadata

Labels

bugSomething isn't workingquestionFurther information is requested

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions