src: official unreal engine forum question
https://forums.unrealengine.com/t/5-3-2-packed-android-gps-access-fine-location-not-working/1854054
browse to the internal Unreal Engine Android LocationServicesAndroidImpl
UE 5.4: on my side it is located here: C:\Program Files\Epic Games\UE_5.4\Engine\Plugins\Runtime\LocationServicesAndroidImpl
UE 5.5: on my side it is located here: C:\Program Files\Epic Games\UE_5.5\Engine\Plugins\Runtime\LocationServicesAndroidImpl
copy the whole folder to you projects plugins folder
i.E. C:\temp\<PROJECT_NAME>\Plugins\LocationServicesAndroidImpl
verify that your project has the plugin enabled by open C:\temp\<PROJECT_NAME>\<PROJECT_NAME>.uproject with a text editor
there has to be a entry like this:
{
"Name": "LocationServicesAndroidImpl",
"Enabled": true
}
modifying file LocationServicesAndroidImpl_UPL.xml
FYI: <PROJECT_NAME>\Plugins\LocationServicesAndroidImpl\Source\LocationServicesAndroidImpl\LocationServicesAndroidImpl_UPL.xml
Find the following line and change it from
locationManager.requestLocationUpdates(providerName, (long)LocationServicesUpdateFrequency, LocationServicesMinDistance, LocationListen);
to
locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, (long)LocationServicesUpdateFrequency, LocationServicesMinDistance, LocationListen);
FYI: On the file below it is on line 175
modify same file <PROJECT_NAME>\Plugins\LocationServicesAndroidImpl\Source\LocationServicesAndroidImpl\LocationServicesAndroidImpl_UPL.xml
search for line and replace from
activityContext.runOnUiThread(new Runnable()
to
this.runOnUiThread(new Runnable()
FYI: On the file below it is on line 164
Additionally, we needed to add the following permissions to
<PROJECT_NAME>\Plugins\LocationServicesAndroidImpl\Source\LocationServicesAndroidImpl\LocationServicesAndroidImpl_UPL.xml
<addPermission android:name="android.permission.INTERNET"/>
<addPermission android:name="android.permission.ACCESS_WIFI_STATE"/>
<addPermission android:name="android.permission.ACCESS_NETWORK_STATE"/>
FYI: Located at line 33 to 35 on the file below
Please find below the modified LocationServicesAndroidImpl_UPL.xml that we used.
That should act as a good guide when you compare it with a tool to your local version:
After a successful build and start, when the app asks for write permissions, you need to
place a ManifestRequirementsOverride.txt in the following folder: PROJECT_FOLDER\Build\Android\ManifestRequirementsOverride.txt
with the content