firebase-cloud-messaging

No custom sound with Android Firebase Notification

寵の児 提交于 2020-01-24 02:25:12
问题 I am using Firebase push notifications in my Android App. I can send correctly notification with custom icon, but I have not managed to play my custom sound. I always get the default sound of my device. { "registration_ids": "myToken", "notification": { "body": "my body", "title": "my title", "icon": "ic_notification", "sound": "mysound.mp3" // I tried "mysound", "mysound.wav"... }, "priority": "high" } The custom sound is located in /res/raw I have been able to play my custom sound with

Firebase messaging not working for “data” messages in iOS

↘锁芯ラ 提交于 2020-01-23 12:42:46
问题 I have an app running on iOS 9.3.5. I need to be able to send a push notification to my app when it's in the foreground or background. I don't actually need to include any data, I just need to ping the app so it will " phone home ". So I don't need/want the user to see any notifications. Since the company is already using Firebase for their Android app, I've set that up in the iOS app. If I send a message to https://fcm.googleapis.com/fcm/send with the notification key in the payload, it's

Firebase messaging not working for “data” messages in iOS

随声附和 提交于 2020-01-23 12:41:29
问题 I have an app running on iOS 9.3.5. I need to be able to send a push notification to my app when it's in the foreground or background. I don't actually need to include any data, I just need to ping the app so it will " phone home ". So I don't need/want the user to see any notifications. Since the company is already using Firebase for their Android app, I've set that up in the iOS app. If I send a message to https://fcm.googleapis.com/fcm/send with the notification key in the payload, it's

How to send a Firebase Cloud Messaging Notification with special characters like ä, ö, ü?

☆樱花仙子☆ 提交于 2020-01-23 11:13:12
问题 I tried for a while to send a FCM Notification with special characters like this: curl --header "Authorization: key=Auth-CODE" --header Content-Type:"application/json for JSON; application/x-www-form-urlencoded;charset=UTF-8" -d '{"to":"token","notification":{"title":"München", "body":"Test Content with äöü", "icon":"images/icon-192x192.png"}}' https://fcm.googleapis.com/fcm/send The notification I'll get looks like this: Mnchen Test Content with Can anybody please guide me to the right

Firebase Error: Auth error from APNS or Web Push Service

大城市里の小女人 提交于 2020-01-23 07:04:05
问题 After running the following line in node-js: import * as admin from "firebase-admin"; import * as serviceAccount from "../../firebase_service_account_key.json"; const app = admin.initializeApp({ credential: admin.credential.cert(serviceAccount as any), databaseURL: "https://my-app-path.firebaseio.com" }); admin.messaging().send({ token: "known-good-token", notification: { title: "Test Push Note", body: "Here is some text" } }); I'm getting the error: Error: Auth error from APNS or Web Push

iOS: Invalid registration token. Check the token format

左心房为你撑大大i 提交于 2020-01-23 06:13:58
问题 I am new for Firebase as well as for iOS. I am trying to send push notification using FCM. I registered an iOS app on FCM. Both .p12 certificates added. Code developed according to FCM. While sending notification through the Firebase Console, I'm getting the error Invalid registration token. Check the token format. . I don't what mistake I did. 回答1: There are two tokens you get at iOS side Token generated by iOS which is received in method didRegisterForRemoteNotificationsWithDeviceToken

How to send push notifications to multiple devices using php script using FCM?

浪子不回头ぞ 提交于 2020-01-23 05:43:07
问题 I'm new to push notifications using FCM from php to Android devices. From android side I have generated FCM reg_id & send it over php script & store into mysql database. Now, I would like to send notifications from php script to multiple android devices simultaneously. Here is the php scripts that are used during sending push notifications : 1.firebase.php (reference link) <?php class Firebase { // sending push message to single user by firebase reg id public function send($to, $message) {

How to send Image with firebase Push Notification using swift 3

安稳与你 提交于 2020-01-22 20:27:47
问题 Can any one help me to send notification like this: I'm using Firebase Notifications. I tried to put the image URL in value of Advanced options and key 1 when I send my notification. The image URL appears in the debugger, but no image appears when notification appears in my device. This is My Code. import UIKit import UserNotifications import Firebase import FirebaseInstanceID import FirebaseMessaging @UIApplicationMain class AppDelegate: UIResponder, UIApplicationDelegate { var window:

Firebase Messaging - “too many alarms” on Samsung's Android devices

牧云@^-^@ 提交于 2020-01-21 11:42:30
问题 We are using Firebase Messaging in Android app and since last week we reported many crashes from Samsung devices. The problem is not related with any of our classes . We are not using AlarmManager etc. Here are the stacktraces: 1) Parcel.java Fatal Exception: java.lang.SecurityException: !@Too many alarms (500) registered from pid 13776 uid 10011 at android.os.Parcel.readException(Parcel.java:1540) at android.os.Parcel.readException(Parcel.java:1493) at android.app.IAlarmManager$Stub$Proxy

Android notification icon issue

我们两清 提交于 2020-01-21 08:59:07
问题 I have a strange issue. I have two way to send notifications in my Android app; one from the Android service and the other through FCM. The scenarios are as follows: Regardless of whether the app is running or not, the icon of the notification sent from the Android service appears correctly. When the app is running, the notification icon appears still appears correctly if I send the notification via FCM. But if the app isn't running and I send the notification via FCM, a white square is