Comments (6)
@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.
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.
@bandhiwal this looks good. please feel free to open the pull request and I merge it.
from ask.
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.
i was able to create a dll using xamarin's binding library which works fine but rationale pop up doesnt work
from ask.
code has been fixed. closing now
from ask.
Related Issues (20)
- Failed to resolve error HOT 5
- Add listener "onFinished" HOT 2
- Rational message comes twice when single permission given HOT 3
- Cannot click on 'Allow' for permission HOT 2
- Crashing with my AppCompatActivity HOT 2
- Support Fragment HOT 5
- Memory Leak : It holds reference to the Activity HOT 3
- Caused by: android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? HOT 10
- Added it on my first activity and it closes the app when it is first shown
- Some time activity crashes ("Caused by: java.lang.NullPointerException at com.vistrav.ask.Ask.getAnnotation Method(Ask.java:197)) HOT 4
- Manifest merger failed with multiple errors, see logs
- Android UI/Espresso test recording/playing HOT 1
- Reprompt permission check after user denies HOT 1
- Standard Fragment support HOT 1
- Permission callbacks not working (kotlin) HOT 1
- An activity flickers just before the launcher activity HOT 3
- Android 8.0 HOT 4
- denied branch gets called if with permission granted HOT 3
- Disable rtl HOT 3
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 ask.