I am trying to implement this Appsflyer Uninstall Tracking feature: https://support.appsflyer.com/hc/en-us/articles/210289286?input_string=android+uninstall+tracking#Android-Uninstall
and it requires setting up a FCM service to handle silent push apparently. Problem is background services are restricted after API level 26: https://developer.android.com/guide/components/services
So how would this work? Am I missing something here? Tried searching for FCM and service background restrictions and found no discussions around that.
In general the FCM documentation states that processing messages (and tokens) can be done within the service, as long as it's fast enough (20 secs.), see here: https://firebase.google.com/docs/cloud-messaging/android/receive
I guess if you're using the Appsflyer FirebaseMessagingServiceListener they will (at least they should when providing such service) handle all the background processing if necessary. Otherwise if you're intending to implement the FirebaseMessagingService by yourself, just hand over the FCM token as described in their documentation. Same should apply here: AppsFlyer should handle background processing if necessary.
For your own background processing (more then 20 secs.) consider using JobScheduler.