Based on my experience, yes, it's definitely possible to get information about currently playing media on Android, though it requires some specific APIs.
The most reliable approach is to use the Media Session API, which lets you discover active media sessions and retrieve their metadata (title, artist, album art, etc.). You'll need to:
Use MediaSessionManager to get active sessions
Register callbacks to get notified of changes
Access metadata through MediaController
Here's what you'll need in your AndroidManifest.xml:
<uses-permission android:name="android.permission.MEDIA_CONTENT_CONTROL"/>
<uses-permission android:name="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE"/>
The trickiest part is that you need to implement a NotificationListenerService and request the user to grant notification access to your app - this is unavoidable since reading this data is considered sensitive.
One gotcha: media apps implement these APIs differently, so test with multiple players (Spotify, YouTube Music, etc.) to ensure your app works reliably.
If you run into issues with certain apps, you can fall back to reading media notifications, though that's more fragile.