Redeem Now
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

. . .

Comment

Add Your Comment

Be the first to comment.

css.php
Hire Us!
Brief us about your requirements and we'll get back to you.
Woo! Hooy!
We have just recieved your project brief and our expert will contact you shortly.
Send Again
Close