Android 12 - Samsung Accessory SDK can not start foreground service

I’ve added that information with some more to the case. But Support does not seem to be interested for supplying a solution.

1 Like

Hi, I am encountering the same problem and there seems to be no solution from Samsung. It is very urgent that this is fixed as soon as possible, as every day hundreds of new users are triggered with errors when using Android 12 and this penalizes our applications. This is a problem that arises from SAAgentV2 (also in SAAgent), so it cannot be modified by us, and should have been foreseen by Samsung before Android released its new version. Please solve this ASAP.

@drm
actually Google is not forcing Android 12 “yet” for the developers. So if you target your app to Android 11 , it should work for now. What I am trying to get from Samsung is a solution “before” Google forces targeting Android 12. I guess that will be around September 2023, so we still have about a year.
I hope Samsung comes up with a solution.
please correct me if I am wrong at some point…

Actually is November this year: Meet Google Play's target API level requirement  |  Android Developers (August for new apps). But anyway, in case you would like to use other kind of libraries or features such as the androidx libraries (and others) to benefit form the last upgrades you are forced to upgrade the app to the Android 12. And we cannot scape from upgrading to Android 12.

ah, thanks for this information.
As I don’t have an intention to release a new companinon app or update the available ones, I didn’t think that it is urgent.
But you are correct, if you have to update, then you’ll be in trouble after november.

Btw, did you try testing your app targeting Android 12 and disabling battery optimization for it ?

Another approach might be doing SAAgent peer connection on the activity instead of service. Then the user has to see the activity (if it works) whenever the peer connection is made.

Hi guys, I can see the same issue in my app crash statistics. Google even says my crashes are above the “bad behaviour threshold” at 2% of users per day.

Because of package dependencies I already had to update my app to Android 12/ Api Level 31. Looks like it was a bad idea.

It’s 2 months since the last post here and a solution, or at least a workaround is getting more urgent.

what can we do ?

I already submitted a ticket to Samsung. But did not receive any response for several weeks.

Did you submit an issue ?

I just submitted a detailed ticket including stack traces etc, highlighting the urgency and November 2022.

Good news, a fix is coming:
We have escalated your issue to our development team. Our development team is working right now to support API 31. Hopefully we will get back to you with the new version within next month.