I don't see the files I downloaded from the gallery right after downloading the images or videos, so I think I need to scan the media No matter how much you search, most of them are Java, and since you search,
#if UNITY_ANDROID
public void RefreshGallery(string path)
{
AndroidJavaClass jc = new AndroidJavaClass("com.unity3d.player.UnityPlayer");
AndroidJavaObject jo = jc.GetStatic<AndroidJavaObject>("currentActivity");
AndroidJavaClass javaClass = new AndroidJavaClass("com.example.refresgallery.RefreshFromUnity");
javaClass.CallStatic("RefreshGallery",jo,path);
}
#endif
This chord came out, but when I tried it, it didn't move.
I don't know how to make a plug-in yet, so please help meㅠ<
c# unity android media
The code you posted is the code you use to use the plug-in.
Did you put the jar file containing the package "com.example.refresgallery.RefreshFromUnity" in the Assets->Plugins->Android folder?
In order to use the plug-in, you must first have a plug-in created.
Please refer to this video for the overall process.
© 2024 OneMinuteCode. All rights reserved.