Giter VIP home page Giter VIP logo

Comments (7)

Serchinastico avatar Serchinastico commented on May 18, 2024 1

Hi @marcellogalhardo

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.

Serchinastico avatar Serchinastico commented on May 18, 2024 1

I added a disclaimer in the README warning users of the library to don't use the noHistory flag.

from dexter.

marcellogalhardo avatar marcellogalhardo commented on May 18, 2024

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.

Serchinastico avatar Serchinastico commented on May 18, 2024

Hi @marcellogalhardo,

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.

Serchinastico avatar Serchinastico commented on May 18, 2024

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.

marcellogalhardo avatar marcellogalhardo commented on May 18, 2024

Thank you for the feedback. I will create a project with the problem to provide for you this week!

from dexter.

marcellogalhardo avatar marcellogalhardo commented on May 18, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.