

the action "" corresponds to the same action that is used by default on Android rather than creating a custom action for every player, it is better to stick to this one.However, there are a few points worth noting: The snippets are pretty self-explanatory. tAction("") īundle.putLong("position", 30000L) // 0:30īundle.putBoolean("playing", false) // currently playing tAction("") īundle.putString("artist", "Natalie Imbruglia") īundle.putString("album", "Left of the Middle") īundle.putLong("duration", 245000L) // 4:05īundle.putLong("position", 1L) // beginning of the songīundle.putBoolean("playing", true) // currently playingīundle.putString("scrobbling_source", "") Īnd this is a sample intent for the same song, which has been put to pause at 30 seconds: This is how the intent for a "new" song should look like: Let's see how to create a sample intent for these events. Package name of the application that sends the Intent (String) Playback status of the current track (Boolean, whether is playing or paused) The current playback position of the track (Long, milliseconds) The following list contains all the extra fields that the Intent must contain:ĭuration of the current track (Long, milliseconds) The playstate has changed, indicating that a playback event has occurred (play/pause, seek, stop, next/prev. The metadata has changed, which typically means that a new song is now playing Basically, FloatingLyrics™ reacts to these two events: Enabling FloatingLyrics™ for your application is fairly straightforward, as it is entirely controlled via broadcast intents.
