In the migration guide it is suggested that we use NotificationManager.startServiceInForeground() instead of startService() when necessary.
But I cannot see any startServiceInForeground() method in NotificationManager. What am I missing?
In the migration guide it is suggested that we use NotificationManager.startServiceInForeground() instead of startService() when necessary.
But I cannot see any startServiceInForeground() method in NotificationManager. What am I missing?
They haven't changed in the migration guide yet.
You should use ContextCompat.startForegroundService() instead of NotificationManager.startServiceInForeground() method.