Jump to content
 
henrikvrtraveler

Focus sdcard2

Recommended Posts

Hi!

I am attempting to access the sdcard2 folder from inside my application, I've tried many different paths however I am not sure if my app is allowed to access this folder / sd card.

Any tips on what I can do to access the sdcard2? :)

 

 

I've tried the following paths:
/storage/ext_sd/

/sdcard2

Share this post


Link to post
Share on other sites

Have you added the permissions to the android manifest?

 

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

 

Share this post


Link to post
Share on other sites

Indeed!

 

I've also ran the commands:

adb shell pm grant APP android.permission.READ_EXTERNAL_STORAGEadb shell pm grant APP android.permission.WRITE_EXTERNAL_STORAGE

To no avail.

 

I fear the paths might not be working, or the app doesn't have permissions.

 

We're running Kiosk, do you think that may be altering permissions or something?

Share this post


Link to post
Share on other sites

What game engine are you using? Can you share a code snippet that includes the full paths you're testing?

Share this post


Link to post
Share on other sites

@Cory_HTC

Unreal Engine 4.21

Code snippet:
 

FString filePath = FString(FileLocation);
    IPlatformFile& PlatformFile = FPlatformFileManager::Get().GetPlatformFile();

    if (PlatformFile.FileExists(*filePath)) {

 

But it will return false on the sd card.
Works for files on the inbuilt storage, we are using kiosk mode with that SD card, would that interfere?

 

The paths are like before:

/storage/ext_sd/

/sdcard2

 

Or more specifically paths like:
/sdcard2/images/1.png
/storage/ext_sd/images/1.png

Using ADB the paths exists and files are found from my windows machine.

Share this post


Link to post
Share on other sites

Please sign in to comment

You need to be a member in order to leave a comment

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...