# How to get absolute path of plugin's non-asset files on Android

**URL:** <https://forums.unrealengine.com/t/how-to-get-absolute-path-of-plugins-non-asset-files-on-android/445580>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, CPP, question\
**Created:** [March 19, 2019, 1:42pm UTC](https://forums.unrealengine.com/t/how-to-get-absolute-path-of-plugins-non-asset-files-on-android/445580 "2019-03-19T13:42:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![UMERUMA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UMERUMA](https://forums.unrealengine.com/u/UMERUMA)\
**Post date:** [March 19, 2019, 1:42pm UTC](https://forums.unrealengine.com/t/how-to-get-absolute-path-of-plugins-non-asset-files-on-android/445580/1 "2019-03-19T13:42:51Z")

</div>

I’m working on a making plugin with third party library.  
The library requires a license file’s absolute path using original file extension (like .xy but it’s just xml format file)

```
MyUEProject/
  ┗ Plugins/
    ┗ ThirdPartyPlugin/
      ┗ Assets/
        ┗ license.xy

```

I added `../Plugins/ThirdPartyPlugin/Assets` to  
Project\> Packaging\> [Additional Non-Assets Directories to Package]

On iOS, This codes in plugin works fine:

```
FString FullPath = IFileManager::Get().ConvertToAbsolutePathForExternalAppForRead(*FPaths::ProjectPluginsDir());
FString filePath = FullPath + FString("ThirdPartyPlugin/Assets/license.xy");

```

However, on Android, the `filePath` won’t be absolute path. This will be `"../../../MyUEProject/Plugins/"`  
I googled and tried codes below:

```
extern FString GFilePathBase;
FString androidFullPath = GFilePathBase + FString("/UE4Game/") + FApp::GetGameName() + "/" + FApp::GetGameName() +FString("/ThirdPartyPlugin/Assets/license.xy");

```

`androidFullPath` will be:  
`/storage/emulated/0/UE4Game/MyUEProject/MyUEProject/Plugins/ThirdPartyPlugin/Assets/license.xy`

But `licence.xy` file isn’t there.

How to add non-asset files for a custom plugin?  
And how to get absolute path of plugin’s non-asset files on Android?

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [March 19, 2019, 8:22pm UTC](https://forums.unrealengine.com/t/how-to-get-absolute-path-of-plugins-non-asset-files-on-android/445580/2 "2019-03-19T20:22:40Z")

</div>

There FPaths class which have function returning paths to variues things:

> **[FPaths](https://docs.unrealengine.com/5.1/en-US/API/Runtime/Core/Misc/FPaths/)**
>
> Path helpers for retrieving game dir, engine dir, etc.

---

<div class="post-metadata">

**Author:** ![UMERUMA](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@UMERUMA](https://forums.unrealengine.com/u/UMERUMA)\
**Post date:** [May 28, 2019, 10:01am UTC](https://forums.unrealengine.com/t/how-to-get-absolute-path-of-plugins-non-asset-files-on-android/445580/3 "2019-05-28T10:01:56Z")

</div>

Self-solving:  
I changed how to manage assets for plugin:

- Add plugin assets in Contents folder like ( `Contents/ThirdPartyPlugin/Assets/license.xy` )
- After launching game, copy assets to external directory, and get the path with GExternalFilePath method. ([4.10 Android package custom files along - #5 by Chris\_Babcock - Mobile Development - Unreal Engine Forums](https://forums.unrealengine.com/development-discussion/android-development/74763-4-10-android-package-custom-files-along?p=686181#post686181) )
