본문 바로가기
Android

Wear Os (워치)

by Jiwon_Loopy 2024. 9. 17.
반응형

해당 포스트는 뷰 기반 UI를 다루고 있으며, Compose에 관한 이야기는 다루지 않고 있습니다.

 

Wear Os 란?


Wear Os란, 구글에서 제작한 Android 기반의 스마트워치 운영체제이며, 삼성, LG, 소니와 같은 모바일 회사 뿐 아니라 파슬, 태그호이어, 몽블랑 등전통적인 시계 회사들도 탑재하는 OS 입니다.

 

 

 

주요 기능


 

이름 기능
Google Assistant 음성 명령을 통해 메세지 보내기, 알람 설정, 날씨 정보 등을 확인 가능
피트니스 및 건강 관리 Google Fit와 같은 앱을 통해 걸음 수, 심박수, 운동 시간 등을 추적할 수 있고, 피트니스 목표 설정 가능
알림 및 메세지  스마트폰과 연동하여 전화, 문자, 이메일 등의 알림을 실시간으로 받거나, 답장할 수 있음
앱 설치 Play Store를 통해 앱을 다운로드하고 설치할 수 있으며, 다양한 서드 파티 앱을 사용 가능
지불 가능 NFC를 지원하는 기기에서는 Google Play를 통해 스마트워치로 직접 결제 가능
맞춤형 워치 페이스 사용자가 선호하는 디자인으로 워치 페이스를설정, 필요한 정보를 표시할 수 있음 

 

 

 

시작하기


안드로이드 프로젝트를 만들 때 Templates 창에서 Wear Os를 선택한 뒤, Empty Wear App을 선택하기

도구 -> SDK ㅡ SDK Manager를 선택하여 아래 두 가지를 설치

 

  • Android 14.0('UpsideDownCake) (API 수준 34) - Wear OS 5 - ARM 64 v8a 시스템 이미지  Wear OS 5 - Intel x86 Atom_64 시스템 이미지.
  • Android 13.0('Tiramisu') (API 수준 33) - Wear OS 4 ARM 64 v8a 시스템 이미지  Wear OS 4 Intel x86 Atom_64 시스템 이미지

 

에뮬레이터 연결

출처 : Android Develoters 공식문서

 

 

실제 워치에서 사용

출처 : Android Develoters 공식문서

 

 

Wear Os 의 대표적인 UI


이름 기능
CurvedTextView  뷰에 표현될 수있는 가장 큰 원의 곡선을 따라 텍스트를 쉽게 작성하기 위한 뷰 
DismissibleFrameLayout  사용자가 뒤로가기를 누르거나 화면을 스와이프 하여 뷰를 닫을 수 있는 레이아웃, Wear OS 사용자는 뒤로 가기위해 왼쪽에서 오른쪽으로 스와이프 하는 것을 기대
WearableRecyclerView  WearableLinearLayoutManager를 사용하여 하위 레이아웃을 업데이트하는 기본 오프섹 로직을 제공
AmbientModeSupport  대기 모드를 지원하기 위해, AnbientModeSupport.AmbientCallBackProvider 인터페이스와 함께 사용

 

 

종속 항목 추가


dependencies {
    ...
  // Standard Wear OS libraries
  implementation "androidx.wear:wear:1.2.0"
  // includes support for wearable specific inputs
  implementation "androidx.wear:wear-input:1.1.0"
}

 

 

 

 

레이아웃 파일 지정


<androidx.wear.widget.DismissibleFrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/swipe_dismiss_root" >

    <TextView
        android:id="@+id/test_content"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="Swipe the screen to dismiss me." />
</androidx.wear.widget.DismissibleFrameLayout>

 

 

 

 

 

 

 

참고 자료


 

Wear OS  |  Android Developers

시계에 맞게 최적화된 Android 기반 운영체제인 Wear OS에 관해 알아보세요.

developer.android.com

 

728x90
반응형

'Android' 카테고리의 다른 글

Widget (위젯)  (2) 2024.09.19
Hilt (의존성 주입) (1)  (2) 2024.09.18
PCM (펄스 코드 변조)  (5) 2024.09.09
WebRTC (1) - 웹RTC (스트리밍)  (1) 2024.09.08
Glide 글라이드 (이미지)  (2) 2024.09.07