Notifications

Because TV users spend most of their time on immersive activities, sending notifications is not allowed on webOS TV. All types of notifications are reserved as system-related events.

There are two types of notifications:

  • Toasts
  • Alerts

Note

Toasts and alerts are only available in system apps, not 3rd party apps.

Toasts

The purpose of toasts is to inform users, but without requiring action from users. Toasts appear as an overlay at the top right corner of the screen.

image

Key features of toasts

  • Non-modal notifications that appear as an overlay on the experience
  • Transient in nature, and disappears after 5 seconds
  • Appear one at a time, in the order received
  • Do not require action from users

The toast notification can be shown on the screen with the virtual keyboard simultaneously.

Alerts

Alerts are reserved for critical system events. The purpose of alerts is to inform users about something critical and require immediate action by users to maintain the quality of experience. Alerts appear at the bottom section of the screen, on top of whichever app is currently in use.

The alert messages have the below design layout:

image

Key features of alerts

  • Show dialogs on top of whichever app is currently in use, including the Home Screen
  • Can be modal or non-modal
  • Require action from users
  • Offer users one or more possible actions from which to choose
  • Can trigger an app to pause content below, if defined by the app
  • Cannot be muted or throttled by users
  • Let you dictate whether background content will pause or not

A modal type alert cannot use other features in the background until the alert window is closed, whereas a non-modal type alert can use other features in the background while the alert is up on the screen.

If the virtual keyboard is present when an alert is generated, the virtual keyboard will animate off the screen before the alert appears. Alerts will never overlay the virtual keyboard. See Virtual Keyboard for more information. However, the appearance of an alert will cause the virtual keyboard to hide. The virtual keyboard will reappear after the alert is dismissed. If users select a text field when a non-modal alert is displayed on the screen, the alert will be self-dismissed before the virtual keyboard appears. Users cannot interact with text fields in the content area, while the modal alert is displayed on the screen.

제목 1

제목 2

제목 3

제목 4

제목 5

제목 6

If your app can wait for an unavailable, not released Activity to become available, then set the "wait" flag to true. If it is, and the Activity is valid, which means Activity exists and is not exiting, the call should succeed. If it cannot wait, and the Activity is valid but cannot be adopted, then the call fails. The adopted return flag indicates a successful or failed adoption.

If not immediately adopted and waiting is requested, theorphan event informs the adopter that they are the new Activity parent.

The flag that indicates the success/failure of the request.

false: Failure

true: Success

image

이미지

barksalot
image

If the service did not call adopt() to indicate to the Activity Manager its willingness to take over as the parent, it should be prepared to stop work for the Activity and unsubscribe if it receives a cancel event. Otherwise, if it receives the orphan event indicating the parent has unsubscribed, and the service is now the parent, then it should use complete() when finished to inform the Activity Manager before unsubscribing.

The flag that decides whether to subscribe or not.

false: Do not subscribe. Call the method only once. (Default)

true: Subscribe.