진행률 중심 알림 만들기

진행 상황 중심 알림
그림 1. 알림 창 상단에 표시되는 진행률 중심 알림

Android 16에서는 사용자가 시작부터 끝까지의 사용자 시작 여정을 원활하게 추적할 수 있는 새로운 알림 템플릿을 도입합니다. 이러한 알림은 시스템 표시 경로에서의 가시성과 알림 창의 상위 순위가 업그레이드됩니다.

Notification.ProgressStyle을 사용하여 진행률 중심 알림의 스타일을 지정합니다. 주요 사용 사례로는 차량 공유, 배송, 내비게이션이 있습니다. 이 클래스 내에서 포인트와 세그먼트를 사용하여 사용자 여정의 상태와 마일스톤을 지정할 수 있습니다.

관련 수업

다음 클래스에는 ProgressStyle 알림을 생성하는 데 사용하는 다양한 API가 포함되어 있습니다.

구조 및 맞춤설정

다음 이미지는 ProgressStyle 알림을 구성하는 다양한 부분을 보여줍니다.

그림 2.ProgressStyle notification.
Figure 3. Apps can set a vehicle image for the tracker icon and use segments and points to denote the rideshare experience and milestones.

Set up

Use the right APIs and follow best practices to provide the best user experience for progress updates.

  • Set the right fields to meet promoted visibility.
  • Use the right visual elements to guide users. For example, rideshare apps should set a vehicle image and use the most accurate color of the vehicle in the notification using Notification#setLargeIcon.
  • Use concise and clear language to define the progress of the user journey. Time of arrival, driver name, and state of the journey are important text that the notification should communicate.
  • Provide useful and relevant actions in the notification that streamline the user journey. For example, providing "Tip" and "Add dish" to a newly initiated food delivery order are useful actions before delivery.
  • Use segments and points to denote states. For example, segments can colorize the state and duration of traffic in a rideshare journey. Points represent states for milestones such as food preparation, delivery, and passenger pickup.
  • Update the progress experience to accurately reflect the actual progression of the journey. For example, changes in traffic conditions can be reflected in changes in segment colors and updates in text.

The following example shows a ProgressStyle notification for a rideshare app.

The example shows the use of a vehicle image for the tracker icon. It also shows the use of segments and points to denote the rideshare experience and milestones.

See the sample app to experiment with these APIs.

의 여러 부분