Comments (6)
The code generated by PermissionsDispatcher always resides in the same package that the annotated Activity/Fragment classes live in, which is why those classes are able to use the non-public static
methods from the generated code. We chose to reduce visibility of these methods as much as possible to prevent abuse and highlight the tight connection that an annotated class has to its generated counterpart. I don't see why we should relax those restrictions.
from permissionsdispatcher.
I agreed with you, but I have another implementation before using PermissionsDispatcher methods, So I need to put all my code in single class,
So I need from you to give me an option to set modifier (public,default,protracted) of those methods,
from permissionsdispatcher.
Can you go into a little detail on the implementation you're referring to? I'd like to get a better understanding about how it would be beneficial to add something like this to the library.
from permissionsdispatcher.
I have Class name DialogHelper, I put all my implementations inside it,
My Implementation, to add another dialog before show native permission dialog like this
class DialogHelper{
public static void showSmsForRegisterPage(final RegisterFragment fragment) {
Permission permission = Permission.READ_SMS;
if (PermissionDialogUtil.hasPermission(fragment, permission)) {
fragment.showSms();
return;
}
if (permission.isNeverAsk()) {
fragment.onShowSmsNeverAsk();
return;
}
PermissionDialogUtil.showDialog(fragment, permission,
new MaterialDialog.ButtonCallback() {
@Override
public void onPositive(MaterialDialog dialog) {
RegisterFragmentPermissionsDispatcher.showSmsWithCheck(fragment);
}
@Override
public void onNegative(MaterialDialog dialog) {
fragment.onShowSmsDenied();
}
});
}
}
Permission is an enum I created it to set all details permissions inside it,
The DialogHelper class I need to repeat it, inside each package I used a permission inside it's classes
This is my problem basically
from permissionsdispatcher.
We have no plan to do that.
We constrain generated codes to being called only annotated class itself.
IMO, in your case you should modify application codes to being them more loose coupling.
from permissionsdispatcher.
I know your library do 1 2 3 4, but I need to give ability to change modifiers of methods,
Thant all My needs
from permissionsdispatcher.
Related Issues (20)
- [KTX] System settings doesn't show up again, when user select nothing in location permission settings and press back button in Android 11
- Same permission with different callbacks is missing.
- When will you release new version? (Use ContextCompat.checkSelfPermission )
- Doesnโt support Android 12 data access auditing HOT 2
- New one HOT 1
- [ktx] Construct PermissionsRequester from Fragment may cause that callbacks (requiresPermission, onPermissionDenied, etc.) are called after Fragment instance is already dead HOT 4
- [ktx] onNeverAskAgain not called HOT 4
- I don't know why it doesn't work
- Ktx-1.1.4 HOT 1
- miweb
- IllegalArgumentException with annotation after updating to Kotlin 1.6.10 HOT 2
- Back in business!
- Kotlin 1.7 Support HOT 10
- @OnNeverAskAgain called along with @NeedsPermission if we ask permission in onViewCreated() of Fragment
- kotlin 1.8 Modifiers [PRIVATE] are not allowed on Kotlin parameters. Allowed modifiers: [VARARG, NOINLINE, CROSSINLINE] HOT 5
- Is there someone maintaining this repo? Is there any updated fork? HOT 1
- Android 13 storage permission in @NeedsPermission HOT 5
- fhun
- Add support for ksp
- `This library is no longer maintained.` HOT 1
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 permissionsdispatcher.