firebase-cloud-messaging

Subscribe to topics suddenly throws “java.io.IOException: InternalServerError”

Deadly 提交于 2019-12-25 06:23:59
问题 since today I encountered the following issue with GCM "subscribe to topics". Nexus 6, Android 6.0.1, Google Play Services 9.0.83 Using google-play-services:8.3.0 in app. Step 1 I follow the documentation from Google for getting the token through the instance id. After getting the token I successfully subscribe to the "topics/global" topic and store the token in the shared preferences. protected void register() { SharedPreferences sharedPreferences = PreferenceManager

Not able to remove or change .p12 certificate in Firebase Console

拥有回忆 提交于 2019-12-25 04:28:20
问题 I am using Firebase for sending push notification in iOS. After adding my .p12 certificate, Firebase will not update or remove certificate. Update popup is displayed but it will not make any changes. Can anybody know how to resolve this issue. Thanks in advance. 来源: https://stackoverflow.com/questions/39590962/not-able-to-remove-or-change-p12-certificate-in-firebase-console

Firebase upstream messages

僤鯓⒐⒋嵵緔 提交于 2019-12-25 04:20:02
问题 When sending upstream message most of the times the message does not get to my server, and even when the message received to the server the onMessageSent(String msgId) function isn't called (the onMessageReceived(RemoteMessage fcmMessage) work very well). Why the function isn't called and why do I need to send 10 upstream messages to get response from the firebase cloud messaging to my server? new AsyncTask<Void, Void, String>() { @Override protected String doInBackground(Void... params) {

Save Application Wide Boolean in SharedPreference

雨燕双飞 提交于 2019-12-25 03:18:05
问题 I know that this is a common question asked, and I have spent all afternoon trying different solutions that don't seem to work. I am trying to store a boolean receiveNotifications in SharedPreferences but when I send a notification it still comes through. When I check whether the boolean is set in the activity I set it in, it says that the value is what it should be, but when I call this in my Firebase MessagingService it still allows the notification to come through. This is my first time

Experimenting with Firebase - Push Notifications

淺唱寂寞╮ 提交于 2019-12-25 03:14:47
问题 In order to try out Push Notifications with Firebase I am following this example: https://github.com/firebase/quickstart-ios/blob/dc2cd2db6e82e5c475fa3f0efe75df8b54f04544/messaging/MessagingExampleSwift/AppDelegate.swift#L40-L55 I could make it work up to a certain point. Here is the relevant code I have: ...... func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { ...... UNUserNotificationCenter.current()

Where should I store my FCM server key if not on client side for security? iOS?

半腔热情 提交于 2019-12-25 02:29:29
问题 I have been using FCM to deliver notifications that uses POST requests that require FCMs server key. How do I still send notifications without having the fcm server key client side for security reasons? 回答1: There is no way to securely send messages from one client device to another client device with FCM. You always need a trusted environment (such as a server that you control, your own development machine, or Cloud Functions) to do that, where you can enforce whatever "who can send to whom"

Firebase assistants error: Failed to resolve: firebase-messaging-15.0.0

跟風遠走 提交于 2019-12-25 00:17:03
问题 I am currently facing the error when i try to connect to the Cloud Messaging using firebase assistants. Failed to resolve: firebase-messaging-15.0.0 I search online, and the solution was to remove the last few digits in the dependency. However, when i tried that, it solved the error, but on the firebase assistants, it did not show "dependency being set up correctly" anymore. Hence, does this mean that i am not connected to the firebase cloud messaging? Method tried: change from implementation

FCM Tap on how to open a User specified activity instead of default activity when app is in background state

天涯浪子 提交于 2019-12-25 00:14:00
问题 The FCM is working fine and notification came on device when app is in foreground state, and when tapped on notification, it is redirecting to my specified Activity, so it is working fine. But my challenge is when the notification comes when app is in background state and when tapped, it redirects to Default Activity but I want to navigate to specified activity. Here is MyFirebaseMessagingService class: public class MyFirebaseMessagingService extends FirebaseMessagingService { private static

Update new APNS certificate to GCM

寵の児 提交于 2019-12-25 00:08:49
问题 Generated new certificates in Apple Developer Centre. It's weird i couldn't upload that certificates to GCM and also i couldn't see UPDATE button developer website. It shows error {{ controller.errorMessage }} How do I do that? Here's a screenshot of the Google Developer 回答1: You would have to import your GCM project to the Firebase Console (there won't be any changes, see my answer here) and update the certs from there. While already importing, I would strongly advise toigrate your app(s) to

Invalid topic value provided - While sending FCM to a topic

萝らか妹 提交于 2019-12-25 00:01:45
问题 I am trying to send an FCM message to a topic. But getting "Invalid topic value provided" error from the server. Json Payload { "message":{ "topic":"/topics/news", "data":{ "title":"Hellow World", "message":"This is the Topic Message", "type1":"100", "type2":"abc" } } } Response { "error":{ "code":400, "message":"Request contains an invalid argument.", "status":"INVALID_ARGUMENT", "details":[ { "@type":"type.googleapis.com/google.rpc.BadRequest", "fieldViolations":[ { "field":"message.topic",