How to display all delivered notifications in react native? Firebase - react-native

I want to build a notification screen where it lists all the notifications associated with the current user.
I have successfully implemented Firebase to my react native app and Django rest framework backend and can send and receive notifications
But I’m having hard time figuring out how to display all the users notifications. Is that something I take care of in the backend or frontend?

You have to store all your notifications on the backend in your database, and then you just show them on the front.

Related

React Native notification/alert

In react native app
I want to implement a feature in which any employee whenever completes a certain task then reporting person should get notified
eg. Site visit, the employee checked in the app, etc.
So please guide me
How to implement this feature and which package should I use?
What I found till now
FCM
react-native-notifications
react-native-in-app-notification
As you are using a real-time database, write a listener which dispatches an event with some payload data every time an employee accomplishes a task.
In this context, any local notification package can push local a notification for each event dispatched.
I recommend https://notifee.app/ for Local notification, It has easy API and more notification-related features.
In case you favor cloud over local notification. You should review https://docs.wonderpush.com/docs/mobile-push-notifications-react-native. They have an easier-to-use API for pushing and receiving notifications.

What is the best way to validate monthly subscription in react native?

My react app uses react-native-iap module for in app purchases and It has a monthly subscription. I am facing few problems with validating my monthly subscription and I couldn't find any solution for that.
When user do a subscription first it will validate and update the state of my app as subscribed.
If user close the app and open it again also the validation will happen and update the state of the app as subscribed.
But user does not close the app, then there is no method to validate the subscription. User can use premium features until he/she close the app.
I tried with setInterval and periodically send request to the server to validate , but this method will reduce the performance of my android app drastically. So I can not use that method also.
Is there a correct/best way to validate monthly subscription periodically ? or Did I miss something by implementing monthly subscription ?
Thank you.

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.

How to save data in a salesforce account using react-native?

We are building an Application and we need to store some data to the user's Salesforce account. I looked into some solutions where people are using Apex but I am unable to understand how to use them with React Native.
Please give me some good documentations to refer of How can I save my data from my React Native App to my Salesforce Account.
I tried to look into Apex and visualforce but not understanding how to use it with React Native.
For react Native you will have to call REST API exposed by salesforce. You will need to create a connected app and get the security key and client id. Use them to authenticate and get a access_token. Once you have that token, use it to make a POST call to /services/data/v45.0/sobjects/Account using the account id. Send a JSON payload to add your data.
Example of a GET call is :
/services/data/v45.0/sobjects/Account/0013600000udFs8AAE
Hope this helps!

React Native application with subscription: custom Stripe flow?

I've developed my custom onboarding with a one-time payment using Stripe which, if succeded, updates subscription data in my database. Then I have logic in my React Native app that will determine whether the user's subscription is expired.
Sadly, as I understand App Store requires Apple's In App Subscriptions to achieve such task. Does Google Play have the same requirement? Will my app be rejected?
https://github.com/dooboolab/react-native-iap is the only crossplatform solution I've found but does anybody know how to set up a year subscription on both platforms?
yes, in google play, you can make a free app or a paid one. Within this app, you can insert In-app products which could be subscriptions as well. It a pickle. I give my app for free for 3 months and then charge for subscription. there is a grace period you can define as well