Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bubbles

 Bubbles

# About me
- Twitter
- https://twitter.com/shihochandesu

- Github
- https://github.com/shihochan

# Links
- What's New in the Android OS User Interface (Google I/O'19)
- https://www.youtube.com/watch?v=nWbW58RMteI

- Bubbles
- https://developer.android.com/preview/features/bubbles

- Android Q- Implementing Bubbles
- https://medium.com/mindorks/android-q-implementing-bubbles-96aa14ccb9c3

- Set up the Android Q SDK
- https://developer.android.com/preview/setup-sdk

Yuki Shiho

May 17, 2019
Tweet

More Decks by Yuki Shiho

Other Decks in Programming

Transcript

  1. About me 志甫 侑紀 / YUKI SHIHO @shihochan Software Engineer

    at AbemaTV, Inc. @shihochandesu Shibuya.apk Cat LOVER KEYAKIZAKA 46
  2. 1.Configure the activity shown in the bubble 2.Construct BubbleMetadata and

    add it to your notification 3.Send that notification Build Bubbles
  3. // Create bubble intent val target = Intent(context, BubbleActivity::class.java) val

    bubbleIntent = PendingIntent.getActivity(context, 0, target, 0) // Create bubble metadata val bubbleMetadata = Notification.BubbleMetadata.Builder() .setDesiredHeight(600) .setIcon(Icon.createWithResource(context, R.mipmap.ic_launcher_roun .setIntent(bubbleIntent) .build() 2.Construct BubbleMetadata
  4. Tips • The first time you send the notification, it

    has to be in a notification channel with IMPORTANCE_HIGH. • Only send if it is important enough such as ongoing communications, or if the user has explicitly requested a bubble for some content. • the bubble can be disabled by the user. In that case, a bubble notification is shown as a normal notification.