I am new to React Native and currently building an App in Expo. I am trying to add an offline feature in my app. Take Profile Screen for e.g. if a user updates his/ her name in the app and it doesn't have the internet access/ is offline so when the user gets back online his/ her name will be uploaded on the database. Till then, it should be able to see his updated name on his phone only.
So far I have build only front end part which accepts Name only. But don't know how to add this feature in my app ?
I am good at developing frontend but don't have a good knowledge how to connect frontend to db and backend. It will be helpful if someone can put some highlight for that?
Can anyone tell me how to achieve this type of offline feature ?
There are many way to achieve something like this. This works out of the box with Cloud Firestore, which is one way to accomplish offline functionality/persistence.
Check out this: Using Firebase with Expo.
One more way is you can use Asyncstorage if it's only a name field you want to store offline expo asyncstorage.
To send the updated name to database when user is online, you can use Netinfo expo netinfo to check whether user is able to access internet or not.
Related
I am new in mobile app development and I am developing an application in React Native, which will contains the lyrics of songs. Now, I am in a situation where I am thinking about the best way to make database for it.
I would like the basic lyrics to be downloaded to the device with the app, but also that the user can add other songs that would only be visible to him. Which way is the best? I think, that all songs could be saved into some database (for example in device storage or SD-card). I think about SQLite or Firebase, but is this the right way?
Thank you for all your advice ;)
Whole solution seems like a good use case for Firebase/Firestore.
Firestore seems to integrate well with mobile apps. It's also managed so it's a simple way to run a database for a mobile app given you can provide the customer with direct access to the database without the need for a backend.
I want to create an app with Flutter and also a web site with WordPress. However, I don't know if it is possible to connect both oh my site and app to a unique database and I don't find any document on it. Indeed, I want my customers to be able to log in them on both. Do you know if it is possible or not and have you any document that could help me ?
Thank you for your help
there is actually a very good article on how to proceed to make a Wordpress connection throught your app made with Flutter:
https://wordpress.org/support/topic/flutter-app-connection/
Also, don't forgot, that every wordpress have a public API (by accessing {wordpressWebsiteUrl}/wp-json) where you can get your post etc...
For Example, i am using react-native-firebase library.
I want to grow my app install and i create a campaign.
The question is how can i know my app is installed by clicking ads or my app is downloaded directly on play store.
Simply i want to know where was my app downloaded from. I do implement firebase analytics configuration.
It seems like you could follow the advice given in this question: https://stackoverflow.com/a/47893179/4147687
Essentially, if all you want is simply a way to track how your app was installed, you can simply pass utm parameters along with your URL.
For example:
https://link-to-my-app.com/?utm_source=business_card&utm_medium=email&utm_campaign=sign_up_offer
Google Play has it's own URL builder to make this step easier here. If you are not using any specific ad network just set it as "Custom".
Firebase will automatically scrape the source, campaign and medium parameters there and present them to you in the first_open conversion event. Documentation for how this works is here.
The easiest way to do this is by using this npm package
https://www.npmjs.com/package/react-native-install-referrer
You should invoke the API only once during the first execution after install.
You can do that using AsyncStorage to check if its freshly installed or not and then you can logEvent based on that UTM url and track the users
After creating the event you can segregate users by creating Audiences in the firebase console.
I have the next problem, I have a Mobile app that will be using for the users. A web app that will be using for the admin. I already develop both apps but I have a problem, I don't have a way to know who user is connected.
Both app are working with Firebase, users and admin are in the same Channel but I don't found a way to know which user is online.
React Native: https://github.com/syanbo/react-native-agora#readme
Reactjs: https://github.com/jjrajani/react-agora.io
Please, help me. Thanks. I want a way to assign an unique ID to each user (mobile app) and get those ID inside of web app.
PD:
The users will have the camera opened everytime and they can't listen or watch the others members (including admin). Just the admin can watch and listen to everybody but the admin needs to have a way to know which user is connected.
You need to assign unique uids to each user inside the join channel method both Web and React Native
You will receive this uid on the receiver's side while listening to "stream-added" event on the web and "userJoined" event on the React Native
I want to create a registration and login app and whenever i want to fill registration form then all information should goes in local database and will able to login with these credentials. Please help me how can i will create this. I am stuck in this from last 10 days. My main focus local database and this database access in mobile without using internet or firebase.
You can use SQLite if you use Expo you can use Expo SQLite and this sample may help you. also if you don't use expo you can use some sqlite wrapper like react-native-sqlite-storage
another option that comes with React Native is Async Storage