Breathe Time App

Yoga / Meditation app on WearOS

Siamak (Ash) Ashrafi
2 min readSep 10, 2022

Description

Time for breathing

Graph happiness of session

Steps:
1. Mark how you feel
2. Take a breather
3. Mark how you feel
4. See the graph of improvement.

Much more to come …

Video

Software Architecture

Much more coming soon …

Proof of concept using Compose for WearOS with Hilt DI, ViewModel (Hilt), Navigation, Room, Repo etc …

This looks just an Android app on the phone.

Libraries

implementation ‘androidx.lifecycle:lifecycle-service:2.4.0’

def lifecycle_version = “2.4.0”

def arch_version = “2.1.0”

// General compose dependencies

implementation “androidx.activity:activity-compose:1.4.0”

implementation ‘androidx.compose.ui:ui-tooling-preview:1.2.0-alpha01’

implementation ‘androidx.compose.compiler:compiler:1.2.0-alpha01’

// foundation is additive to wearOS foundation

implementation ‘androidx.compose.foundation:foundation:1.2.0-alpha01’

implementation ‘androidx.compose.material:material:1.2.0-alpha01’

implementation “androidx.compose.material:material-icons-extended:1.2.0-alpha01”

// Compose for Wear OS Dependencies

// Developer Preview starts with Alpha 07, with new releases coming soon.

// NOTE: DO NOT INCLUDE a dependency on androidx.compose.material:material.

// androidx.wear.compose:compose-material is designed as a replacement not an addition to

// androidx.compose.material:material. If there are features from that you feel are missing from

// androidx.wear.compose:compose-material please raise a bug to let us know:

// https://issuetracker.google.com/issues/new?component=1077552&template=1598429&pli=1

implementation ‘androidx.wear.compose:compose-material:1.0.0-alpha14’

// Foundation is additive, so you can use the mobile version in your Wear OS app.

implementation ‘androidx.wear.compose:compose-foundation:1.0.0-alpha14’

// If you are using Compose Navigation, use the Wear OS version (NOT the

// androidx.navigation:navigation-compose version), that is, uncomment the line below.

implementation ‘androidx.wear.compose:compose-navigation:1.0.0-alpha14’

// Hilt

implementation ‘com.google.dagger:hilt-android:2.40.5’

implementation ‘androidx.appcompat:appcompat:1.4.1’

kapt ‘com.google.dagger:hilt-compiler:2.40.5’

// Hilt ViewModel

implementation ‘androidx.hilt:hilt-navigation-compose:1.0.0-rc01’

// inject the ModelView

implementation(“androidx.hilt:hilt-lifecycle-viewmodel:1.0.0-alpha03”)//1.0.0-alpha02'

// When using Kotlin.

kapt(“androidx.hilt:hilt-compiler:1.0.0”)

// ViewModel

implementation “androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version”

// ViewModel utilities for Compose

implementation “androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version”

// Room DB

implementation “androidx.room:room-runtime:$room_version”

// For Kotlin use kapt instead of annotationProcessor

kapt “androidx.room:room-compiler:$room_version”

// annotationProcessor “androidx.room:room-compiler:$room_version”

// optional — Kotlin Extensions and Coroutines support for Room

implementation “androidx.room:room-ktx:$room_version”

// optional — Test helpers

testImplementation “androidx.room:room-testing:$room_version”

// optional — Paging 3 Integration

implementation ‘androidx.room:room-paging:2.4.1’

// KTX

implementation ‘androidx.core:core-ktx:1.7.0’

implementation ‘androidx.appcompat:appcompat-resources:1.4.1’

implementation ‘com.google.android.gms:play-services-wearable:17.1.0’

implementation ‘androidx.percentlayout:percentlayout:1.0.0’

implementation ‘androidx.legacy:legacy-support-v4:1.0.0’

debugImplementation ‘androidx.compose.ui:ui-tooling:1.2.0-alpha01’

--

--