How to send test push notification with custom data from firebase console? - react-native

How do we send a test push notification to my android emulator with custom data? I have FCM Token and it should directly come up on my emulator only... I don't want to send a notification to all the app users.
Is there any way to do this from firebase cloud messageing so, I can test with my data.

Yes, Sure you can test it through printing the device token
FCM.getFCMToken().then(token => {
console.log(token)
});
Then take the token and go to the cloud messaging section and you just set the FCM token in test message like the picture below:
Update
the new Firebase interface does not provides a direct way to test cloud messaging with data at the moment. However you have two options: either you create a certain subject and subscribe to it like the following code
FCM.subscribeToTopic("/topics/testTopic");
and then in the target section you can target topic testTopic (This may require time to confirm a new subject)
Or you can do this programming using Firebase admin, you can follow this tutorial:
https://medium.com/android-school/test-fcm-notification-with-postman-f91ba08aacc3
Hopefully this answer your question

Related

How to fill in Google Play Data Safety form taking into account Firebase Analytics and Firebase Crashlytics libraries?

I have an app which does not push any data to any server except that it uses the Firebase Analytics and Firebase Crashlytics libraries to submit analytics and crash reports to my Firebase account. My use of both of these libraries is bare minimum.
I submit analytics events as follows:
FirebaseAnalytics.getInstance(applicationContext).logEvent("SomeEvent", bundle)
I submit exceptions as follows:
FirebaseCrashlytics.getInstance().recordException(exception)
Neither the bundles submitted via the FirebaseAnalytics instance nor the exceptions submitted via the FirebaseCrashlytics instance contain any of the user's personal data or any data that identifies the user. The exceptions just convey that a certain area of the application has failed and the bundles just convey that a certain button was tapped without linking in any way to the user.
With this in mind, how do I answer the following "Data collection and security" questions in the Google Play Data Safety form:
Does your app collect or share any of the required user data types? [Yes/No]
Is all of the user data collected by your app encrypted in transit? [Yes/No]
Do you provide a way for users to request that their data is deleted? [Yes/No]
There is a repo with all required information required for the Data safety form - link
The same applies to firebase as to admob
Does your app collect or share any of the required user data types?
Yes
Is all of the user data collected by your app encrypted in transit? Yes
Do you provide a way for users to request that their
data is deleted? No
Location > Approximate location
App activity > Page views and taps in app
App info and performance > Crash logs, Diagnostics
Device or other identifiers > Device or other identifiers
How do I know this for sure?
Because under device and other identifiers the extra info states:
Identifiers that relate to an individual device, browser or app. For
example, an IMEI number, MAC address, Widevine device ID, Firebase
installation ID or advertising identifier.
Which indicates that they do consider Firebase to be collecting data

Notify of Video Call

I am building a Video Chat application in React-Native, I have successfully implemented the Video Chat feature. Now I need a mechanisim to send notification to the user to join the Video Call.
I have read stackoverflow and also googled a lot, all the answers suggest to use Callkeep.
But Callkeep requires me to use Phone call account permission to use the module. I need the notification to be handled like in Instagram, with simple notification that User A is calling you with declined and answer button only.
You can use Firebase Cloud Messaging or a similar service to send and receive notifications for your calls. You can send the channel name as the payload to accept the notification and join the call.

Implementing Whatsapp Business APIs using gupshup.io platform

gupshup.io provides a way to utilise whatsapp business by exposing a single api interface. I am exploring it. But the documentation is poor.
I wonder how the entire conversation can be tied together. Is there any session that is initiated when the message exchange begins? The official site suggests to use Stack Overflow as forum and hence the question.
For every new client (business phone number) a new WhatsApp Business API client (docker containers) is started. This is uniquely tied to the databases. Just like everything stored in your phone WhatsApp app is stored in the databases, the docker containers are tied closely to the database to create a unique session for you and store the messages.
The documentation at WhatsApp Official Documentation can give you more information.
Login to gupshup.io WhatsApp dashboard
Click ‘+’ Icon to create a App and select the type of app: Access API
You will see a Sandbox:
Set up a callback URL where you can receive incoming messages from your users and for outgoing messages to user, use the sandbox API.

Is Firebase Cloud Messaging suitable for messaging apps?

We're writing an app like LINE, and need notification service for each single message in a chat group when app is in background.
We try to use Firebase Cloud Messaging for this feature, but I can't see a reasonable implementation.
Topic subscribing is too slow for "create a topic for each chat group" since it takes hours to create one. Device group messaging is designed for devices owned by a single user. Using sending to a single device feature for each receiver and each message does not seem to be practical since the server loading is too heavy.
Is there a good way to use FCM making such app, or do I need to find another service? Thanks.

Real-time Push notifications with Firebase

I recently signed up to use Firebase and I can't seem to figure out how to push notifications to specific users.
For my use, I guess you can think of it like Facebook. Whenever a user does something, say posts an interesting article for their friends to read, I want all of the user's friends to be notified of that event. So, using Firebase, how would one make it possible to notify only their friends and not everyone? My database stores the conenctions.
Perhaps there is a way to have each user be a node in the Firebase database and each time a notification is sent, The user will constantly check his node, and if something appears, pulls it and then delete it.
The examples on Firebase seems to be sort of basic. I wish there was a user-specific push notification example.
Now Firebase supports Push Notification. Google rebranded GCM to Firebase Cloud Messaging and it now offers this cross platform service. Firebase also offers notifications.
These are the differences between these two services:
Firebase Cloud Messaging provides a complete set of messaging capabilities through its client SDKs and HTTP and XMPP server protocols. For deployments with more complex messaging requirements, FCM is the right choice.
Firebase Notifications is a lightweight, serverless messaging solution built on Firebase Cloud Messaging. With a user-friendly graphical console and reduced coding requirements, Firebase Notifications lets users easily send messages to reengage and retain users, foster app growth, and support marketing campaigns.
If you want a more detailed comparison. Read this.
There's a good explanation of how you can send notifications to specific users here:
How to send an alert message to a special online user with firebase
Basically you need to have each user observe a unique path, and then write data updates to the appropriate path.