Posts

Showing posts from February, 2025

Week11

Image
Week 11 Progress: Building the App Interface and State Management Objective: To design and implement the primary interface for the smart sock Android application using Jetpack Compose. This included setting up the BLE device list screen, live data display components, and the infrastructure for real-time state management. Implementation: During this week, focus was placed on two major components: the connection logic in  MainActivity.kt  and the UI construction within  ConnectedDeviceScreen.kt . The goal was to build a responsive, functional layout that could reflect live BLE data and display relevant health status indicators. Connection Flow and UI Switching: A reactive architecture was adopted using  mutableStateOf  variables such as  isConnected ,  connectedDeviceData , and  alarmStatusState . These were used to dynamically swap between the scanning screen and the connected device screen: setContent {     if (isConnected) {   ...