Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android 13 & 14 Crashes + Android 12 #161

Open
dozy-programmer opened this issue Mar 17, 2024 · 5 comments
Open

Android 13 & 14 Crashes + Android 12 #161

dozy-programmer opened this issue Mar 17, 2024 · 5 comments

Comments

@dozy-programmer
Copy link

dozy-programmer commented Mar 17, 2024

Hello again,
Thanks for fixing the last issue I reported. I have not had that issue since. Also wanted to say thanks for making this library, as it is very useful and customizable (UI and codewise).

I have been noticing an issue in ImagePickerActivity(line 94) and CameraActivity(line 61). It is the same issue and a good amount of devices are crashing as a result. Good thing is that I am able to pinpoint it to this line.
config = intent.getParcelableExtra(Constants.EXTRA_CONFIG)!!
I noticed that getParcelableExtra is deprecated starting Android 13 and the issues are mostly occurring on that OS. Not sure if maybe Android 13 is handling this differently and crashing as a result?

Also wanted to add that on most devices, this is not an issue. It is working on my Oneplus Android 14. On the other hand, the Nothing phone on Android 14 is crashing.

@dozy-programmer dozy-programmer changed the title Android 13 & 14 Issue Crashing Android 13 & 14 Crashes Mar 17, 2024
@nguyenhoanglam
Copy link
Owner

@dozy-programmer could you send me the crash log detail?

@dozy-programmer
Copy link
Author

dozy-programmer commented Mar 18, 2024

@nguyenhoanglam sure, not sure that is going to help much. I am also attaching a video a user gave me that results in the issue specified (when user clicks on Storage button in my app, it routes to your image picker library). Looking at the video I am attaching, I see the usual Photos and Videos permission is not an option? Not sure why that is the case since I specified the correct permissions.

Caused by java.lang.NullPointerException: at com.nguyenhoanglam.imagepicker.ui.imagepicker.ImagePickerActivity.onCreate(ImagePickerActivity.kt:94) at android.app.Activity.performCreate(Activity.java:8595) at android.app.Activity.performCreate(Activity.java:8573) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1476) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3815) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3973) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:139) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:96) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2474) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:232) at android.os.Looper.loop(Looper.java:334) at android.app.ActivityThread.main(ActivityThread.java:8291) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:557) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:981)

image-picker_crash.1.mp4

@sharjeelmuzaffar
Copy link

@nguyenhoanglam I am facing the same issue please help me out in android 13 and 14

@dozy-programmer
Copy link
Author

dozy-programmer commented May 17, 2024

@sharjeelmuzaffar Seems like Android is really pushing their Photo picker. See https://developer.android.com/training/data-storage/shared/photopicker.

I would rather not keep having these issues and will just move on to use that. Issue also persists in Android 12.

Thanks for taking the time to create this library and appreciate the help @nguyenhoanglam.

@dozy-programmer dozy-programmer changed the title Android 13 & 14 Crashes Android 13 & 14 Crashes + Android 12 May 17, 2024
@sharjeelmuzaffar
Copy link

sharjeelmuzaffar commented May 20, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants