Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rationals are not working in your code #8

Closed
bandhiwal opened this issue May 28, 2016 · 6 comments
Closed

Rationals are not working in your code #8

bandhiwal opened this issue May 28, 2016 · 6 comments

Comments

@bandhiwal
Copy link

I found your library very useful and easy to integrate , but when i tried to integrate this into my app I wasn't able to show rational messages . so if you please care to help reply to this
and another thing when camera permission is given it doesn't shows multiple permission there

@00ec454
Copy link
Owner

00ec454 commented Jun 1, 2016

@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

@bandhiwal
Copy link
Author

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

@00ec454
Copy link
Owner

00ec454 commented Jun 3, 2016

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

@bandhiwal
Copy link
Author

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

@RichieCr7
Copy link

RichieCr7 commented Jun 9, 2016

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

@00ec454
Copy link
Owner

00ec454 commented Jun 17, 2016

code has been fixed. closing now

@00ec454 00ec454 closed this as completed Jun 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants