push-notification

Android notifications: onMessageReceived not called

我的梦境 提交于 2020-06-25 21:15:58
问题 First of all, it's not because the app is in the background. The notifications are sent with a data message payload. In the Play console it says the messages are 'Acknowledged', so they're reaching the device. For most users, the onMessageReceived method is called, but for a minority, it isn't. Why would this be? AndroidManifest: <service android:name=".push.MyFirebaseInstanceIDService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service

Android notifications: onMessageReceived not called

随声附和 提交于 2020-06-25 21:15:49
问题 First of all, it's not because the app is in the background. The notifications are sent with a data message payload. In the Play console it says the messages are 'Acknowledged', so they're reaching the device. For most users, the onMessageReceived method is called, but for a minority, it isn't. Why would this be? AndroidManifest: <service android:name=".push.MyFirebaseInstanceIDService"> <intent-filter> <action android:name="com.google.firebase.INSTANCE_ID_EVENT" /> </intent-filter> </service

Swift Local push notification action view

亡梦爱人 提交于 2020-06-25 06:30:40
问题 I'm trying to create a notification with two possible action buttons like "Quick reply" and "Cancel", but I can't find any code examples for this. Please could someone explain how to do this in Swift 3. 回答1: It's difficult to give a precise example of what you are looking for. Here's a quick UNUserNotificationCenter implementation with an action. import UserNotifications Define a category ID constant private let categoryID = "Category" Setup and register UNUserNotificationCenter // MARK: -

Swift Local push notification action view

匆匆过客 提交于 2020-06-25 06:30:26
问题 I'm trying to create a notification with two possible action buttons like "Quick reply" and "Cancel", but I can't find any code examples for this. Please could someone explain how to do this in Swift 3. 回答1: It's difficult to give a precise example of what you are looking for. Here's a quick UNUserNotificationCenter implementation with an action. import UserNotifications Define a category ID constant private let categoryID = "Category" Setup and register UNUserNotificationCenter // MARK: -

React Native - How to open route from push notification

痞子三分冷 提交于 2020-06-24 07:19:14
问题 I'm using react-navigation and react-native-push-notification . How can I open a certain StackNavigator's screen in onNotification callback? Should work when: app is closed app is in the foreground app is in the background I only need it working in Android for now. I've tried to pass a callback function to notification in my component: _handleClick() { PushNotification.localNotification({ foreground: false userInteraction: false message: 'My Notification Message' onOpen: () => { this.props

how to play sound in service worker or even vibrate in chrome?

大城市里の小女人 提交于 2020-06-16 08:11:21
问题 The bounty expires in 3 days . Answers to this question are eligible for a +100 reputation bounty. Giorgi Lagidze is looking for a canonical answer . I am using service workers . I need it for push notifications. What I want to achieve is that when I recieve notification, it should play a sound or vibrate at least. self.registration.showNotification(title, { body: body, icon: './assets/images/icons/icon_144x144.png', vibrate: [200, 100, 200, 100, 200, 100, 200], }); I am having this piece of

Local Schedule Notification react native

白昼怎懂夜的黑 提交于 2020-06-15 18:45:31
问题 I am new to React Native i'm trying to implement a functionality where the app sends to user everyday at a certain period of dates and times a notifications to remind users to take pills ( times and dates and data are stored in mongodb server so i'll be using axios to fetch them ) can notifications still works if app is closed or in the background ? is it easy to make it work ? Does anyone know of a way to achieve this , is it possible ? thanks 回答1: Yes!!! This is possible. You have many

Local Schedule Notification react native

不问归期 提交于 2020-06-15 18:34:45
问题 I am new to React Native i'm trying to implement a functionality where the app sends to user everyday at a certain period of dates and times a notifications to remind users to take pills ( times and dates and data are stored in mongodb server so i'll be using axios to fetch them ) can notifications still works if app is closed or in the background ? is it easy to make it work ? Does anyone know of a way to achieve this , is it possible ? thanks 回答1: Yes!!! This is possible. You have many

Open a specific view when opening the App through a Notification

旧城冷巷雨未停 提交于 2020-06-12 12:33:42
问题 I am able to open a specific view (ToDoView) when I use categories with actions for my notification. But what I would like to achieve is that a specific view gets also opened when I click on the notification itself. Maybe this is super simple to solve, but I couldn't find out yet using SwiftUI. By the way: This code only works if the app still runs in the background, otherwise i land at ContentView, which is also not optimal. AppDelegate.swift func application(_ application: UIApplication,

Open a specific view when opening the App through a Notification

穿精又带淫゛_ 提交于 2020-06-12 12:32:58
问题 I am able to open a specific view (ToDoView) when I use categories with actions for my notification. But what I would like to achieve is that a specific view gets also opened when I click on the notification itself. Maybe this is super simple to solve, but I couldn't find out yet using SwiftUI. By the way: This code only works if the app still runs in the background, otherwise i land at ContentView, which is also not optimal. AppDelegate.swift func application(_ application: UIApplication,