Translucent animation flickering when checking for already granted permission #81
Comments
@Serchinastico Any thoughts on this? |
Hi @rfgamaral First of all, sorry for the late response. This is a known issue, is worded differently in #47 but the cause is the same. As you said, we are creating the Dexter activity even in cases where it's not needed. There is a PR, #73, that solves the issue and its ready to be released for v3.0.0. We still have to do some more testing before doing the release, I'll try to prepare a SNAPSHOT version just in case you want to see by yourself if it solves your problem. I'll close the issue once v3.0.0 is released. Thanks for reporting, cheers! |
Didn't notice #47 was the same issue I was having... A SNAPSHOT version would be great and I could help testing new stuff if you want. I suppose v3 is going to be breaking because of the fluent API, correct? Is that the only breaking change? |
Yes, v3.0.0 changes the API by a fluent version and makes error handling using a callback instead of exception-driven. We just published a snapshot version with sonatype. If you want to give it a try you probably will need to allow snapshot versions explicitly and download it from there. Let us know how that goes. |
I'm trying to convert my code to the fluent API but I'm not sure I'm doing it right... Before:
Now:
Is there something I'm missing? Does it look good? |
I just tested the implementation above and all seems to be working. Permissions are requested as usual and no more transparent activity, yeaaaaaah. Good job :) Let me know if there's any way I'm missing with the new fluent API to simplify my code above. I know this is just a SNAPSHOT, but how stable for production do you think this is? |
Hi @rfgamaral Your code looks good! It might need some more lines but, hopefully, the new API will make it harder for newcomers to write buggy code. It's also way better for us, with this new API we will be able to add new features to Dexter avoiding the myriad of methods we had before (optional parameters forced us to duplicate methods). I really can't answer you to the last question, we've been doing a lot of testing but we need some more time. In the end, it's a snapshot version, so it shouldn't be used in production at all (things are susceptible to change and may break your build). Thank you very much for your time and contributions 😄 |
What do you mean?
No problem. I just wish I had more time to contribute to open-source projects :) P.S: Feel free to close this issue if you want :) |
I mean that perhaps the fluent API is more verbose than the old one but that's fine, there is nothing wrong with your code 😋 I'll close it for now! |
Expected behaviour
If all requested permissions are already granted when invoking one of the
Dexter.checkPermission(s)(OnSameThread)
,startTransparentActivityIfNeeded()
should not startDexterActivity
. Thus preventing any kind of flicker and animation when opening/closing activities.Actual behaviour
When checking for permissions already granted, I get a slight flicker and slide animation with a translucent activity with a few shadows.
Steps to reproduce
I have no clue... I have two classes, implemented with the same exact pattern, one of them shows the flicker, the other doesn't. They check for different permissions but I tried to replicate everything in the working class into the non-working class but I can't get it to work.
For some strange reason, I have a piece of code fully working (no flicker, no animation) and another piece of code not working (shows flicker, shows animation). I can't really understand the differences between them to describe the steps to reproduce.
That's why I'm suggesting to not even start
DexterActivity
if all required permissions are already granted. I know this is supposed to be a translucent activity, but why are we opening it if we are going to close it right away since there are no dialogs to show?Version of the library
v2.3.0
The text was updated successfully, but these errors were encountered: