Comments (5)
The support is already integrated into 2.0.0; I'll do a quick write-ups of how the optional dependency works!
from permissionsdispatcher.
@aurae
Actually I wanna re-consider the api interface.
In my think, resolving the problem by checking support v13 existence may causes the problem.
I mean, some app use android.appFragment
and support.v4.Fragment
at the same time.
So, my suggestion is like below.
@RuntimePermissions(appfragment = true) // naming is quite bad...
public class MainFragment extends android.app.Fragment {
}
or
@RuntimePermissions(v4ragment = false)
public class MainFragment extends android.app.Fragment {
}
if the user can choose whether using native Fragment or not, it would be a good api.
How do you think about of it?
from permissionsdispatcher.
I think that it would be an even better API if the user didn't have to deal with PermissionsDispatcher's configuration when it comes to fragments.
Here is how it works in the new Kotlin architecture:
- PermissionsDispatcher is supported on API levels 4+, since it depends on
support-v4
because of itsActivityCompat
usage - Because of that, the library supports
Activity
andsupport.v4.Fragment
out of the box, without any extra dependencies - Now, if someone used native Fragments in their app with PermissionsDispatcher, they may get the following error on compilation:
permissions.dispatcher.processor.exception.SupportV13MissingException: PermissionsDispatcher for annotated class 'MyNativeFragment' can't be generated, because the support-v13 dependency is missing on your project
- To resolve this, the user just needs to drop in a dependency on
support-v13
alongside PermissionsDispatcher, and their native fragments will become supported as well! This doesn't mean thatsupport.v4.Fragment
isn't supported anymore, it is simply another functionality on top of that, so they could technically use both types of Fragment at the same time
I don't think it's necessary to have the user deal with which configuration PermissionsDispatcher should use. What issue have you encountered with the optional dependency?
from permissionsdispatcher.
Oh sorry, I've not seen your PR well, please just a minute.
from permissionsdispatcher.
It's all good. Take your time!
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.