Announcements

Help Wizard

Step 1

NEXT STEP

Spotify do not broadcast com.spotify.music.metadatachanged on android 11 api level 30

Spotify do not broadcast com.spotify.music.metadatachanged on android 11 api level 30

I'm testing in a Poco X3 pro miui 12.0.2 android 11 the "Device Broadcast Status" is enabled

There is a Intent filter on android manifest file

but it does not work!

However in android 8 the same code works fine!

Plan

Free/Premium

Country

Brazil

Device

Poco X3 pro

Operating System

miui 12.0.2 android 11

 

My Question or Issue

There are a bug on spotify or miui? I can't get any broadcast from spotify...

Anybody can help me make it work?

Reply
1 Reply

That's helped me https://github.com/spotify/android-sdk/issues/26#issuecomment-424043976

 

You'll need register the broadcast receiver in your activity | fragment | service 

In Android manifest file does not work as mentioned in https://developer.android.com/guide/components/broadcast-exceptions

 

Some like this:

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val receiver = MyReceiver()

val filter = IntentFilter()
filter.addAction("com.spotify.music.metadatachanged")
registerReceiver(receiver, filter)
}

 

Suggested posts