Android Music Player Controls on Lock Screen and Notifications

If you are just starting out, I recommend reading the first (basics about Media playback on Android) and second (Creating a Service to Play Music in the background) parts before proceeding. This post will discuss how to show Media Player controls on the lock screen and the notifications. Managing a…

Playing music in the background on Android

If you haven't read the first part, read it first to learn the basics about Media playback on Android. Playing music in the background If you want your media to play in the background while the user is interacting with other applications, then you must start a Service and control…

Media Player basics for Android

As my previous post about creating Android Music Player was getting a lot of traction, I figured it's about time to do a rewrite as the previous one is ages old and there have been a lot of improvements and better APIs on Android for supporting music since then. This…

Building a Music Player App for Android

As my previous post about creating Android Music Player was getting a lot of traction, I figured it's about time to do a rewrite as the previous one is ages old and there have been a lot of improvements and better APIs on Android for supporting music since then. This…

Why I use Kotlin for Android

Kotlin is a statically typed language developed by JetBrains that targets the JVM. If you have worked with Java before, you know how verbose it could be. When Apple released Swift, developers rejoiced for a better alternative to Objective C. Kotlin could be that alternative for Android developers working with…

Refresh OAuth access token with Retrofit, RxJava

A very common use case when working with OAuth is to refresh the auth token. One way could be to do it periodically. A much simpler way, although, is to try refresh the auth token when you see a 401 response for an authenticated user. This is very straightforward to…