react-native-fcm | react native module for firebase cloud messaging | Authentication library
kandi X-RAY | react-native-fcm Summary
kandi X-RAY | react-native-fcm Summary
I'm not longer able to maintain this repo. check react-native-firebase instead.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- This method is called by the application thread
- Converts a JSON array to a WritableArray
- Converts a JSONObject to a WritableMap
- Get bitmap from url
- Called when a message is received
- Converts a JSONObject into a bundle
- Build local notification
- Handles the badge request
- Get scheduled local notifications
- Return the list of registered local notifications
- Send a message to a Gcm API
- Gets the string value from a Map
- Starts a refresh token
- Gets the FCM token
- Deletes FCM token
- Deletes instance id
- Get the firebase token
- Get the initial notification for the current activity
- Create a notification channel
- Registers receive notification handler
- Register token refresh token refresh token
- Subscribe to a topic
- Unsubscribe from a topic
- Send a reboot event
react-native-fcm Key Features
react-native-fcm Examples and Code Snippets
Community Discussions
Trending Discussions on react-native-fcm
QUESTION
I followed some answers from here that are similar to my issues. But unfortunately, the error is not removed. That is why I asked here again.
This is an old versioned React Native
project where react-native-document-picker
version was 2.1.0
. When I upgraded the version to 8.0.0
, the error shows as the following screenshot:
The current files are as like below;
android/settings.gradle
...ANSWER
Answered 2022-Mar-22 at 18:08The reason you are getting DocumentPicker undefined is the react-native-document-picker
version 8.0.0
has been updated since version 2.1.0
which code you've posted.
According to the library doc, you have to import the DocumentPicker differently. And the util DocumentPickerUtil is also not available to the updated version. For react-native-document-picker
version 8.0.0
you have to import in the following way
import DocumentPicker, { types } from 'react-native-document-picker';
And also DocumentPicker.show
method is no longer available you have to use the DocumentPicker.pick
method.
Ref:
QUESTION
I'm trying to open an app at a specific screen, from a push notification. My understanding is that I use a "deep link" to do this. I've set up react-navigation to handle the deep link (and AndroidManifest.xml & appDelegate.m), and can open the deep link with xcrun simctl openurl booted myapp://a/1
/ adb shell am start -W -a android.intent.action.VIEW -d "myapp://a/1" app.bundle.name
.
But I can't get the push notification to open the app, at the deep link, when the app is closed; it only opens the app on the home screen (on both iOS and Android). How do I get the app to open at the deep link (or alternatively, to read the contents of the push notification so that I can navigate to the correct screen myself)?
library versions:
- react-native 0.62.2
- @react-navigation 5.5.1
- react-native-fcm 16.2.4
ANSWER
Answered 2020-Sep-18 at 06:11After some debugging, I found it was actually a problem in my code handling notifications. I was checking for an ID
property in the notification body, but not all notifications have one. So once I removed this, it started working. So to make it work you should have something like:
QUESTION
Been doing a lot of research on this issue, first my setup:
- React-native: 0.61.5
- react-native-firebase: 5.6.0
- Firebase Messaging 6.15.0
My issue quite simple and straight forward though I do not seem to be able to find a clear way to resolve the issue.
I deployed version 4.2 of my app. Firebase Cloud Messaging (FCM) in iOS works just dandy. I then deployed 4.3 to TestFlight to begin testing. Installed 4.3 via TestFlight and FCM stopped working, no push notifications. If I delete the app and install 4.3 via TestFlight push notifications work again, the device is registered.
I can also reproduce this issue updating the installed version of my app from the App Store published latest, no surprise there.
I know that the InstanceId/device token is based on the app build+device so it makes sense that the token changes when the app Updates but my token is the same when I update from 4.2 to 4.3:
...ANSWER
Answered 2020-Feb-28 at 14:30I spent a lot of time before the found a solution.
So, if you call firebase.iid().delete()
in iOS you need to register your new token in APNs. I didn't see this in react native firebase documentation, just found in lib's types
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install react-native-fcm
Link libraries Note: the auto link doesn't work with xcworkspace so CocoaPods user needs to do manual linking
You many need this package for huawei phone
NOTE: local notification does NOT have any dependency on FCM library but you still need to include Firebase to compile. If there are enough demand to use this functionality alone, I will separate it out into another repo.
Firebase android misses important feature of android notification like group, priority and etc. As a work around you can send data message (no notification payload at all) and this repo will build a local notification for you. If you pass custom_notification in the payload, the repo will treat the content as a local notification config and shows immediately. NOTE: By using this work around, you will have to send different types of payload for iOS and Android devices because custom_notification isn't supported on iOS. WARNING: custom_notification cannot be used together with notification attribute. use data ALONE.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page