getBackStackedActivity

Returns a back stacked session activity that is used by the notification when the service is running standalone as a foreground service. This is typically the case after the app has been dismissed from the recent tasks, or after automatic playback resumption.

Typically, a playback activity should be started with a stack of activities underneath. This way, when pressing back, the user doesn't land on the home screen of the device, but on an activity defined in the back stack.

See androidx.core.app.TaskStackBuilder to construct a back stack.

If null is returned, MediaSession.setSessionActivity is not set by the demo service.