- Home /
Load image from Android-gallery on OS 5.0.1
I am using the unity plugin "Unified Android API" to load an image from Android gallery to my application. The application crashes and restarts itself instantly every now and then when I try to upload an image.
The crash seems to occur more often with big pictures and almost never with small pictures like thumbnails. There is no memory related errors in log. I use the cmd command: adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG
, maybe it filters out memory warnings?
I was also unable to replicate the bug on an older android version. JellyBean 4.3 while on Lollipop 5.01 it crashes consistently.
The phones are LG spirit 5.01 and Samsung S3 4.3.
void Start()
{
StreamManager.LoadFileDialog(FolderLocations.Pictures, 1524, 1524, new string[] { ".png", ".jpg", ".jpeg" }, imageLoadedCallback);
}
private void imageLoadedCallback(Stream stream, bool succeeded)
{
Debug.Log("This doesn't execute");
}
Try with "adb logcat -s Unity" only and see what happens, it should give you more information about the crash.
Your answer
![](https://koobas.hobune.stream/wayback/20220612064832im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
open another app from ours? 2 Answers
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers