Read More
Read now

How we can use bubble in Android Studio

Save

In this article, we will read How we can use bubble in Android Studio. When the device is locked or the always-on-display is active, bubbles appear just as a notification normally would.

Bubbles are created by the Notification API, so you send your notification as normal. If you want your notification to display as a bubble, you need to attach some extra data to it.

when you send a notification by bubble then you need to create a Notification channel.

The bubble can be disabled by the user in that case bubble will show just like the notification.

In MainActivity we use NotificationManager to send notifications to Bublle. We send data by intent. Then notify to bubble.

 

Main Activity

 

In activity_main we take a button and on click this button we show a bubble.

activity_main

 

In BubbleActivity you can see we replace show a snackbar.we get data and show just like notification.

BubbleActivity

You can see in screenshot there is a button create bubble and when we click on that button then it will show a bubble.

bubble_image
bubble

So here we discussed How we can use bubble in Android Studio.  Thanks for reading this blog and You can get other blogs from here

. . .

Leave a Comment

Your email address will not be published. Required fields are marked*


Be the first to comment.

css.php

Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!

Deniel Kerr

Owner and Founder. Opencart

Talk to Sales
Start a Project

    Message Sent!

    If you have more details or questions, you can reply to the received confirmation email.

    Back to Home