I uploaded my flutter application to google play and got this message Crashing after launch Your app crashes after launch, which means we cannot review your app for Android TV inclusion. the app is live on mobile and tablet but on tv it is rejected
i am using Firebase's Crashlytics and got a crash on a tv device during review here is the stack trace
Fatal Exception: android.app.RemoteServiceException: Context.startForegroundService() did not then call Service.startForeground(): ServiceRecord{65809c8 u0 com.freevpnapp/de.blinkt.openvpn.core.OpenVPNService}
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2005)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
i tested the app on multiple emulator and real devices with no crashes
this issue happens when you call Context.startForegroundService() and not call Service.startForeground(): immediately in my case i added code to log when they are being called and it is instantly so there should be no problem
i also simulated the crash on an emulator by adding a delay of 10 seconds before startForeground() is called and it crashed but there is no way this happens normaly without the delay.
google is not providing where the crash happens or any log