Skip to content

fix(location): deny instead of hanging when no prompt can show - #91

Merged
dargmuesli merged 1 commit into
mainfrom
fix/location/permission-prompt
Nov 25, 2026
Merged

dargmuesli merged 1 commit into
mainfrom
fix/location/permission-prompt

Conversation

@dargmuesli

Copy link
Copy Markdown
Member

Since Android 14, a service bound by a visible app may only start activities when the binding app passes Context.BIND_ALLOW_ACTIVITY_STARTS, and androidx.browser, which the browser uses to bind DelegationService, does not pass it. So when the web app asks for the location and the app lacks the permission, the library's PermissionRequestActivity is blocked as a background activity launch, no prompt appears, and the web app's request never settles. This is the problem reported in GoogleChrome/android-browser-helper#499.

DelegationService now answers the browser's location permission check without success on Android 14 and later while the permission is missing, which the browser treats as a denial, so the web app gets an error right away and can point users to the app's settings. Once the permission is granted there, the next request succeeds without restarting the browser. The workaround can go once the browser binds with the flag again.

@dargmuesli dargmuesli added the no-play-notes Releases without Google Play release notes, since users notice nothing label Nov 25, 2026
@dargmuesli
dargmuesli merged commit 964ee5b into main Nov 25, 2026
10 of 11 checks passed
@dargmuesli
dargmuesli deleted the fix/location/permission-prompt branch November 25, 2026 18:05
maevsi-bot pushed a commit that referenced this pull request Nov 25, 2026
## [0.8.1](0.8.0...0.8.1) (2026-11-25)

### Bug Fixes

* **location:** deny instead of hanging when no prompt can show ([#91](#91)) ([964ee5b](964ee5b))
@maevsi-bot

Copy link
Copy Markdown

🎉 This PR is included in version 0.8.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@dargmuesli dargmuesli removed the no-play-notes Releases without Google Play release notes, since users notice nothing label Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants