Search code examples
androidgoogle-play-console

FOREGROUND_SERVICE_DATA_SYNC Not declared but appearing in final build


I do not declare FOREGROUND_SERVICE_DATA_SYNC anywhere in my android manifest but it seems to appear in the final build.

Now I can't publish to play console because I must explain why I need the permission, because I'm targeting SDK 34.

How do I remove this permission


Solution

  • Look at the merged manifest -- there is a sub-tab for this in Android Studio's manifest editor. Some library that you are using is contributing that android:foregroundServiceType attribute. Once you identify the library, you can either: