woocommerce-android icon indicating copy to clipboard operation
woocommerce-android copied to clipboard

Remove the use of foreground service for image uploads

Open 0nko opened this issue 1 year ago • 1 comments

Google's Permissions for Foreground Services policy states that:

For apps targeting Android 14 and above, you must specify a valid foreground service type and permission for each foreground service used in your app

Currently we use a foreground service to upload product images on devices running Android 13 and below. For Android 14 and above, we use the recommended approach by Google, which complies with their policies. Since we are still targeting Android 13 (API 33), we we’re fine but once we target API 34, we must remove the foreground service usage for any device Android version.

0nko avatar Apr 12 '24 10:04 0nko

Thanks for reporting! 👍

dangermattic avatar Apr 12 '24 10:04 dangermattic

We are now targeting API 34 and we're still using foreground service for Android 13 and lower devices. I retested uploading an image when the app was in the background on an Android 13 device. The foreground service worked as expected.

For apps targeting Android 14 and above, you must specify a valid foreground service type and permission for each foreground service used in your app

For apps targeting Android 14 and above, should refer to Android 14+ devices (not all devices after setting targetSdk=34). Since we do not use foreground service for Android 14, no changes are necessary.

irfano avatar Jul 19 '24 18:07 irfano