How can I share local database of an existing app with a new app and make both work on it simultaneously? - database

One of my client's inventory management project supports online as well as offline mode to manage huge inventory data and is built using Xamarin.Forms & sqlite-net. Now, the client wants to create another similar kind of app and wants us to use the same local db of the first app.
The actual functionality he needs is that if I have data in one app then it can be shared to the second app and vice-versa. Like, if I'm logged into the first app then user automatically gets logged in to second app when it is launched. For that reason being, we need to have a shared database among both these apps. So, that both apps can read and write in a shared database. How can I achieve this? What will be the best and most efficient approach in Xamarin?
After some research I've found things like shreduserid for data sharing among android apps and App Groups for data sharing for iOS app. If anyone can help me with how to work around with them and best approach to follow.
Anyone having any idea or have done such thing is requested to provide your suggestions/links/code etc.
Thanks!

Related

How to choose the right database for lyrics

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.

Firebase - Add many apps to one project

This is the first time i'm working with firebase. My goal is to have a bounch of client apps (more and more over time), all of them managed by an admin app (One app to rule them all).
The thing is that the client apps have a certain content that needs to be updated from the admin app. My best approach is to create a firebase project, put the admin app there and adding client apps over time. I'have read that is possible to have an unlimited number of apps inside one Firebase project. On addition, someone told me to create one project for each client app and connect them to the same database somehow. I simply don't know what to do.
Which would be the best solution for my problem? thank you
firebaser here
A Firebase project can currently contain up to 30 app definitions. This is meant to support variations of the same logical application. For example, having an Admin app in addition to the app for regular users, and/or having an iOS, Android, and Web version of the same app, and for example having a free and a pro version of the app (if that is allowed by the stores where you deliver them).
Adding multiple apps to a project is expressly not meant to be used for white labeling apps, where you ship essentially the same app with different branding to different user segments, as you'd be sharing the backend services between them. For some backend services (such as database and storage) this is not necessarily a problem, as you can isolate the customers with security rules. But for other services (such as authentication and analytics) this is not possible, which is why this use-case is not supported.
If you need to define a separate app in the project for each customer, the only supported approach is to create a separate project for each customer.
I'have read that is possible to have an unlimited number of apps inside one Firebase project.
In that case please provide a link, so we can either fix it, or (if it's not in the Firebase documentation) leave a comment to clarify.

Share Database between React Native Apps

I am building two react native apps where i need to keep few things in common like username(login) and few other information.I tried to store using AsyncStorage (React Native Storage) and everything was working but now i need to use one common data base for both the apps as the user login success in first app then the other app should also be logged in.As Asyncstorage cannot be used in this case any other option in react native.
The new privacy laws do not let share the same database for 2 applications. The only thing you can do is put the database online and access to it by both apps. At least it happen in Europe. Anyway you can't use the same AsyncStorage to 2 different apps. See more here: https://stackoverflow.com/a/48806319/8898886
In Android, the system design do not permit that. Every app has its own sandbox. Shortly, an app can not access the database of another app.
But it could be swindled, at your risk.
You could use a sqlite database, put the database file in a shared directory, and access that file from each app. Please note that each means really each. Every app on the device could access that file, so it is not a safe place for sensible data.
The best solution, as proposed, is to use a external db, accessible from the network, to store your data. If you belive that the effort is not worth it, you could use Firebase, for example.
You can not use that locally. But with Firebase you can make 2 app have same Firebase Realtime database so you can share data between 2 app (event realtime).
I prefer use this react-native-firebase library for React Native https://github.com/invertase/react-native-firebase

Database app, accessible from Mac, iPad and Web

I feel very out of my depth with this query, but not being able to do it isn't really an option so I am going to have to learn how one way or another.
I have been tasked with building an application / database for a Chauffeur company. I have done similar things before in Microsoft Access for other customers, hence getting this request, but this customer wants to be able to run the app on their Mac, and not install Windows. My only real experience of coding is HTML/CSS and some VBA when using Microsoft Access. For these Access DBs I have created separate front and back end files to allow multi user access and also remote access (the back end file being kept on the company server).
So onto my query (apologies for dragging it out)...
I need to be able to build something that the single user can open and run on his Mac, so he can view, add, change jobs and their details. He also needs to have the same access on his iPad, although purely viewing would suffice.
As regards the web access, basically he wants to be able to go onto his "Booking System" application, go to "New Job" and send a link to his client, where they would click the link in a browser, fill in the details (Name, Contact Number, collection and drop off addresses, collection date and time etc...) and when they submit this form the details be updated on his booking system.
My issue is I do not really know where to start. I just need some pointers as to where to get started. Is it an issue of building a MySQL database back end and then hosting this somewhere and linking different front ends to it etc...
Yes, with multiple clients, the web is your best answer. For the cheapest hosting route, you can find good, inexpensive PHP and MySQL hosting that will provide what you need. You can design the front end with HTML/CSS, use PHP to develop the logic and data access, and use MySQL to host the data.
The Mac and iPad can access the application via the web URL--you will not be building an iOS app, rather the user will access the web site through a web browser. You can use some pretty neat tools like jQuery UI Mobile to create an app-like experience, but if you need to support multiple clients on a small budget, an iOS app and separate web site is not the way to go.
Make sure you have some PHP expertise available or figure this part out. There are tons of great resources on the web to get started. Good luck!

Backend for iOS app

My question is how do i get information from a server to my iphone app. let's assume I have completed my current project I'm working on that only needs data to be uploaded to my application.
I understand there is a database or server I must create but how do I go about creating or modifying one for my needs.
I mainly want to store login information from one user and allow users to search for people who have entered login information (name) to add to a friends lists within the current app.
i think in your case you can use Django-tastypie for backend will be good choice.since using django you can develop it in quick time and the tastypie has api services which can used easily for retrieval and sending data
you can go through this
http://django-tastypie.readthedocs.org/en/latest/
Take a look at services like Stackmob or Parse. These types of service could make it really easy for you to get the server side part of your application up and running. These services would act as your database and also provide an easy api for you to access the server side pieces.

Resources