Coder Social home page Coder Social logo

Comments (6)

00ec454 avatar 00ec454 commented on August 30, 2024

@bandhiwal did you create the methods with annotations for @AskGranted or @AskDenied?

@AskGranted(Manifest.permission.WRITE_EXTERNAL_STORAGE)
    public void fileAccessGranted() {
        Log.i(TAG, "FILE  GRANTED");
    }

Please make sure you have these methods and proper permission passed as param in annotations

from ask.

bandhiwal avatar bandhiwal commented on August 30, 2024

Yes I have created both the methods @AskGranted and @AskDenied but rational messages were not coming even after that , then I checked your library and figured it out what went wrong
In your AskActivity class you have created a method named init(Bundle state) when state is null no rational messages were added that was the problem

 private void init(Bundle state) {
 if (state != null) {
permissions = state.getStringArray(Constants.PERMISSIONS);
rationaleMessages = state.getStringArray(Constants.RATIONAL_MESSAGES);
requestId = state.getInt(Constants.REQUEST_ID);
} else {
Intent intent = getIntent();
permissions = intent.getStringArrayExtra(Constants.PERMISSIONS);
**rationaleMessages = intent.getStringArrayExtra(Constants.RATIONAL_MESSAGES);**  // this line was missing in your library
requestId = intent.getExtras().getInt(Constants.REQUEST_ID, 0);
}
}

You should update your library with that code replaced by this code if you find this suitable , i found that after this change this is working like a charm

from ask.

00ec454 avatar 00ec454 commented on August 30, 2024

@bandhiwal this looks good. please feel free to open the pull request and I merge it.

from ask.

bandhiwal avatar bandhiwal commented on August 30, 2024

sorry i'm new to github and have no idea about pulling a request but thanks for accepting my changes
if you do the changes that would be great thanks

from ask.

RichieCr7 avatar RichieCr7 commented on August 30, 2024

i was able to create a dll using xamarin's binding library which works fine but rationale pop up doesnt work

from ask.

00ec454 avatar 00ec454 commented on August 30, 2024

code has been fixed. closing now

from ask.

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.