

여러 페이지의 알림을 만들기 위해서는:
- 당신이 휴대용 장치에 알림을 표시하고자 하는 방법으로, NotificationCompat.Builder로 메인 알림(첫 페이지)을 만들어라.
- NotificationCompat.Builder로 웨어러블 장치의 추가 페이지를 만들어라.
- addPage() 메소드로 메일 알림에 페이지들을 적용하거나 addPages() 메소드로 Collection에 여러 페이지를 추가하라.
예를들어, 여기에 알림에 두 번째 페에지를 추가하는 코드가 몇가지 있다:
// Create builder for the main notification
NotificationCompat.Builder notificationBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.new_message)
.setContentTitle("Page 1")
.setContentText("Short message")
.setContentIntent(viewPendingIntent);
// Create a big text style for the second page
BigTextStyle secondPageStyle = new NotificationCompat.BigTextStyle();
secondPageStyle.setBigContentTitle("Page 2")
.bigText("A lot of text...");
// Create second page notification
Notification secondPageNotification =
new NotificationCompat.Builder(this)
.setStyle(secondPageStyle)
.build();
// Add second page with wearable extender and extend the main notification
Notification twoPageNotification =
new WearableExtender()
.addPage(secondPageNotification)
.extend(notificationBuilder)
.build();
// Issue the notification
notificationManager =
NotificationManagerCompat.from(this);
notificationManager.notify(notificationId, twoPageNotification);