push-notification

Notify user when a date is near

﹥>﹥吖頭↗ 提交于 2020-08-22 19:10:41
问题 I'm currently working on an Android app that uses several Firebase functions. In the Realtime Database I have a date (the date a book is due) and I need to notify the user when that date is near (say, 1 day before the date in the database). Firebase cloud functions doesn't seem to have a specific trigger to do this, as nothing in the database is changing. I have seen this thread, which can set an alarm/notification for a future date, but I don't know how to stop it once it's been set; I need

Android 9 Api 28 Notification not showing

不问归期 提交于 2020-08-11 06:15:30
问题 I'm trying to show notification but it's not working for both Oreo and Pie version. It's working in kitkat version. I tried all the possible condition i can do, i don't know what else i'm missing here Here is my code: String idChannel = "my_channel_01"; Intent mainIntent; mainIntent = new Intent(ChecklistOptionActivity.this, CashCountOptionActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, mainIntent, 0); NotificationManager mNotificationManager =

Android 9 Api 28 Notification not showing

[亡魂溺海] 提交于 2020-08-11 06:14:33
问题 I'm trying to show notification but it's not working for both Oreo and Pie version. It's working in kitkat version. I tried all the possible condition i can do, i don't know what else i'm missing here Here is my code: String idChannel = "my_channel_01"; Intent mainIntent; mainIntent = new Intent(ChecklistOptionActivity.this, CashCountOptionActivity.class); PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, mainIntent, 0); NotificationManager mNotificationManager =

Android, send push notification to myself

微笑、不失礼 提交于 2020-08-10 23:45:36
问题 I want to an user send a push notification for himself. Is there a way to do that without using Google Cloud Messaging? It is offline, just show a notification on his own phone. Thanks. 回答1: example for building and sending a notification: from: http://www.vogella.com/tutorials/AndroidNotifications/article.html // prepare intent which is triggered if the // notification is selected Intent intent = new Intent(this, NotificationReceiver.class); PendingIntent pIntent = PendingIntent.getActivity

Android, send push notification to myself

你说的曾经没有我的故事 提交于 2020-08-10 23:43:11
问题 I want to an user send a push notification for himself. Is there a way to do that without using Google Cloud Messaging? It is offline, just show a notification on his own phone. Thanks. 回答1: example for building and sending a notification: from: http://www.vogella.com/tutorials/AndroidNotifications/article.html // prepare intent which is triggered if the // notification is selected Intent intent = new Intent(this, NotificationReceiver.class); PendingIntent pIntent = PendingIntent.getActivity

Sending a push notification only when app is in background

北城以北 提交于 2020-08-09 19:54:14
问题 I use NotificationManager, NotificationChannel and NotificationCompat.Builder to display a push notification when an event is triggered, no online Firebase. The push notification appears when my app is in foreground and background, but it only should appear when my app in the background. I have 2 Activities where just only 1 knows the class, where the push notification is created. I could just set a variable that shows if my Activity is in foreground or not (with onResume and onPause), but if

Android Studio -error: cannot access InternalTokenProvider // firebaseAuth = FirebaseAuth.getInstance();

坚强是说给别人听的谎言 提交于 2020-07-23 06:45:58
问题 I get this error whenever adding Cloud Messaging dependencies for Android push notifications: error: cannot access InternalTokenProvider firebaseAuth = FirebaseAuth.getInstance(); ^ class file for com.google.firebase.internal.InternalTokenProvider not found implementation 'com.google.firebase:firebase-messaging:20.2.3' My Firebase Realtime Database working perfect without this dependencies. What is the problem, and how can I fix it? 回答1: Without FIrebase Auth! Running perfectly. public class

Android Studio -error: cannot access InternalTokenProvider // firebaseAuth = FirebaseAuth.getInstance();

喜你入骨 提交于 2020-07-23 06:43:33
问题 I get this error whenever adding Cloud Messaging dependencies for Android push notifications: error: cannot access InternalTokenProvider firebaseAuth = FirebaseAuth.getInstance(); ^ class file for com.google.firebase.internal.InternalTokenProvider not found implementation 'com.google.firebase:firebase-messaging:20.2.3' My Firebase Realtime Database working perfect without this dependencies. What is the problem, and how can I fix it? 回答1: Without FIrebase Auth! Running perfectly. public class

How to get a count of the push notifications using react-native-firebase

妖精的绣舞 提交于 2020-07-22 05:33:08
问题 I want to set the count of the badge per hand in react-native with firebase. firebase.notifications.setBadge(number) how to get the number? 回答1: you can use firebase.notifications.getBadge() , like described in the Docs: https://rnfirebase.io/docs/v5.x.x/notifications/reference/Notifications#getBadge But I wonder, it doesn't seem to be the total of received messages. I think the Idea behind this is, that you add (and increment for each message) an setBadge to your onNotifications . But the

How to get a count of the push notifications using react-native-firebase

一笑奈何 提交于 2020-07-22 05:32:08
问题 I want to set the count of the badge per hand in react-native with firebase. firebase.notifications.setBadge(number) how to get the number? 回答1: you can use firebase.notifications.getBadge() , like described in the Docs: https://rnfirebase.io/docs/v5.x.x/notifications/reference/Notifications#getBadge But I wonder, it doesn't seem to be the total of received messages. I think the Idea behind this is, that you add (and increment for each message) an setBadge to your onNotifications . But the