firebase-notifications

Firebase Cloud Messaging send click_action [duplicate]

↘锁芯ラ 提交于 2019-12-17 05:16:13
问题 This question already has answers here : Firebase FCM notifications click_action payload (9 answers) Closed 2 years ago . Someone know one way to send the click_action from the firebase console ? I just want to send the click_action button to use the notification even if the app is closed or in background. 回答1: There is currently no way to set the click_action parameter when using the Firebase Notifications console to send the message. You'll have to build the payload on your own App Server,

Is it possible to send PushNotifications, using Firebase Cloud Messaging (FCM) to special UDID, directly from device?

夙愿已清 提交于 2019-12-16 19:55:31
问题 I am thinking about keeping all registration ids(push token) in DB and sending notifications to user from iPhone. I tried something like this but did not get any notification. func sendPNMessage() { FIRMessaging.messaging().sendMessage( ["body": "hey"], to: TOKEN_ID, withMessageID: "1", timeToLive: 108) } What I am doing wrong or maybe it is impossible at all? 回答1: Currently it's not possible to send messages from the application itself. You can send messages from the Firebase Web Console, or

display firebase notification in listview

被刻印的时光 ゝ 提交于 2019-12-13 03:51:14
问题 I have successfully sent Firebase notifications using my own server to android app and I am listing the messages in a listview in a new activity on clicking the notification. My issue is: the notifications display null, the message and title are not displayed in list. FcmMessagingService: private Map<String, String> data; private static final String TAG="MyFirebaseMsgService"; @RequiresApi(api = Build.VERSION_CODES.JELLY_BEAN) @Override public void onMessageReceived(RemoteMessage

Firebase notification works even with no service or inherited class?

不羁岁月 提交于 2019-12-13 03:47:21
问题 I implemented firebase into my app to use it's notification service a while back and it worked, and today decided to use it's key/value feature, but realized that no matter what I write in my class inherited from FirebaseMessagingService , nothing happens. So I decided to remove the my class for dubugging purposes, and I still got notifications. So I removed the firebase messaging service from the manifest, deleted the app cache and ran the project, but I still get notifications! The only way

Firebase Remote Notifications Not Receiving?

馋奶兔 提交于 2019-12-12 18:18:13
问题 I'm trying to send remote notifications from my Firebase console through the cloud messaging but my phone isn't receiving any of the alerts. I have already uploaded my certificates to Firebase and I'm using the default code given by the Firebase tutorial to receive notifications. Here is a picture of my certificates showing that I have already created it Here is my code in which I implemented it as well. class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? override

How to detect if token is expired or not registred firebase FCM notification on app server?

ぐ巨炮叔叔 提交于 2019-12-12 11:17:11
问题 I am using following code to send the FCM notification from server to device : String fcmServerKey = externalConfig.getFcmServerKey(); CloseableHttpClient httpclient = HttpClients.createDefault(); HttpPost httpPost = new HttpPost(HTTPS_FCM_GOOGLEAPIS_COM_FCM_SEND); httpPost.setEntity(new StringEntity(message, ContentType.create("application/json"))); httpPost.setHeader("Authorization", "key=" + fcmServerKey); CloseableHttpResponse closeableHttpResponse= httpclient.execute(httpPost); In above

Google Firebase remote notifications not popping up when app is running in background

安稳与你 提交于 2019-12-12 07:03:21
问题 I am using Google Firebase to send notifications to users. At the time I am trying to send notification to single device (mine). Having a problem with receiving notifications - while my app is running in background banner not appears. But if I open my app, method didReceiveRemoteNotification: triggers my alert view: - (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult))completionHandler

iOS empty Firebase Push notification doesn't show up

拈花ヽ惹草 提交于 2019-12-12 05:30:44
问题 I'm having a weird problem with Firebase notification on iOS. It works perfectly but the only problem is if I keep the 'body' parameter on the server empty it does play notification sound on the app but doesn't show anything. Same thing displays notification on Android. Is it some kind of Apple security that I'm running into? if I only add an empty space " " in 'body' it would show up but nothing without it. If any body could suggest me anything please. my server side code $msg = array (

sending push notification with firebase - FATAL EXCEPTION (android)

会有一股神秘感。 提交于 2019-12-12 04:47:35
问题 First attempts at getting firebase push notifications to work isn't going so well. I have followed the tutorial listed here to set it up, but whenever I try and send a notification, the app "closes unexpecedly", and the logical throws the following crash information: Logcat: --------- beginning of crash 04-23 23:04:28.081 7395-7395/com.surfdogdesigns.pandsi E/AndroidRuntime: FATAL EXCEPTION: main Process: com.surfdogdesigns.pandsi, PID: 7395 java.lang.RuntimeException: Unable to instantiate

Getting Multiple Notification instead of one in Android

巧了我就是萌 提交于 2019-12-12 04:03:30
问题 I am using Firebase notification in my android app. Generating notification using below code : public class FirebaseNotificationService extends FirebaseMessagingService { private static final String TAG = FirebaseNotificationService.class.getSimpleName(); private String strTitle = "My Notification"; private String strMessage = "No Description"; @Override public void onMessageReceived(RemoteMessage remoteMessage) { if (Prefrences.getBooleanValue(getApplicationContext(), IS_LOGIN) && Prefrences