I have created a project in Firebase and registered my app. I send data messages to this app. I do not want to have any user authentication on my app. However, I do want that all my FCM data messages be handled only by my app. No other app be able to access my data messages.
So, my question is - How does Firebase ensure that the app which is registering with my project is the intended app?
If it is based on package name, then I can very well create a dummy app and name it exactly the way as the app I'm trying to spoof. Isn't this a big security flaw?
I can decompile the APK to get all the required config for the google-services.json. So, what stops someone from tricking my Firebase project into registering their app and getting access to all the data messages?
I created a dummy app and was able to reproduce the above. The dummy app successfully received the data message.
I do see something called App ID for my app in the Firebase project settings, but this isn't something I provided while setup. So, this is something Firebase generated. So, this wouldn't be a way to verify the app I assume.
Current project:
SDK Version - 39.0.0
Android standalone build
Hello there!
I having no push notifications on standalone build, what i did:
added firebase account with app info provided in app.json
putted google-services.json into app root and added path in expo.android.googleServicesFile in app.json
added key with expo push:android:upload --api-key <my-key> and tried to change it with a new one
added android push notification channel in application
Just in case, tried to send push notification on device token from getDevicePushTokenAsync() directly with firebase endpoint using my key and everything works.
long story short - did everything according documentation. In case of certain changes, expo.io needs FCM for sending push notifications via expo packages.
sending push notification on token from getExpoPushTokenAsync() doesn’t work at all except iPhone build.
Could you please help me with my problem? maybe i lost something in my steps to make my push notification work properly?
I'm developing an android app using flutter which uses Firebase cloud messaging.
Everything was working fine and it was receiving cloud messages but recently nothing happens when the device receives a cloud message no matter the app is in foreground or background or terminated.
The only thing that is logged into console is:
E/FlutterFcmService: Fatal: failed to find callback
which from what I know it belongs to the fact that I haven't handled background messages and despite this I should be able to receive the message.
how can I realize what is the cause of this problem? a log file or something?
PS:
I've tested on real devices with Android version 21 and 29 and the results are the same.
PS:
I've done
flutter pub upgrade
flutter pub get
flutter clean
and removed the app entirely then installed it again.
PS: I've sent the message using Firebase console and the project backend. both include 'notification' field inside the message.
Thanks in advance
i am not receiving notification after sending it through firebase console , i tried sending many notification but received one or two from around 20 notifications, i followed this guide firebase messaging from github
,why am i not receiving notification, my app is installed in one emulator and in one of my phone but when i receive notification which i have sent through notification panel i get them either on phone or emulator never got them on both.
below is the screenshot of my console
check your android app configuration in firebase console
use a restful client to make the request, i suggest
chrome-extension://aejoelaoggembcahagimdiliamlcdmfm/dhc.html,
there you can see the response of the request, if your request are sent sucessfully or if you have error, and the response tells what kind of error you have
check android app , in the method onMessageReceived and print everything to see if you receive information, besides you can print the property "from" who is the id_number of your proyect, and you can see if the messages come from your firebase android app
check firebase documentation.
I've implemented everything just with the guides and its working pretty well
I solved the same problem.
The problem seems to be the browser compatibility/version. Mozilla Firefox could easily handle this.
Make sure your app is running in the background.
Open the Firebase notification console in the FireFox browser and send notifications.
Make sure token is generated
FirebaseInstanceId.getInstance().getToken();
in my case, the package name defined at firebase console isn't the same as defined on gradle and manifest of the app (i changed it one time in the app), so the app won't be able to receive notifications sent from firebase console.
They both have to be the same!
I did not add a new firebase project, just go to project settings at console and add new android app with another package name and have a look at the newly generated google-services.json and change some lines at you android studio project.
Besides the tips that Pavul Zavala said ، keep this in mind that just data message can received by FirebaseMessagingService even application closed or run in background and notification message can't handle(till this moment) when application run in background.
And all message that sent via FireBase console Contains , they always include a notification key
more detail at :
Push notification works incorrectly when app is on background or not running
In my case, what helped me is creating a new simulator in Android Studio
Few things to check:
in Firebase console https://console.firebase.google.com/ add/configure the project
in Android Studio connect to Firebase - Manu -> Tolls -> Firebase -> Cloud Messaging (Connect, Add FCM to your app)
Send notification from Firebase console
So, again, I recreated Virtual Device (open AVD manger and create the same device with the same API level)
I will be happy if somebody will save the time using this post :)
Ideally it shouldn't behave like that but it might be due to following reasons:
Check the notification priority of your app in the app settings of the device.
You might be sending the token of one particular device, Your target should be User segment.
I created an app and integrated Parse Notification. Due to a glitch, there were unnecessary notification being sent to all users. To stop this immediately, I deleted the installation class after applying filter, but realized that it deleted all my parse installation from Core.
Basically, there are no devices on my parse console now and no notifications are being sent at all.
I wish to provide an app update where I can get the parse to register the devices again.
Can someone please advise how I can do this.
It is quite a big mistake to delete the installation class instead of preventing Push notifications in the Cloud or even deleting the Push certificates. When a user registers his device with Parse backend for the first time, the SDK generates a unique installationId and caches it locally on the device. As far as I know, this will prevent your users to register again (even if you send a new app update) with the backend UNLESS they delete the whole app and reinstall it to get rid of that cached id.