Giter Club home page Giter Club logo

Comments (4)

haliltprkk avatar haliltprkk commented on June 28, 2024

I am facing the same issue, as well

from dexter.

haliltprkk avatar haliltprkk commented on June 28, 2024

I have noticed it is about these two libraries that I have used for mediation over iron source advertisement

implementation 'com.ironsource.adapters:vungleadapter:4.3.1'
implementation 'com.vungle:publisher-sdk-android:6.5.3'

it is weird but when I remove these two it started to work normally 🤔

from dexter.

binarynoise avatar binarynoise commented on June 28, 2024

It also happens when you start a second dialog very quickly (~1s) after returning to the Activity that requested the permission.

I digged around a bit and found, that the previous DexterActivity gets destroyed delayed (when the UI-Thread is idle again).
In the meantime the new DexterActivity has appeared and registered its callback (aka PermissionListener or MultiPermissionsListener).
Then, after the new DexterActivity has shown up, the UI-/Main-Thread gets idle and the old DexterActivity gets destroyed. In that process the callback is removed even though it has been replaced by a new one.

I think, the issue would be fixed, if the lib would check, if the callback to be removed is still the callback that is expected to be there and has not been replaced.

As a consequence the DexterActivity should pass itself to onActivityDestroyed when it gets destroyed and the Dexter instance should check in its onActivityDestroyed that the current activity is the activity that called the onActivityDestroyed:

void onActivityDestroyed(Activity activityThatCalledOnActivityDestroyed) {
    if (activity == activityThatCalledOnActivityDestroyed) {
      ...
    }
}

that would also imply the null-check

from dexter.

pedrovgs avatar pedrovgs commented on June 28, 2024

Thanks for the fix @binarynoise I'm releasing a new version with your fix.

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.