Open karam89 opened 4 years ago
For testing purposes, can you try the example code on a new Unity project and see if it works fine: https://github.com/yasirkula/UnityNativeGallery#example-code
I've created a new project, and added the code sample you provided
The same result did happen, as mentioned in the post above
Noting that the same build works well on other devices IE:
Note:
This error only happens if I choose Gallery
, while clicking Photos
works like charm
Thanks in advanced
Can you try inserting this code to your Start function and see if it changes anything:
using( AndroidJavaClass ajc = new AndroidJavaClass( "com.yasirkula.unity.NativeGalleryMediaPickerFragment" ) )
ajc.SetStatic<bool>( "preferGetContent", true );
I've added the given lines
After calling GetImageFromGallery the following UI did appear instantly and with good performance
. . . . . . But if a chose to switch to Gallery, the same problem appears as mentioned in this post . . . .
Thank you for all the details. I'm afraid I won't be able to resolve this issue in the foreseeable future since I can't reproduce it with the devices around me. Even if I managed to find a Note 5, I don't know which part of the code would cause this issue on only Note 5 devices' Gallery apps (issues that contain the word 'only' are super ugly, super annoying). I tried finding some answers on Google but couldn't really find any. Please let me know if you find any possible solutions to this problem or see any interesting error messages in logcat.
I didn't say it only happens on Note 5, but this is the only case out of the 4 available devices for test I have
Anyway
For testing purposes, I've added Unity Native Gallery
asset, and Image and Video Picker
on the same project
with 2 buttons, one for each asset
to test getting an image from Gallery
using different assets
as a result after building an apk:
Unity Native Gallery
has the response problem I've mentionedImage and Video Picker
doesn't have this, and the response is fastAny ideas?
I won't be able to tell how the other paid plugin solves this issue but I'm glad the issue is resolved.
i would suggest to use whatever is working for you...
and let @yasirkula continue his great work ! 👍
Hello @yasirkula
Thank you very much for your great asset,
I've implemented your asset in my project and it works well,
I'm only having some issues browsing the pictures from my
Gallery
on AndroidAfter calling the method GetImageFromGallery the
Gallery
gets opened like thisAnd it seems to be heavily responding for a little time,
After 30 seconds the
Albums
gets appeared and becomes very well responsive as shown bellowbut with some missing Albums (just like
Camera
album)the missing Albums appears after switching to
PICTURES
tab, then back toALBUMS
tab, as shown bellow (Camera
album has just appeared)Device: Samsung Note 5 Android Version: 6.0.1 Unity version: 2018.4.9 Scripting Backend: IL2CPP Scripting Runtime Version: .NET 4.x Write Permission: External Build System: Gradle Android Studio: 3.5
Any ideas?
Thanks in advanced