Skip to content

Android: Fix geolocation help dialog display logic - #1302

Open
g-maxime wants to merge 1 commit into
MediaArea:masterfrom
g-maxime:permission-request
Open

Android: Fix geolocation help dialog display logic#1302
g-maxime wants to merge 1 commit into
MediaArea:masterfrom
g-maxime:permission-request

Conversation

@g-maxime

Copy link
Copy Markdown
Contributor

Fixes #1301

Snapshot

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR adjusts Android geolocation (ACCESS_MEDIA_LOCATION) permission prompting behavior in ReportListActivity to avoid showing the geolocation help dialog in situations where the permission prompt is blocked, and to alter when the explanatory dialog is shown.

Changes:

  • Removes the “geolocation help” dialog and its trigger path from onRequestPermissionsResult.
  • Updates requestMediaLocationPermission() to show the geolocation summary dialog only when shouldShowRequestPermissionRationale(...) returns true; otherwise it directly calls requestPermissions(...).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +175 to +179
if (shouldShowRequestPermissionRationale(android.Manifest.permission.ACCESS_MEDIA_LOCATION)) {
MaterialAlertDialogBuilder(this)
.setTitle(R.string.permissions_geolocation_title)
.setMessage(R.string.permissions_geolocation_summary)
.setPositiveButton(android.R.string.ok) { _, _ ->
Signed-off-by: Maxime Gervais <gervais.maxime@gmail.com>
@g-maxime
g-maxime force-pushed the permission-request branch from ef6260b to 2381fa1 Compare July 28, 2026 17:36

@cjee21 cjee21 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Works fine. Seems some users do not really understand Android's permission system and may 'complain' that MediaInfo 'bypasses' permission by still being able to access media after denying permission (there is a review on Google Play about no permissions asked previously) but there is no way to fully satisfy everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Android Geolocation data access multiple requests

3 participants