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
Runtime permissions - External Storage permission #3118
Runtime permissions - External Storage permission #3118
Conversation
The change to I'd like us to use the same approach for "save attachment" instead of requesting external storage permission when saving attachments. See #2844. We still allow the user to move the message database to external storage. In that case we also need to request the permission. |
Yeah, I saw this is as a short term easier fix. I'll remove it for Accounts though. |
WHAT THIS HOPEFULLY DOES DO: * Update gradle plugin to latest to date in Android Studio 3.1 beta 1 * Update gradle from 3.3 to 4.5 release * Update target API from 22 to 27 (min now 14) * Update to Java 1.8 * Enable new Dex compiler * Use new "implementation" syntax in build.gradle * Update (most?) non-testing google/3rd party libraries to latest * Add simple default notification channel (for Android 8+ compatibility) THIS DOES NOT: * Do a full material conversion (I see this was already started in PR thunderbird#3124) although it has been tested on chromebooks with material design and looks cool. * Check runtime permissions (this has been started in PR thunderbird#3118). If you don't manually grant permissions in settings, it will likely crash. * Update most testImplementation libraries
WHAT THIS HOPEFULLY DOES DO: * Update gradle plugin to latest to date in Android Studio 3.1 beta 1 * Update gradle from 3.3 to 4.5 release * Update target API from 22 to 27 (min now 14) * Update to Java 1.8 * Enable new Dex compiler * Use new "implementation" syntax in build.gradle * Update (most?) non-testing google/3rd party libraries to latest * Add simple default notification channel (for Android 8+ compatibility) THIS DOES NOT: * Do a full material conversion (I see this was already started in PR thunderbird#3124) although it has been tested on chromebooks with material design and looks cool. * Check runtime permissions (this has been started in PR thunderbird#3118). If you don't manually grant permissions in settings, it will likely crash. * Update most testImplementation libraries
The approach was to make it so that any K9Activity can easily request whatever permission in the future. The Contacts permission is now requested in two locations: 1. When a list of Messages is displayed 2. When a new message is first started to be composed. The permission request is displayed ONCE per onCreate(). Any more than this and it got really annoying. A typical user who reads or writes emails WILL see the request, trust me. Once they see the message 2x, they also have the option to block the requests from appearing. If they DECLINE the request (or decline + DENY any further attempts), the app should continues to work, albeit without incorporating contact data (thumbnails, autocomplete, etc.). Contacts may still be added to the Contacts app, as this uses an Intent and does not require any permission. Once the Read Contacts permission is enabled, the app immediately begins to use it. To add other permissions in the future (such as External Storage access), the request can be made in a similar way and the permission request result handled appropriately by just adding it to K9Activity (or overriding in a particular Activity). I did *not* implement this for external storage access, as 1. there is a PR waiting (thunderbird#3118) and 2. I think that using the Storage Access Framework is a much better way to approach that as suggested in Issue thunderbird#2844. I noticed there are 3 additional custom permissions in the manifest having to do with other apps controlling K9, but I don't think they're required by k9 itself. If so, they can be requested from any K9Activity.
WHAT THIS HOPEFULLY DOES DO: * Update gradle plugin to latest to date in Android Studio 3.1 beta 1 * Update gradle from 3.3 to 4.5 release * Update target API from 22 to 27 (min now 14) * Update to Java 1.8 * Enable new Dex compiler * Use new "implementation" syntax in build.gradle * Update (most?) non-testing google/3rd party libraries to latest * Add simple default notification channel (for Android 8+ compatibility) THIS DOES NOT: * Do a full material conversion (I see this was already started in PR thunderbird#3124) although it has been tested on chromebooks with material design and looks cool. * Check runtime permissions (this has been started in PR thunderbird#3118). If you don't manually grant permissions in settings, it will likely crash. * Update most testImplementation libraries
The approach was to make it so that any K9Activity can easily request whatever permission in the future. The Contacts permission is now requested in two locations: 1. When a list of Messages is displayed 2. When a new message is first started to be composed. The permission request is displayed ONCE per onCreate(). Any more than this and it got really annoying. A typical user who reads or writes emails WILL see the request, trust me. Once they see the message 2x, they also have the option to block the requests from appearing. If they DECLINE the request (or decline + DENY any further attempts), the app should continues to work, albeit without incorporating contact data (thumbnails, autocomplete, etc.). Contacts may still be added to the Contacts app, as this uses an Intent and does not require any permission. Once the Read Contacts permission is enabled, the app immediately begins to use it. To add other permissions in the future (such as External Storage access), the request can be made in a similar way and the permission request result handled appropriately by just adding it to K9Activity (or overriding in a particular Activity). I did *not* implement this for external storage access, as 1. there is a PR waiting (thunderbird#3118) and 2. I think that using the Storage Access Framework is a much better way to approach that as suggested in Issue thunderbird#2844. I noticed there are 3 additional custom permissions in the manifest having to do with other apps controlling K9, but I don't think they're required by k9 itself. If so, they can be requested from any K9Activity.
WHAT THIS HOPEFULLY DOES DO: * Update gradle plugin to latest to date in Android Studio 3.1 beta 1 * Update gradle from 3.3 to 4.5 release * Update target API from 22 to 27 (min now 14) * Update to Java 1.8 * Enable new Dex compiler * Use new "implementation" syntax in build.gradle * Update (most?) non-testing google/3rd party libraries to latest * Add simple default notification channel (for Android 8+ compatibility) THIS DOES NOT: * Do a full material conversion (I see this was already started in PR thunderbird#3124) although it has been tested on chromebooks with material design and looks cool. * Check runtime permissions (this has been started in PR thunderbird#3118). If you don't manually grant permissions in settings, it will likely crash. * Update most testImplementation libraries
The approach was to make it so that any K9Activity can easily request whatever permission in the future. The Contacts permission is now requested in two locations: 1. When a list of Messages is displayed 2. When a new message is first started to be composed. The permission request is displayed ONCE per onCreate(). Any more than this and it got really annoying. A typical user who reads or writes emails WILL see the request, trust me. Once they see the message 2x, they also have the option to block the requests from appearing. If they DECLINE the request (or decline + DENY any further attempts), the app should continues to work, albeit without incorporating contact data (thumbnails, autocomplete, etc.). Contacts may still be added to the Contacts app, as this uses an Intent and does not require any permission. Once the Read Contacts permission is enabled, the app immediately begins to use it. To add other permissions in the future (such as External Storage access), the request can be made in a similar way and the permission request result handled appropriately by just adding it to K9Activity (or overriding in a particular Activity). I did *not* implement this for external storage access, as 1. there is a PR waiting (thunderbird#3118) and 2. I think that using the Storage Access Framework is a much better way to approach that as suggested in Issue thunderbird#2844. I noticed there are 3 additional custom permissions in the manifest having to do with other apps controlling K9, but I don't think they're required by k9 itself. If so, they can be requested from any K9Activity.
WHAT THIS HOPEFULLY DOES DO: * Update gradle plugin to latest to date in Android Studio 3.1 beta 1 * Update gradle from 3.3 to 4.5 release * Update target API from 22 to 27 (min now 14) * Update to Java 1.8 * Enable new Dex compiler * Use new "implementation" syntax in build.gradle * Update (most?) non-testing google/3rd party libraries to latest * Add simple default notification channel (for Android 8+ compatibility) THIS DOES NOT: * Do a full material conversion (I see this was already started in PR thunderbird#3124) although it has been tested on chromebooks with material design and looks cool. * Check runtime permissions (this has been started in PR thunderbird#3118). If you don't manually grant permissions in settings, it will likely crash. * Update most testImplementation libraries
The approach was to make it so that any K9Activity can easily request whatever permission in the future. The Contacts permission is now requested in two locations: 1. When a list of Messages is displayed 2. When a new message is first started to be composed. The permission request is displayed ONCE per onCreate(). Any more than this and it got really annoying. A typical user who reads or writes emails WILL see the request, trust me. Once they see the message 2x, they also have the option to block the requests from appearing. If they DECLINE the request (or decline + DENY any further attempts), the app should continues to work, albeit without incorporating contact data (thumbnails, autocomplete, etc.). Contacts may still be added to the Contacts app, as this uses an Intent and does not require any permission. Once the Read Contacts permission is enabled, the app immediately begins to use it. To add other permissions in the future (such as External Storage access), the request can be made in a similar way and the permission request result handled appropriately by just adding it to K9Activity (or overriding in a particular Activity). I did *not* implement this for external storage access, as 1. there is a PR waiting (thunderbird#3118) and 2. I think that using the Storage Access Framework is a much better way to approach that as suggested in Issue thunderbird#2844. I noticed there are 3 additional custom permissions in the manifest having to do with other apps controlling K9, but I don't think they're required by k9 itself. If so, they can be requested from any K9Activity.
Can this be closed in favor of #3818? |
Yup 👍 |
Contacts is more deeply embedded so that's a bit more work. But here's a PR for the external storage permission handling.