Giter Club home page Giter Club logo

ssimagepicker's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ssimagepicker's Issues

Call from fragment

Can you modify it so i'm able to call it from a fragment ?

override fun onAttach(context: Context) {
      super.onAttach(context)
      mListener = if (context is ItemClickListener) {
          context
      } else {
          throw RuntimeException("$context")
      }
  }

the if condition always fails and throws RuntimeException
imagePicker = ImagePickerActivityClass(requireContext(), requireActivity(), this, requireActivity().activityResultRegistry)

open failed: ENOENT (No such file or directory)

file:/storage/emulated/0/Android/data/com.abc.customer/files/Pictures/JPEG_20210503_232332_6233313561642340468.jpg: open failed: ENOENT (No such file or directory)

Not able to get file from returned String
Device Android 10

Getting error while open fragment second time : SavedStateProvider with the given key is already registered

Describe the bug
I have implemented this library inside fragment. After exiting the fragment with back button and open the same fragment and try to open image picker error occur you can find the stacktrace below.

Additional context
FATAL EXCEPTION: main
Process: com.example.evetanhr.debug, PID: 15333
java.lang.IllegalArgumentException: SavedStateProvider with the given key is already registered
at androidx.savedstate.SavedStateRegistry.registerSavedStateProvider(SavedStateRegistry.kt:110)
at com.app.imagepickerlibrary.util.PickerConfigManager.init$lambda-0(PickerConfigManager.kt:25)
at com.app.imagepickerlibrary.util.PickerConfigManager.$r8$lambda$yxq-75EwC_9xo5MojhV7-4heekM(Unknown Source:0)
at com.app.imagepickerlibrary.util.PickerConfigManager$$ExternalSyntheticLambda0.onStateChanged(Unknown Source:4)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.java:360)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.java:202)
at com.app.imagepickerlibrary.util.PickerConfigManager.(PickerConfigManager.kt:22)
at com.app.imagepickerlibrary.ImagePicker.(ImagePicker.kt:27)
at com.app.imagepickerlibrary.ImagePicker.(Unknown Source:0)
at com.app.imagepickerlibrary.ImagePicker$Companion.registerImagePicker(ImagePicker.kt:232)
at com.example.evetanhr.view.add.AddEmployeePersonalDetailsFragment.onCreate(AddEmployeePersonalDetailsFragment.kt:66)
at androidx.fragment.app.Fragment.performCreate(Fragment.java:3090)
at androidx.fragment.app.FragmentStateManager.create(FragmentStateManager.java:475)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:257)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1899)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1817)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1760)
at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:547)
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:7697)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:516)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950)

Free Hand Cropping

Thanks for developing a useful library.
It would be really great if you add a new feature "free hand crop" where we can pick comers and adjust ratios.

Support Activity

Is your feature request related to a problem? Please describe.
Hi, thanks this awesome plugin and author's hard work! I wonder this awesome plugin if could support Activity,because now I want to using in Flutter. But in flutter, its using FlutterActivity which is only extends Activity.
image

I think the main problem is that I cannot register in Acitivity,the registerImagePicker is only support ComponentActivity or Fragment.

    companion object {
        fun ComponentActivity.registerImagePicker(callback: ImagePickerResultListener): ImagePicker {
            return ImagePicker(callback, this)
        }

        fun Fragment.registerImagePicker(callback: ImagePickerResultListener): ImagePicker {
            return ImagePicker(callback, requireActivity())
        }
    }

thank you~

The application could not be installed: INSTALL_FAILED_CONFLICTING_PROVIDER

If I already have an installed app with this library and I try to installed another app I am getting the following error

The application could not be installed: INSTALL_FAILED_CONFLICTING_PROVIDER

I think the authorities for the file provider in the manifest are the same so that why it is conflicting.

android:authorities="com.app.imagepickerlibrary.provider"

Ucrop default settings

hi thank you for this library
my English is not good , i try to explain
i want to set crop 16:9 and disable changing by user
and disable and hide rotating
one more thing1:
when i try to scale image with two finger , when my fingers are on the crop section , its not work (crop rectangle move , i want to scale image not move the crop rectangle ) . i think it is better that crop rectangle fixed in and image can move and scale.
one more thing2:
when an activity run two ImagePicker , the result function " fun onImagePick(uri: Uri?)" must have a "request code" to know where to use the uri
sorry for my english :)

Permissions handling on android 11+

Hello, i have a xiaomi phone and recently my phone api as been updated to android 11. So now when i open the bottomsheet dialog with any trigger , he do his work but i don't have any access to a file. I make some chearch and i see that when you target android 11+ asking read and write permission they not sufficient to have the permissions. I don't know if i'm wrong. Thank you for reply this.

java.io.FileNotFoundException

java.io.FileNotFoundException: /external_files/Android/data/com.diamondvendor/files/Pictures/JPEG_COMPRESS_IMG_20231031_114338.jpg_7741807157170877795.jpg (No such file or directory)

Click picture through camera or when enable compression this issue is happening.

Even file is not present on file manager.

This issue is happening on Android 9.0

Request Feature : Aspect Ration Crop

So previously I had difficulty using your library for the image crop feature where I wanted to be able to custom crop based on aspect ration be it 1:1, 3:2, 4:3, or 16:9 and vice versa, could you please make that feature for the future ๐Ÿ™๐Ÿ˜ฌ
image

GetImagesList "name must not be null"

Describe the bug
Hello, thanks again for the library, work really well ;)

I have a couple of crash on production linked to Extension.getImageList()
when name == null

I couldn't reproduce it, just a couple of stacktrace from crqashlytics

Fatal Exception: java.lang.NullPointerException: name must not be null at com.app.imagepickerlibrary.ExtensionsKt$getImagesList$2.invokeSuspend(Extensions.kt:253) at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33) at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106) at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42) at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95) at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.java:570) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677) at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

I didn't really dig into it, and I don't know how important the name is for a picture, but I was wondering if just avoiding picture if any params of the cursor is null could fix it without creating too many unwanted behavior

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.