Thank you. The direction was correct.
For anyone with the same problem, here is a rough summary.
Get the JNI Unreal Plugin at
https://github.com/Sovahero/PluginMobileNativeCode
follow the instructions. There are multiple examples that show how it works. You can add either a new java file with your own class, or you can implement the function in one of the working examples (ignore the class in the following code, if u prefer the second solution).
The Java Code that works on the Pico G24K is:
package com.Plugins.MobileNativeCode;
import android.os.Environment;
import androidx.annotation.Keep;
import java.io.File;
@Keep
public class SDInfo {
@Keep
public static String getSDPath() {
String removableStoragePath = "none";
File fileList[] = new File("/storage/").listFiles();
for (File file : fileList)
{ if(!file.getAbsolutePath().equalsIgnoreCase(Environment.getExternalStorageDirectory().getAbsolutePath()) && file.isDirectory() && file.canRead())
removableStoragePath = file.getAbsolutePath(); }
return removableStoragePath;
}
}
You will get the sd card path with the c++ call :
FString sdPath;
sdPath += AndroidUtils::CallJavaCode<FString>("com/Plugins/MobileNativeCode/SDInfo", "getSDPath", "", false);
I can confirm that it works with UE4.27 and the Pico G24K (tested with different sd cards).
Cheers!
Max