I have been working on various features on our Android 14 App using the latest version of Android Studio Hedgehog and Java over the past months. Whenever I completed a big feature, I published the App using Google's Play Console.
Today, I wasn't able to do so, because apparently my App uses android.permission.FOREGROUND_SERVICE_LOCATION and because of that I need to adjust our Manifest file to show where we use this permission and I need to declare via video in Google's Play Console where we use it and why we need it.
My problem: I do not know where we use it...
- If I search for the text FOREGROUND_SERVICE_LOCATION I do not find anything.
- If I search for functions that are associated with this permission such as startForeground or stopForeground (see here), I have zero hits.
- I also checked for the word permission throughout the entire application and found nothing that was unexpected or had foreground in its name.
- We have no object that extends a Service or a Worker.
I do use quite a lot of hardware components on the devices (camera, location, Bluetooth, NFC, Barcode Scanner, ...), but only when the App is running and not in the background.
But when I upload the latest Bundle into Google's Play Console, I get the following list of permissions the App apparently requests. Many of them I do in fact declare in our Manifest, but I have no idea where the foreground services are coming from. Therefore, I do not know how to declare my Manifest properly.
- android.permission.ACCESS_COARSE_LOCATION
- android.permission.ACCESS_FINE_LOCATION
- android.permission.ACCESS_MEDIA_LOCATION
- android.permission.ACCESS_NETWORK_STATE
- android.permission.ACCESS_WIFI_STATE
- android.permission.BLUETOOTH
- android.permission.BLUETOOTH_ADMIN
- android.permission.BLUETOOTH_SCAN
- android.permission.CAMERA
- android.permission.FOREGROUND_SERVICE_LOCATION
- android.permission.INTERNET
- android.permission.NFC
- android.permission.POST_NOTIFICATIONS
- android.permission.READ_EXTERNAL_STORAGE
- android.permission.READ_PHONE_STATE
- android.permission.RECEIVE_BOOT_COMPLETED
- android.permission.WAKE_LOCK
- android.permission.WRITE_EXTERNAL_STORAGE
- com.google.android.c2dm.permission.RECEIVE
- com.symbol.emdk.permission.EMDK
I am grateful for any support.