# MusicApp-KMP: a Compose Multiplatform music player

> MusicApp-KMP is a Kotlin Multiplatform sample that plays Spotify charts and album data through a Compose Multiplatform interface on Android, iOS, desktop and web, using a different media player on each platform. It suits a developer learning how far Compose Multiplatform reaches into native APIs, and the Google sign-in it advertises is still pending.

**SEAbdulbasit/MusicApp-KMP** — This is a music player app built using Compose Multiplatform UI and KMP that works on Android, iOS, Desktop, and Web platforms.

- Repository: https://github.com/SEAbdulbasit/MusicApp-KMP
- Stars: 1,213 · Forks: 138
- Language: Kotlin
- License: MIT
- Published: 2026-10-19 · Updated: 2026-10-19 · Language: en
- Canonical page: https://hysenlabs.com/projects/seabdulbasit-musicapp-kmp

## The project and its purpose

This is a music player app built using Compose Multiplatform UI and Kotlin Multiplatform, and it works on Android, iOS, desktop and web. It uses the Spotify API for fetching the top 50 charts and getting the trending albums. The Google login is still pending, and for now you need to add the Spotify token manually, with the endpoint to get an album linked so you can obtain the token and set it in the app. The project has been listed as a KMP sample on the official JetBrains website for Kotlin Multiplatform, and there is a live version of the app hosted on GitHub Pages. The primary language is Kotlin, the licence is MIT, and the last push was on 2026-09-26. The repository has no GitHub releases, so the commit history is the history of the project, and the topics list is a good index of the technology involved, with compose-multiplatform, kmp, avplayer, exoplayer, spotify, jetbrains and multiplatform-compose all named.

## A different media player on every platform

The platform story is the interesting part of the sample, because the app uses different media players on different platforms. For iOS, AVKit is used. For Android, the Media Player is used. For desktop, the VLC media player is used. And for the web, an HTML media player is used. That is the correct way to build this, and the reason is that a media player is a platform service rather than something a cross-platform UI layer can abstract over. Compose Multiplatform gives you the interface, and the playback engine still has to be the native one for each target. The list of technologies in the README matches, with AVKit Media Player, VLC media player and HTML media player all named alongside Kotlin, Compose Multiplatform UI and the Compose Image Loader, plus Decompose for navigation.

## The stated goal, and the honest account of the difficulty

The README says one of the objectives of building the app was to explore how Compose UI interacts with low-level APIs, and that the experience was challenging yet fun and the process taught the author a lot. There is a specific detail about which integration was hardest, and it is not the one you would guess. Out of all the media players used, integrating with the web media player was the easiest, and the credit goes to IceRock Development and Aleksey Mikhailov for a demo application that was a fantastic learning resource. That is a useful signal for anyone attempting the same thing, because the expectation going in is usually the reverse, that the native targets are the hard ones because they are native, and in practice the browser's media element turns out to be the more awkward API to drive from a Kotlin side.

## Running it, and the token problem

The run instructions are short and one of the steps is the friction. You clone the repository with:

```bash
git clone https://github.com/SEAbdulbasit/MusicApp-KMP.git
```

Then you open the project in Android Studio or IntelliJ IDEA, search for the `_TOKEN_` file in the code and replace the placeholder with your Spotify access token, which you can generate from the Spotify Developer Dashboard. Then you run the app on your desired platform. The desktop and web targets have their own Gradle invocations, with `./gradlew desktopApp:run` for the desktop and `./gradlew jsBrowserDevelopmentRun` for the web. The README is upfront that there are known issues with the app using Compose Multiplatform UI, and those two are the documented workarounds. The token requirement is the practical first obstacle, and it means the app cannot be run by someone who has not registered a Spotify application, which is a reasonable constraint for a sample that talks to a real API.

## The module layout, and what is shared

The repository is the standard Kotlin Multiplatform Gradle shape, with the module names giving away the targets. There is `shared/` for the common code, `androidApp/`, `iosApp/`, `desktopApp/` and `webApp/` for the platform applications, plus a `kotlin-js-store/` directory for the Kotlin/JS dependency lock, a `docs/` directory, and the Gradle files at the root with `build.gradle.kts`, `settings.gradle.kts` and `gradle.properties`. The `shared/` module is where the interesting decision lives, because it is the only place the four targets share, and the four different media players are the platform-side implementations of one interface the shared code talks to. The presence of `webApp/` alongside `desktopApp/` rather than a single combined target is a hint that the web build is young, since the web media player was the newest integration.

## The TODO list, and what the sample is not

The README ends with an explicit list of what is missing, and it is short enough to quote. The TODO is to add Google login, to add a local database to save a favourite playlist, and to add an implementation for recent releases. The Google login is the one that also appears in the introduction, so it is not an oversight in the documentation but a feature that has not landed. Taken together, the TODOs describe an app that fetches and plays but does not remember. There is no local persistence, so favourites are not stored between sessions, and there is no account, so the Spotify access token is a manual paste into the source rather than a sign-in flow. For a sample whose purpose is to demonstrate Compose Multiplatform against platform APIs, that is a reasonable stopping point, since persistence and authentication are cross-platform data problems rather than UI problems. The repository also links a companion template, KMP-Compose-Template, for starting a new Compose Multiplatform project, and a sibling TravelApp-KMP project.

## Conclusion

Adopt MusicApp-KMP as a reference for Compose Multiplatform rather than as a music player, since it is listed as a KMP sample on the JetBrains site and the point of it is the platform integration. Skip it if you need a finished app, since the Google login is pending, there is no local database for favourite playlists and recent releases are on the TODO list. Before you run it, note that you have to paste a Spotify access token into the placeholder in the code, and that the desktop and web targets are launched through Gradle tasks rather than from the IDE.

## FAQ

### Which media players does MusicApp-KMP use?

AVKit on iOS, the Media Player on Android, the VLC media player on desktop and an HTML media player on the web. The README notes that integrating with the web media player was the easiest of the four.

### How do I run the MusicApp-KMP app?

Clone the repository, open it in Android Studio or IntelliJ IDEA, then find the _TOKEN_ file and replace the placeholder with a Spotify access token from the Spotify Developer Dashboard. Desktop runs with `./gradlew desktopApp:run` and web with `./gradlew jsBrowserDevelopmentRun`.

### Does MusicApp-KMP have Google sign-in?

Not yet. The README states the Google login is still pending and that for now you need to add the Spotify token manually, and adding Google login is the first item on the TODO list.

### What is the shared module in MusicApp-KMP?

The repository is a standard Kotlin Multiplatform Gradle layout with a shared/ module for the common code, plus androidApp/, iosApp/, desktopApp/ and webApp/ targets, a kotlin-js-store/ directory for the Kotlin/JS dependency lock and the Gradle files at the root.

## Sources

- [Issues](https://github.com/SEAbdulbasit/MusicApp-KMP/issues)
- [License: MIT](https://github.com/SEAbdulbasit/MusicApp-KMP/blob/master/LICENSE)
- [README](https://github.com/SEAbdulbasit/MusicApp-KMP/blob/master/README.md)
- [SEAbdulbasit/MusicApp-KMP on GitHub](https://github.com/SEAbdulbasit/MusicApp-KMP)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/seabdulbasit-musicapp-kmp
