-
Notifications
You must be signed in to change notification settings - Fork 413
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
150817 adding on request permission result #2182
base: master
Are you sure you want to change the base?
150817 adding on request permission result #2182
Conversation
changes from central respository
180717_addingChangesFromCn1Repository
---------------------------------------- 1-new method in LyfeCycleListener and AndroidNativeUtils to check the permission result
My one concern with this is that it will break compilation for anyone who uses this interface which might mean cn1libs will break. Can we have an additional interface and check whether that is implemented using |
Ok. Please Do that |
I meant that you would update that |
I can't understand you. What do you want that I do? |
Right now if I merge this PR we will get a compilation error for anyone who used this feature before as you added a method to an existing interface. You need to split that to a separate interface for compatibility. |
Can I set to default this method to avoid problem? public interface LifecycleListener { |
No. We can't use Java 8 in the repos yet. We would like to add that in the future but our last attempt to do that failed |
do you add Java 8 to your Repository in this pull request? No. We can't use Java 8 in the repos yet. We would like to add that in the future but our last attempt to do that failed |
No. It will take a while to add that capability. |
When do have programmed to include Java 8 to your Repository in this pull request? |
We already tried to move to Java 8 and failed. It's a very risky task as we have a lot of legacy code around and this could break builds for everyone. Right now it's not a priority but that might change. |
When do have programmed to include Java 8 to your Repository in this pull request? |
It's hard to priorities this as it's not an urgent feature & carries a lot of risks/problems with it. |
When do have programmed to include Java 8 to your Repository in this pull request? |
1 similar comment
When do have programmed to include Java 8 to your Repository in this pull request? |
It won't be in 5.0 |
When do have programmed to include Java 8 to your Repository in this pull request? |
We don't have it scheduled yet. I suggest revising the pull request to use Java 5 syntax |
When do have programmed to include Java 8 to your Repository in this pull request? |
1 similar comment
When do have programmed to include Java 8 to your Repository in this pull request? |
No. I don't understand the problem. Just remove the usage of lambdas and replace them with anonymous inner classes. |
I can't understand your solution. Please provide me an example. I created this pull request because I want create my custom dialog from the runtime native permission and you have a default dialog in your code that if very ugly. this solution if to listen the result of the user when the run time native permission if showed. |
You are adding a method to an interface. You can't do that without default methods. You will break compatibility with code that relies on that interface. You can create a separate interface e.g. static void onRequestPermissionsResult(int requestCode,boolean permissionStatus) {
if(listeners != null) {
for(LifecycleListener l : listeners) {
if(l instanceof RequestPermissionResult) {
((RequestPermissionResult)l).onRequestPermissionsResult(requestCode,permissionStatus);
}
}
}
} Your concrete listener can implement both interfaces whereas everyone else will implement only the original interface. |
1-New method added in LyfeCycleListener and AndroidNativeUtils to check the user permission status to android Api>=23