Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix googlemaps not displaying gmscore requesting location permission … #2233

Closed

Conversation

DaVinci9196
Copy link
Contributor

Fixed the problem that the location permission of Google Maps does not pop up when entering gmscore for the first time. Fixed the issue where gmscore’s location permission request would only run once

Copy link
Member

@mar-v-in mar-v-in left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Google Maps invokes the location settings implemented via #2216. We can use those settings to also request permissions for microG if necessary, allowing for cleaner integration as calling the location settings is expected by the caller.

} else {
completable.complete(false)
}
val permissionRequest = activePermissionRequestLock.withLock {CompletableDeferred<Boolean>()}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can cause the activity to be invoked multiple times, we only want to start it once

private val requestManager by lazy { LocationRequestManager(context, lifecycle, postProcessor, database) { onRequestManagerUpdated() } }
private val requestManager by lazy { LocationRequestManager(context, lifecycle, postProcessor, database) {
lifecycleScope.launchWhenStarted {
ensurePermissions()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem to be the right spot for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have any good suggestions, since I haven't found a more suitable place.

@mar-v-in mar-v-in modified the milestone: 0.3.1 Mar 19, 2024
@DaVinci9196 DaVinci9196 deleted the fix_location_permissions branch May 6, 2024 02:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants