ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

Follow publication

Compose + Wear OS: Chromatic Tuner

Practical example of the power of Jetpack Compose

Arildo Borges Jr
ProAndroidDev
Published in
5 min readNov 30, 2021

background created by freepik — br.freepik.com

In this article I will cover the development of a chromatic tuner for Wear OS, an android version designed for wearable devices — such as smartwatches, using Jetpack Compose 😎.

First of all, do you know what a chromatic tuner is? Not? Come on:

Chromatic tuner is for detecting the pitch of 12 musical notes, allowing instruments to be tuned correctly.

All musical notes have their specific vibration frequency. Note A4, for example, oscillates at 440Hz. Based on this, our goal is to develop an application that detects the frequency being played and how above or below the specific frequency of each of the 12 notes, so that the musician can tune his instrument correctly. Let’s go?

User Interface

Our app’s interface will be quite simple:

user interface image, demonstrating my strong design skills… 😅

The first state, with a green background, indicates that the played note has the same frequency as the A# note, that is, the note is in tune.

The second, in addition to the red color to indicate that the frequency is not correct, also displays side arrows to indicate whether the musician must increase or decrease the pitch of the note, in order to reach the correct frequency.

Setting up Project

It doesn’t take much mystery to create a project that supports Wear OS and Compose. You can create a new project as usual and add these three tags to AndroidManifest.xml:

Wear Compose

In addition to the conventional Compose packages, there are also specific packages for wearable devices:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Published in ProAndroidDev

The latest posts from Android Professionals and Google Developer Experts.

No responses yet

Write a response