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

Using Android Autobackup causes wrong runtime permission status #304

Closed
dpa99c opened this issue May 14, 2018 · 0 comments
Closed

Using Android Autobackup causes wrong runtime permission status #304

dpa99c opened this issue May 14, 2018 · 0 comments
Labels
bug Something isn't working properly

Comments

@dpa99c
Copy link
Owner

dpa99c commented May 14, 2018

I'm submitting a ... (check one with "x"):

  • [x ] bug report

Bug report

Plugin versions affected: v4.0.6 and below

Current behavior:

Currently on Android, the plugin stores a flag in HTML5 local storage when a runtime permission is first requested. This is so the plugin can differentiate between NOT_REQUESTED vs PERMANENTLY_DENIED status since natively, the Android runtime permissions API does not distinguish between these states.

However, if you use Android Autobackup in your app, HTML5 local storage will automatically be restored on new app installs, causing the plugin to mistakenly determine a permission has been PERMANENTLY_DENIED when in fact its true status is NOT_REQUESTED.

Expected behavior:

When using Android Autobackup, permission statuses of PERMANENTLY_DENIED vs NOT_REQUESTED should be correctly determined.

Resolution

The solution would seem to be to store the permission request flags using a storage which is not automatically restored when using AutoBackup and can therefore be relied upon to be reset up each new app install.

@dpa99c dpa99c added the bug Something isn't working properly label May 14, 2018
@dpa99c dpa99c closed this as completed in dc2c412 May 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

1 participant