react-native-firebase

How to get a count of the push notifications using react-native-firebase

妖精的绣舞 提交于 2020-07-22 05:33:08
问题 I want to set the count of the badge per hand in react-native with firebase. firebase.notifications.setBadge(number) how to get the number? 回答1: you can use firebase.notifications.getBadge() , like described in the Docs: https://rnfirebase.io/docs/v5.x.x/notifications/reference/Notifications#getBadge But I wonder, it doesn't seem to be the total of received messages. I think the Idea behind this is, that you add (and increment for each message) an setBadge to your onNotifications . But the

How to get a count of the push notifications using react-native-firebase

一笑奈何 提交于 2020-07-22 05:32:08
问题 I want to set the count of the badge per hand in react-native with firebase. firebase.notifications.setBadge(number) how to get the number? 回答1: you can use firebase.notifications.getBadge() , like described in the Docs: https://rnfirebase.io/docs/v5.x.x/notifications/reference/Notifications#getBadge But I wonder, it doesn't seem to be the total of received messages. I think the Idea behind this is, that you add (and increment for each message) an setBadge to your onNotifications . But the

how to navigate to specific screen after pressing rnfirebase notification

喜你入骨 提交于 2020-06-29 04:27:11
问题 i'm using react native firebase and i'm getting notification whenever is needed, and these notifications have some data to navigate to specific screen. i used the firebase documentation to implement the functionality but it's not working as it's supposed to Here is the document i've used Firebase & React-Navigation and my code looks something like this : const Stack = createStackNavigator(); const Router = () => { const navigation = useNavigation(); const [loading, setLoading] = useState(true

Should I build a local data layer/app state to maintain state in a React Native/Firestore App?

拟墨画扇 提交于 2020-05-24 02:27:34
问题 A main selling point of Firestore is the ability to use it as a online/offline source of truth. I'm using it in this way right now: updating the Firestore document directly on an action, then listening to Firestore DB changes and mapping this back to local state. However, relying on this latency compensation and mapping back to local state is not sufficient for quick updates (taps, toggles even with a small document size). For example, toggles will "jitter" as the RN toggle presumptively

Should I build a local data layer/app state to maintain state in a React Native/Firestore App?

不想你离开。 提交于 2020-05-24 02:23:27
问题 A main selling point of Firestore is the ability to use it as a online/offline source of truth. I'm using it in this way right now: updating the Firestore document directly on an action, then listening to Firestore DB changes and mapping this back to local state. However, relying on this latency compensation and mapping back to local state is not sufficient for quick updates (taps, toggles even with a small document size). For example, toggles will "jitter" as the RN toggle presumptively

Firebase: reauthenticate with phoneNumber

人盡茶涼 提交于 2020-05-16 08:53:07
问题 I know that I can reauthenticate with email like this. var user = firebase.auth().currentUser; var credentials = firebase.auth.EmailAuthProvider.credential( user.email, 'yourpassword' ); user.reauthenticateWithCredential(credentials); But how can I reauthenticate if I use phoneNumber as my sign in method? 回答1: It is very similar to how you sign in with phone number. You can do it in 2 ways: Using reauthenticateWithPhoneNumber : const recaptchaVerifier = new firebase.auth.RecaptchaVerifier(

Task 'installDebug' not found in project ':app'

ぃ、小莉子 提交于 2020-05-15 10:12:06
问题 I get error on my react-native app while I am trying to execute following code react-native run-android --variant=release Starting a Gradle Daemon (subsequent builds will be faster) > Configure project :react-native-firebase react-native-firebase: using React Native prebuilt binary from /Users/sanglee/Documents/react-native-firebase-starter/node_modules/react-native/android FAILURE: Build failed with an exception. * What went wrong: Task 'installDebug' not found in project ':app'. I

With react-native-firebase v6, app crashed when receive notification while in foreground

試著忘記壹切 提交于 2020-04-30 04:39:20
问题 I try to get react-native-firebase v6 to work in my app. I use React Native 0.59.10. I have installed react-native-firebase v6 according to the documentation. It didn't specify about adding service MyFirebaseMessagingService into the AndroidManifest.xml unlike in v5 so I didn't do it. Afterwards, the app didn't receive any notification while in foreground but did receive them while in background. I tried to add MyFirebaseMessagingService into AndroidManifest.xml like so: <service android:name

Running a scheduler for each user in Firebase Cloud Functions?

左心房为你撑大大i 提交于 2020-04-06 04:14:19
问题 I wish to run a scheduler which runs according to each user in my cloud functions and not universal scheduler which runs at the same time for all users. For example, if a UserA performs a certain action the scheduler(eg. every 30 mins) is initiated for userA only and not other users. But then UserB also performs that same action and initiates the scheduler for himself at a different time. Now UserA’s and UserB’s scheduler could be running at different times but same intervals(30 mins) How can

React-native-firebase: Push notifications not always working on iOS

情到浓时终转凉″ 提交于 2020-03-24 08:03:33
问题 I implemented an app in react-native that send push notifications via Firebase. Most of the time, it is working well, but sometimes, the push notifications are not received by the device (mostly iOS 13 devices). For the devices receiving my push notifications correctly, onNotification is triggered everytime (foreground and background). For the devices not receiving my push notifications, onMessage is triggered (only on foreground). package.json "react-native-firebase": "^5.6.0" Podfile pod