Afternoon,
I’m currently in the process of publishing my game to the PlayStore for testing.
The developer console is warning: You have undeclared foreground service permissions.
The specific permission is FOREGROUND_SERVICE_DATA_SYNC. I have not added this to the manifest so it must be something that Unity has done.
As far as I’m aware there are no foreground services in use in my game. The game is pretty standard for a Unity game. The only notable addons are Unity Legacy Ads and Unity’s In App Purchasing.
Related to data sync, I’m also using the c# HttpClient and UdpClient for in game value saving and online gameplay respectively. These are only connecting while the game is running.
As far as I can see neither would be running a foreground service.
The problem is that the developer console wants a video of the foreground service in use to verify if it is being used properly. Without knowing what the service is, making the video is a bit difficult.
If this permission is not needed is there a way to remove it from the android manifest?
Does anyone know where the permission is being added from?
Does anyone have any advice as to how to resolve this?
Any help or suggestions would be appreciated.
Quick update: I’ve built an APK from Unity and extracted the Android Manifest using apktool. This doesn’t have the same permissions. However if I build an AAB and use bundletool to extract the APKs the manifest in the base-master.apk does have the permissions.
I would be exporting the project to Android Studio but I have scripts that do processing during the build that I don’t think would work from android studio.
Any ideas?
You are indeed correct. My appologies.
– Vadose