Ionic: Background mode does not work in Android 12 with API level 31

I have an Ionic 5 app with Audio player which allows user’s to play audio even if the app is in background using Ionic Background mode plugin

Above requirement works fine in API level 30. But after using API level 31, Ionic Background mode plugin doesn’t work in Android 12.

Can any one please suggest me to solve this issue.

Yes i am also facing background issue for push notification. It was working when api level 30 but in api level 31 its not working for android 12. So anybody have any solution to resolve this issue. Pls let us know

Since background mode is not working for Android 12 with API level 31 for now, I have solved this issue by using powerOptimization.RequestOptimizations() before enabling Background mode for Android 12 devices.