How to perform a custom task from a action button click in notification?

All we need is a simple explanation of the problem, which is provided below. I have a notification in my app and I want to perform a custom task on clicking of the action in the notification. I have done this to add a action: timerNotificationBuilder.addAction(0, "STOP", null /*What to add here ?*/ ); But, … Read more

can't import android.support.v4.app notificationcompat in android studio?

All we need is a simple explanation of the problem, which is provided below. I was learning android notification tutorial using this link but when I started using Notification notification = new NotificationCompat.Builder(this, App.CHANNEL_1_ID); this code, I can’t import android.support.v4.app. NotificationCompat , how to do that? It only imports import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationManagerCompat; import android.app.Notification; … Read more

How to know when app got killed and clear all the pending notifications in flutter?

All we need is a simple explanation of the problem, which is provided below. My app plays scheduled notifications (I’m using flutter local notification) in the background but when the phone shutdown and opens again later all the bunch of schedules notifications started to play overlapping each other (it annoys user because it plays with … Read more

How to change notification sound Android Java

All we need is a simple explanation of the problem, which is provided below. I’m trying to create an app with 3 different notification sounds (But not different notification channels), I create custom notification sound, but when I try to change the sound, it stays still the same, I also tried to delete the channel … Read more

Is there any alternative to notification notify device but without sending native notification?

All we need is a simple explanation of the problem, which is provided below. Example: I have mobileDevice1 / mobileDevice2 / laptop Goal: I need to notify mobileDevice1 with some message by sending it from mobileDevice2 and laptop. The message need to passively appears (listens) on mobileDevice1 without any interaction like pressing update button. But … Read more

What is the purpose of NotificationChannelCompat?

All we need is a simple explanation of the problem, which is provided below. I saw this class before but cannot use it and I don’t see many sample that use it. What exactly is the difference of NotificationChannelCompat from regular NotificationChannel? Let’s Solve it: This is a common error many developers questioned us about … Read more

Start foreground service after notification permission was disabled causes crash (Android 13)

All we need is a simple explanation of the problem, which is provided below. So, I’ve been experimenting with the new Android emulators (namely Android 13 or Android Tiramisu, API 33) and on an app, I need a foreground service. The app’s target SDK is currently 33. Due to the notification requirement, I’ve added the … Read more

Custom Notification Center

All we need is a simple explanation of the problem, which is provided below. Currently I have a requirement that enables push notifications in the app but we can’t use other APIs like google’s Firebase. So we have the handle the notification management by ourselves. I have thought of this (its just a draft, sorry … Read more

How to send one-to-one upstream messaging using not not using FCM without hosting a server?

All we need is a simple explanation of the problem, which is provided below. Sending messages from one device directly to another device it not supported through Firebase Cloud Messaging. — Frank van Pufflenen – JUNE 23 2016 That was quite some time ago, and there aren’t any updates in the docs. However: Has there … Read more

Notification not showing up using Android Auto

All we need is a simple explanation of the problem, which is provided below. I followed the tutorial on Udacity and the developer site for Android auto. I am using a DVU for testing. The notifications don’t show up on the DHU but appears on the phone here is my code: Using GcmListenerService: final PendingIntent … Read more