# Unable to get files on oculus

**URL:** <https://forums.unrealengine.com/t/unable-to-get-files-on-oculus/594279>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [June 30, 2022, 4:14pm UTC](https://forums.unrealengine.com/t/unable-to-get-files-on-oculus/594279 "2022-06-30T16:14:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NateAins](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@NateAins](https://forums.unrealengine.com/u/NateAins)\
**Post date:** [June 30, 2022, 4:14pm UTC](https://forums.unrealengine.com/t/unable-to-get-files-on-oculus/594279/1 "2022-06-30T16:14:37Z")

</div>

I’m having an issue where after building my project onto oculus it is failing to get the files. When running within unreal on my computer it is fine. I’ve included my manifest file in case someone can see an issue with it.

```auto
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.epicgames.MyProject" android:installLocation="internalOnly" android:versionCode="1" android:versionName="1.0">
  <!-- Application Definition -->
  <application android:label="@string/app_name" android:icon="@drawable/icon" android:hardwareAccelerated="true" android:extractNativeLibs="true" android:name="com.epicgames.unreal.GameApplication" android:requestLegacyExternalStorage="true" android:hasCode="true">
    <activity android:name="com.epicgames.unreal.GameActivity" android:exported="true" android:label="@string/app_name" android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" android:configChanges="mcc|mnc|uiMode|density|screenSize|smallestScreenSize|screenLayout|orientation|keyboardHidden|keyboard|navigation|touchscreen|locale|fontScale|layoutDirection" android:resizeableActivity="false" android:launchMode="singleTask" android:screenOrientation="sensorLandscape" android:debuggable="true">
      <meta-data android:name="android.app.lib_name" android:value="Unreal" />
      <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="com.oculus.intent.category.VR" />
      </intent-filter>
      <meta-data android:name="com.oculus.vr.focusaware" android:value="true" />
    </activity>
    <activity android:name=".DownloaderActivity" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.EngineVersion" android:value="5.0.2" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.EngineBranch" android:value="++UE5+Release-5.0" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.ProjectVersion" android:value="1.0.0.0" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.DepthBufferPreference" android:value="0" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bPackageDataInsideApk" android:value="true" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bVerifyOBBOnStartUp" android:value="false" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bShouldHideUI" android:value="true" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.ProjectName" android:value="MyProject" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.AppType" android:value="" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bHasOBBFiles" android:value="true" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.BuildConfiguration" android:value="Development" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.CookedFlavors" android:value="ASTC" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bValidateTextureFormats" android:value="true" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bUseExternalFilesDir" android:value="true" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bPublicLogFiles" android:value="false" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bUseDisplayCutout" android:value="false" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bAllowIMU" android:value="true" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.bSupportsVulkan" android:value="true" />
    <meta-data android:name="com.epicgames.unreal.GameActivity.StartupPermissions" android:value="android.permission.WRITE_EXTERNAL_STORAGE" />
    <meta-data android:name="com.google.android.gms.games.APP_ID" android:value="@string/app_id" />
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
    <activity android:name="com.google.android.gms.ads.AdActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
    <service android:name="OBBDownloaderService" />
    <receiver android:name="AlarmReceiver" />
    <receiver android:name="com.epicgames.unreal.LocalNotificationReceiver" />
    <receiver android:name="com.epicgames.unreal.MulticastBroadcastReceiver" android:exported="true">
      <intent-filter>
        <action android:name="com.android.vending.INSTALL_REFERRER" />
      </intent-filter>
    </receiver>
    <meta-data android:name="android.max_aspect" android:value="2.10" />
    <meta-data android:name="com.oculus.supportedDevices" android:value="quest|delmar" />
    <meta-data android:name="com.oculus.handtracking.frequency" android:value="LOW" />
    <receiver android:name="com.epicgames.unreal.RemoteFileManagerReceiver" android:exported="true">
      <intent-filter>
        <action android:name="com.epicgames.unreal.RemoteFileManager.intent.COMMAND" />
      </intent-filter>
    </receiver>
    <meta-data android:name="com.epicgames.unreal.RemoteFileManager.bAllowNetworkConnection" android:value="true" />
  </application>
  <!-- Requirements -->
  <uses-feature android:glEsVersion="0x00030002" android:required="true" />
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
  <uses-permission android:name="android.permission.WAKE_LOCK" />
  <uses-permission android:name="com.android.vending.CHECK_LICENSE" />
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
  <uses-permission android:name="com.android.vending.BILLING" />
  <!-- Supported texture compression formats (cooked) -->
  <supports-gl-texture android:name="GL_KHR_texture_compression_astc_ldr" />
  <uses-feature android:name="android.hardware.vr.headtracking" android:version="1" android:required="true" />
  <uses-permission android:name="com.oculus.permission.HAND_TRACKING" />
  <uses-feature android:name="oculus.software.handtracking" android:required="false" />
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
  <uses-feature android:name="android.hardware.usb.host" />
</manifest>

```

I use the following function to get my txt file and it works fine when running on the computer.

```auto
FString UInputFileToString::GetFileToString(FString Filename)
{

	FString directory = FPaths::ProjectContentDir();
	FString result;
	IPlatformFile& file = FPlatformFileManager::Get().GetPlatformFile();
	if (file.CreateDirectory(*directory)) {
		FString myFile = directory + Filename;
		FFileHelper::LoadFileToString(result, *myFile);
	}

	return result;
}

```

In order to debug this, I have used the following post’s response to get all files within a folder. With the plan to print these files out to a debug UI. So I can check if the files are actually in the final build or not.

> [@IFIleManager and IFileManagerGeneric return null for files](https://forums.unrealengine.com/t/ifilemanager-and-ifilemanagergeneric-return-null-for-files/310177/3):
>
> That is it! I changed your code a bit to call it via Blueprint. For those who want to do this. You have to create a “new C++ class” that inherits from “Blueprint Function Libary”. Then you have to add the following code to the .h & the .cpp. .h: Add this before you #include “MyBlueprintFunctionLibrary.generated.h”. #include "HAL/FileManagerGeneric.h" #include "Misc/Paths.h" Add this in the UClass definition after GENERATED\_BODY() ! public: UFUNCTION(BlueprintCallable, Category = FileMa…

However, no matter whether I’m in a build or just running from my computer for some reason it returns no files.  
Does this not work in UE5 I can’t seem to get any results using the exact same code as within the post, with the following blueprint I seem to get nothing even tho there are PNGs within the file.

 ![Get Files error](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/6/8/568a109c60e8d030b5bb272ea5c23973295442e6.png)
