hi-manshu / pluck Goto Github PK
View Code? Open in Web Editor NEWPluck, a library that helps you to pick image via Gallery/Camera built using Compose
Home Page: https://www.himanshoe.com
License: Apache License 2.0
Pluck, a library that helps you to pick image via Gallery/Camera built using Compose
Home Page: https://www.himanshoe.com
License: Apache License 2.0
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
.github/workflows/pull-request.yml
actions/checkout v2
actions/setup-java v1
gradle/gradle-build-action v2
buildSrc/src/main/kotlin/Dependencies.kt
buildSrc/src/main/kotlin/ModuleExtension.kt
buildSrc/src/main/kotlin/Versions.kt
composeOptions 1.1.1
gradle.properties
settings.gradle
build.gradle.kts
app/build.gradle.kts
com.himanshoe:pluck 1.0.0-RC2
buildSrc/build.gradle.kts
org.jetbrains.kotlin.jvm 1.6.10
pluck/gradle.properties
pluck/build.gradle.kts
io.coil-kt:coil-compose 1.4.0
androidx.paging:paging-common-ktx 3.1.0
gradle/wrapper/gradle-wrapper.properties
gradle 7.2
Describe the bug
An empty image file will be saved if user ivokes the camera and doesn't take any photo or delete the image in the preview screen.
To Reproduce
Steps to reproduce the behavior:
Scenario1
Expected behavior
The empty file should be deleted.
Desktop (please complete the following information):
Smartphone (please complete the following information):
Describe the bug
NullPointerException -> force close when folderName is null, its happen when image is on the root folder, just like this log
Library version
1.0.0-RC1
Log from library
D/imagesPlu: id : 17264, contentUri: content://media/external/images/media/17264, diplayName: Screenshot_20220315-151458.png, folder: Screenshots
D/imagesPlu: id : 17263, contentUri: content://media/external/images/media/17263, diplayName: Screenshot_20220315-151314.png, folder: Screenshots
D/imagesPlu: id : 17262, contentUri: content://media/external/images/media/17262, diplayName: ktp2.jpg, folder: null
Error log
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.imagepickerapp, PID: 3931
java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toString()' on a null object reference
at com.himanshoe.pluck.util.MediaLoaderKt.fetchPagePicture(MediaLoader.kt:97)
at com.himanshoe.pluck.data.PluckRepositoryImpl$getPicturePagingSource$1.invoke(PluckRepository.kt:50)
at com.himanshoe.pluck.data.PluckRepositoryImpl$getPicturePagingSource$1.invoke(PluckRepository.kt:50)
at com.himanshoe.pluck.data.PluckDataSource.load(PluckDataSource.kt:40)
at androidx.paging.PageFetcherSnapshot.doInitialLoad(PageFetcherSnapshot.kt:283)
at androidx.paging.PageFetcherSnapshot.access$doInitialLoad(PageFetcherSnapshot.kt:54)
at androidx.paging.PageFetcherSnapshot$pageEventFlow$1.invokeSuspend(PageFetcherSnapshot.kt:163)
at androidx.paging.PageFetcherSnapshot$pageEventFlow$1.invoke(Unknown Source:8)
at androidx.paging.PageFetcherSnapshot$pageEventFlow$1.invoke(Unknown Source:4)
at androidx.paging.CancelableChannelFlowKt$cancelableChannelFlow$1.invokeSuspend(CancelableChannelFlow.kt:30)
at androidx.paging.CancelableChannelFlowKt$cancelableChannelFlow$1.invoke(Unknown Source:8)
at androidx.paging.CancelableChannelFlowKt$cancelableChannelFlow$1.invoke(Unknown Source:4)
at androidx.paging.SimpleChannelFlowKt$simpleChannelFlow$1$1$producer$1$1.invokeSuspend(SimpleChannelFlow.kt:57)
at androidx.paging.SimpleChannelFlowKt$simpleChannelFlow$1$1$producer$1$1.invoke(Unknown Source:8)
at androidx.paging.SimpleChannelFlowKt$simpleChannelFlow$1$1$producer$1$1.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at androidx.paging.SimpleChannelFlowKt$simpleChannelFlow$1$1$producer$1.invokeSuspend(SimpleChannelFlow.kt:52)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.EventLoop.processUnconfinedEvent(EventLoop.common.kt:69)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith(DispatchedContinuation.kt:375)
at kotlinx.coroutines.internal.DispatchedContinuationKt.resumeCancellableWith$default(DispatchedContinuation.kt:278)
at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:39)
at kotlinx.coroutines.LazyStandaloneCoroutine.onStart(Builders.common.kt:204)
at kotlinx.coroutines.JobSupport.startInternal(JobSupport.kt:401)
at kotlinx.coroutines.JobSupport.start(JobSupport.kt:380)
at androidx.paging.CachedPageEventFlow$sharedForDownstream$1.invokeSuspend(CachedPageEventFlow.kt:66)
at androidx.paging.CachedPageEventFlow$sharedForDownstream$1.invoke(Unknown Source:8)
at androidx.paging.CachedPageEventFlow$sharedForDownstream$1.invoke(Unknown Source:4)
at kotlinx.coroutines.flow.SubscribedFlowCollector.onSubscription(Share.kt:410)
at kotlinx.coroutines.flow.SharedFlowImpl.collect(SharedFlow.kt:341)
at kotlinx.coroutines.flow.SubscribedSharedFlow.collect(Share.kt:400)
at kotlinx.coroutines.flow.FlowKt__LimitKt$takeWhile$$inlined$unsafeFlow$1.collect(SafeCollector.common.kt:124)
at androidx.paging.CachedPageEventFlow$downstreamFlow$1.invokeSuspend(CachedPageEventFlow.kt:247)
at androidx.paging.CachedPageEventFlow$downstreamFlow$1.invoke(Unknown Source:8)
at androidx.paging.CachedPageEventFlow$downstreamFlow$1.invoke(Unknown Source:4)
at kotlinx.coroutines.flow.SafeFlow.collectSafely(Builders.kt:61)
at kotlinx.coroutines.flow.AbstractFlow.collect(Flow.kt:212)
at androidx.paging.PagingDataDiffer$collectFrom$2.invokeSuspend(PagingDataDiffer.kt:467)
at androidx.paging.PagingDataDiffer$collectFrom$2.invoke(Unknown Source:8)
at androidx.paging.PagingDataDiffer$collectFrom$2.invoke(Unknown Source:2)
at androidx.paging.SingleRunner$runInIsolation$2.invokeSuspend(SingleRunner.kt:59)
E/AndroidRuntime: at androidx.paging.SingleRunner$runInIsolation$2.invoke(Unknown Source:8)
at androidx.paging.SingleRunner$runInIsolation$2.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.CoroutineScopeKt.coroutineScope(CoroutineScope.kt:264)
at androidx.paging.SingleRunner.runInIsolation(SingleRunner.kt:49)
at androidx.paging.SingleRunner.runInIsolation$default(SingleRunner.kt:44)
at androidx.paging.PagingDataDiffer.collectFrom(PagingDataDiffer.kt:140)
at androidx.paging.compose.LazyPagingItems$collectPagingData$2.invokeSuspend(LazyPagingItems.kt:192)
at androidx.paging.compose.LazyPagingItems$collectPagingData$2.invoke(Unknown Source:8)
at androidx.paging.compose.LazyPagingItems$collectPagingData$2.invoke(Unknown Source:4)
at kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1.invokeSuspend(Merge.kt:217)
at kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1.invoke(Unknown Source:13)
at kotlinx.coroutines.flow.FlowKt__MergeKt$mapLatest$1.invoke(Unknown Source:4)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invokeSuspend(Merge.kt:34)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Unknown Source:8)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$1$2.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startCoroutineUndispatched(Undispatched.kt:55)
at kotlinx.coroutines.CoroutineStart.invoke(CoroutineStart.kt:112)
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 kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3$invokeSuspend$$inlined$collect$1.emit(Collect.kt:140)
at kotlinx.coroutines.flow.SharedFlowImpl.collect(SharedFlow.kt:351)
at kotlinx.coroutines.flow.ReadonlySharedFlow.collect(Unknown Source:2)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invokeSuspend(Merge.kt:101)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invoke(Unknown Source:8)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest$flowCollect$3.invoke(Unknown Source:4)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.flow.internal.FlowCoroutineKt.flowScope(FlowCoroutine.kt:33)
at kotlinx.coroutines.flow.internal.ChannelFlowTransformLatest.flowCollect(Merge.kt:25)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo$suspendImpl(ChannelFlow.kt:157)
at kotlinx.coroutines.flow.internal.ChannelFlowOperator.collectTo(Unknown Source:0)
at kotlinx.coroutines.flow.internal.ChannelFlow$collectToFun$1.invokeSuspend(ChannelFlow.kt:60)
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.run(AndroidUiDispatcher.android.kt:57)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7397)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:935)
To Reproduce
Steps to reproduce the behavior:
Permission(
permissions = listOf(
Manifest.permission.CAMERA,
Manifest.permission.READ_EXTERNAL_STORAGE
),
goToAppSettings = {
// Go to App Settings
}
) {
Pluck(onPhotoSelected = {
// List of PluckImage when selecting from Gallery/Camera. When checking with Camera
// It returns only one item in list
})
}
Desktop
Android Studio
Smartphone (please complete the following information):
I got crash when use Pluck with permission
here is stack trace
java.lang.NoSuchMethodError: No static method Scaffold-zOzJ79U(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;Lkotlin/jvm/functions/Function2;IJJLkotlin/jvm/functions/Function3;Landroidx/compose/runtime/Composer;II)V in class Landroidx/compose/material3/ScaffoldKt; or its super classes (declaration of 'androidx.compose.material3.ScaffoldKt' appears in /data/app/~~zsV8t1-rFJuDKJsPlpQT2A==/com.eventgo.app-HnRnepwOmgQ393YaqlSIOA==/base.apk)
at com.himanshoe.pluck.ui.permission.PermissionKt$Permission$1.invoke(Permission.kt:75)
at com.himanshoe.pluck.ui.permission.PermissionKt$Permission$1.invoke(Permission.kt:74)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at com.google.accompanist.permissions.PermissionsRequiredKt.PermissionsRequired(PermissionsRequired.kt:97)
at com.himanshoe.pluck.ui.permission.PermissionKt.Permission(Permission.kt:72)
at com.eventgo.app.ui.screen.create_event.CreateEventScreenKt$CreateEventScreen$3$1.invoke(CreateEventScreen.kt:137)
at com.eventgo.app.ui.screen.create_event.CreateEventScreenKt$CreateEventScreen$3$1.invoke(CreateEventScreen.kt:135)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:132)
at androidx.compose.material3.SurfaceKt$Surface$1.invoke(Surface.kt:114)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:107)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:34)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material3.SurfaceKt.Surface-T9BRK9s(Surface.kt:111)
By using this, this will only return the thumbnail of the image.
Please add a option to get full file or uri.
Trying to use Permission or directly Pluck leads to the error in the title
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.