As per Android policy and internal logic, we stopped the playback
foreground service when playback was paused. This made our PlayService
elligible for garbage collection by the OS. This had the consequences of
not allowing someone to pause playback and resume it after some time.
Android would always kill the service after around one minute.
This commit, on supported Android version (7.0+) detaches the
notification when stopping the foreground service, leaving the
notification in place even when the service is killed, allowing the user
to resume playback whenever they please.
We also had to move the MediaSession out of the service, for it to
remain alive between service killing and resurrection.
On top this fix, this commit adds support for "My content" and
"Favorites" instance radios (fixes#51), as well as clearly separates instance
radios from user radios.
Radios were a bit unusable when not logged in with an actual authorized
user account, this commit fixes the following elements:
* Anonymous users get a transient session cookie when starting a radio
session that was not stored and forwarded on playback, meaning no
radios would play;
* Anonymous users do not have their own own content. Thus, only the
"Random" radio makes sense in that context. This commit only display
the instance radios that are relevant to your authentication status.
"My content" radios needs the user ID to function properly, this commit
also adds retrieving it from the /api/v1/users/users/me/ endpoint, which
now may be used in the future for other purposes.