Soundscape Service
Foreground service that provides location updates, device orientation updates, requests tiles, data persistence with realmDB. It inherits from MediaSessionService so that we can receive Media Transport button presses to act as a remote control whilst the phone is locked.
Properties
True while the user is actively navigating the audio menu. Suppresses auto callouts.
Functions
isAudioEngineBusy returns true if there is more than one entry in the audio engine queue. The queue consists of earcons and text-to-speech.
Media3's default implementation posts its own media notification and, every time the notification is refreshed, calls Context.startForegroundService() on this service followed by startForeground() with only the mediaPlayback type (or stopForeground() when it decides playback has stopped). Those calls are posted asynchronously, so one that lands after stopSelf() re-creates the service record with a pending "must call startForeground()", and the system then kills the app with a RemoteServiceException as soon as that record is stopped again (e.g. stopWithTask on exit). We own the foreground state and the notification ourselves, so Media3 must not touch either.
Stops the foreground service and removes the notification. Can be called from inside or outside the service.
streetPreviewGo is called when the 'GO' button is pressed when in StreetPreview mode. It indicates that the user has selected the direction of travel in which they which to move.