diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/MusicPlaybackReceiver.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/MusicPlaybackReceiver.java index d910e75eb..67c7e8e70 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/MusicPlaybackReceiver.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/externalevents/MusicPlaybackReceiver.java @@ -3,6 +3,7 @@ package nodomain.freeyourgadget.gadgetbridge.externalevents; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; +import android.os.Bundle; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -18,20 +19,13 @@ public class MusicPlaybackReceiver extends BroadcastReceiver { String artist = intent.getStringExtra("artist"); String album = intent.getStringExtra("album"); String track = intent.getStringExtra("track"); - /* - Bundle bundle = intent.getExtras(); - for (String key : bundle.keySet()) { - Object value = bundle.get(key); - LOG.info(String.format("%s %s (%s)", key, - value != null ? value.toString() : "null", value != null ? value.getClass().getName() : "no class")); - } - */ + LOG.info("Current track: " + artist + ", " + album + ", " + track); MusicSpec musicSpec = new MusicSpec(); musicSpec.artist = artist; - musicSpec.artist = album; - musicSpec.artist = track; + musicSpec.album = album; + musicSpec.track = track; GBApplication.deviceService().onSetMusicInfo(musicSpec); }