Comments (7)
I now understand what's happening, as you pointed out, the important thing is the noHistory = "true"
config. When Dexter is called, it creates a new activity internally to request the permissions and pushes it into the stack, this causes your LoginActivity
to be completely removed as it's not the top activity anymore (http://developer.android.com/guide/topics/manifest/activity-element.html#nohist).
Whatever it draws under the DexterActivity
is left to our imagination (usually a black background or the launcher if the removed activity was the only one).
Sadly, I don't see how we can handle that scenario, the only viable solution would be to use your own activity to request permissions and that's something that you can probably do better on your own instead of using Dexter.
from dexter.
I added a disclaimer in the README warning users of the library to don't use the noHistory
flag.
from dexter.
I discovered that the problem occurs in one Activity that has set in its manifest tag: android: noHistory = "true"
. This is a bug or was it my fault?
from dexter.
I'd have to do some testing but I'd say that the themes system is somehow conflicting, keep in mind that the inner DexterActivity
instance is using a non-appcompat theme (our bad and something we should probably take a look at).
I'll try to reproduce and debug the issue this week and let you know our findings.
Thanks for reporting!
from dexter.
I've been trying with several configurations but I can't reproduce your problem.
It would be much easier for us if you can provide us with a minimum project where the bug happens.
Either that or you can wait until we release a new version of Dexter which presumably will contain a fix to how we handle the inner activity but I'm not sure if it'll solve your problem.
from dexter.
Thank you for the feedback. I will create a project with the problem to provide for you this week!
from dexter.
@Serchinastico the code is available in the repository: Bug Dexter Black Screen.
Note the following details:
- Styles:
AppTheme
. - AndroidManifest: Activity
android: noHistory = "true"
When you start the application, it should display a white screen says "Hello World."
When the permission dialog appears, select the "Deny" option.
Note that the application will behave in the following ways:
- Will keep a black screen (usually on the first run).
- Will close the application (the next time).
I hope this helps.
from dexter.
Related Issues (20)
- onPermissionDenied is called even when the permission was already granted HOT 2
- MultiPermissionsListener not called when reguest permissions from onPermissionGranted HOT 4
- Check if a permission CHANGED in MultiplePermissionsReport? HOT 1
- Activity re-created after denying permission HOT 3
- Haven't supported Manifest.permission.MANAGE_EXTERNAL_STORAGE yet (Android 11) HOT 3
- Listener not working properly on Configuration Change HOT 8
- Desugring error HOT 4
- I am having trouble with implementing Dexter to get location using google map. Please help me.
- Duplicate Permission in report HOT 5
- Dexter doesn't notify when the app goes in background with permission dialog open and when returning doing tap in the app icon, the permission dialog is close. HOT 1
- OnPermissionDenied called even when permissions are granted on Android 10
- java.lang.IllegalArgumentException ERROR IN device API 23 HOT 1
- ------
- Screen rotation while showing Rationale dialog invalidates PermissionListener HOT 13
- .
- (1). cannot resolve withContext method. (2). cannot resolve permission Symbol HOT 1
- Proguard rules are affecting the whole project HOT 1
- ACTIVITY_RECOGNITION Permission HOT 1
- API 30 Android 11: Requesting background location permission
- Android 11 dismissible permission dialogs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dexter.