huhx / compose_image_picker Goto Github PK
View Code? Open in Web Editor NEW📸 Image Picker for Jetpack Compose
License: MIT License
📸 Image Picker for Jetpack Compose
License: MIT License
Provide a way to grant the storage and camera permission
Process: com.gtrides.passenger, PID: 28742
java.lang.ClassCastException: androidx.compose.animation.AnimatedContentTransitionScopeImpl cannot be cast to androidx.compose.animation.AnimatedContentScope
at com.google.accompanist.navigation.animation.AnimatedNavHostKt$AnimatedNavHost$7$1.invoke(AnimatedNavHost.kt:198)
at androidx.compose.animation.AnimatedContentKt.AnimatedContent(AnimatedContent.kt:787)
at com.google.accompanist.navigation.animation.AnimatedNavHostKt.AnimatedNavHost(AnimatedNavHost.kt:196)
at com.google.accompanist.navigation.animation.AnimatedNavHostKt.AnimatedNavHost(AnimatedNavHost.kt:89)
at com.huhx.picker.data.AssetRouteKt.AssetPickerRoute(AssetRoute.kt:23)
at com.huhx.picker.view.AssetPickerKt$AssetPicker$2.invoke(AssetPicker.kt:38)
at com.huhx.picker.view.AssetPickerKt$AssetPicker$2.invoke(AssetPicker.kt:37)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:108)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at com.huhx.picker.view.AssetPickerKt.AssetPicker(AssetPicker.kt:37)
I tried to use the dependency, so I declared the implementation described in README.md, implementation "io.github.huhx:compose-image-picker:1.0.4"
. However, I was not able to use the classes. When I looked into the external libraries I noticed that there are no classes with that version (1.0.4):
I tried version 1.0.0 and was able to use the classes:
I'm not sure if this specific to my environment, or there is indeed something wrong with the dependency. I wanted to share it, just in case it is the second option
Hi I was looking for a package that had extactly the functionalities that yours offers but it keeps crashing even when i launch the demo app allowing all the permissions.
Here the stack trace:
FATAL EXCEPTION: main Process: com.huhx.app, PID: 17944 java.lang.NullPointerException: getString(indexDirectory) must not be null at com.huhx.picker.data.AssetLoader.load(AssetLoader.kt:105) at com.huhx.picker.data.AssetPickerRepository.getAssets(AssetPickerRepository.kt:11) at com.huhx.picker.data.AssetViewModel.initAssets(AssetViewModel.kt:44) at com.huhx.picker.data.AssetViewModel.access$initAssets(AssetViewModel.kt:14) at com.huhx.picker.data.AssetViewModel$initDirectories$1.invokeSuspend(AssetViewModel.kt:30) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:367) at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:30) at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable$default(Cancellable.kt:25) at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:110) at kotlinx.coroutines.AbstractCoroutine.start(AbstractCoroutine.kt:126) at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch(Builders.common.kt:56) at kotlinx.coroutines.BuildersKt.launch(Unknown Source:1) at kotlinx.coroutines.BuildersKt__Builders_commonKt.launch$default(Builders.common.kt:47) at kotlinx.coroutines.BuildersKt.launch$default(Unknown Source:1) at com.huhx.picker.data.AssetViewModel.initDirectories(AssetViewModel.kt:29) at com.huhx.picker.view.AssetPickerKt$AssetPicker$1.invokeSuspend(AssetPicker.kt:34) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at androidx.compose.ui.platform.AndroidUiDispatcher.performTrampolineDispatch(AndroidUiDispatcher.android.kt:81) at androidx.compose.ui.platform.AndroidUiDispatcher.access$performTrampolineDispatch(AndroidUiDispatcher.android.kt:41) at androidx.compose.ui.platform.AndroidUiDispatcher$dispatchCallback$1.doFrame(AndroidUiDispatcher.android.kt:68) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1106) at android.view.Choreographer.doCallbacks(Choreographer.java:866) at android.view.Choreographer.doFrame(Choreographer.java:792) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1092) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:226) at android.os.Looper.loop(Looper.java:313) at android.app.ActivityThread.main(ActivityThread.java:8669) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@7c01437, Dispatchers.Main.immediate]
Make the image pick support different Theme
When we are in Preview page, image selection should be supported.
In order to select image from previous or next, the preview page should be scrollable.
gif image shoud be previewed
Text and label support Internationalization
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.