Support requesting permissions without locking the Swipe#678
Support requesting permissions without locking the Swipe#678paolorotolo merged 1 commit intomasterfrom
Conversation
Make sure we don't have to `setSwipeLock(true)` if the user is requesting a permission. This is achieved by requesting the permission during the `onPageScrolled`. If the permission is denied, AppIntro will go to the previous slide. Fix #676
|
@cortinico I will run it ASAP, just a quick suggestion(after looking at the GIF): I think the permissions request should fire when the user tries to leave the permission slide by swiping and not when the slide is opened. |
|
Ideally yes, but that approach is harder to maintain and probably not worth the effort.
Ideally a "good" intro will:
1) show the user why a permission is requested on slide X
2) Let the user swipe to slide X+1
3) When slide X+1 is selected will request permission
4a) If permission is accepted: user will see the slide X+1 with a "thank you for giving permission"
4b) If permission is denied: user will bump back to slide X with the explanation on why they should give permission.
Having this approach will also simplify the handling of all the swipe
events when the Permission dialog is displayed (and will simplify the code).
|
|
@cortinico Fair Point |
|
@cortinico Another Workaround: We add a button that says"Grant Permissions" on the permission slide and disable swipe right. So, the user selects slide X, then swipes right to go to slide X+1 where swipe right is disabled and a button appears that asks to grant permission. |
|
Something like this: https://drive.google.com/file/d/1-7n4X8xUl4LFqFFZo9a2fXO0WD_sfJpG/view?usp=drivesdk |
|
A button "Grant Permission" can always be added by the user of the library
if they provide a custom layout.
The `askForPermissions` method that we provide in AppIntroBase is more like
a utility to simplify Permission handling but the user is free to go custom
if he wants.
|
paolorotolo
left a comment
There was a problem hiding this comment.
Yeah, I'm ok with the new behaviour.
We probably need to update the README too since devs might need to change the order of their slides.
|
@cortinico @paolorotolo I don't think this behaviour should be there. I will submit a new PR that uses my approach in #676 in a much more efficient way.(soon) |
|
Sure, feel free to :) |
|
@cortinico how to implement this? :) |
Hey @gcantoni This is currently on master. Will be released with the upcoming version of AppIntro (6.0.0) |
Make sure we don't have to
setSwipeLock(true)if the user isrequesting a permission. This is achieved by requesting the permission
during the
onPageScrolled. If the permission is denied, AppIntro willgo to the previous slide.
Example:

Fix #676
Ping @AnuthaDev