-1

On Android, do people create separate apps accessing the same database? For example an app that has users, producers and a customer support.

How can one decide if it makes more sense to have a single app for this case, or multiple apps accessing a shared database?.

For example having a single app and classifying each via their input when they log in and redirecting to their activities. Or: make separate apps which I guess could be easier for development and maintaining purposes?

A good example of what I am speaking would be of app like "Uber".

  • 1
    Why is asking a question on “best practice” a bad thing? And questions which ask for programming language recommendations are off-topic on this site, see our help center. – Doc Brown Apr 29 at 6:10
  • I took the freedom to improve the wording of your question and avoid the parts which immediately attract close votes and downvotes. Please double check if I got your intentions right. Currently, I guess the question will be still on the edge of getting closed with the predefined "needs more focus" close reason. – Doc Brown Apr 29 at 10:42
3

If I understand you correctly, your question is more about the different user roles and whether you should offer separate apps for these users. The fact that all of these user roles need access to the same database is secondary.

It depends on your specific case, especially on whether users can be expected to switch roles (for example, an uber driver could be a passenger in another city) or whether you want to make sure that certain functionality such as database administration is really only available to a limited group of users. You also need to consider how often you expect schema/API changes and whether your release schedule for the separate user role functionalities is very similar or varies widely.

Considering the maintenance overhead for multiple apps, I'd normally lean towards a single app that can be used by several user roles, and separate software only for very limited admin/manager roles (maybe desktop/web applications to utilize more screen space).

| improve this answer | |
0

RDBMS like PostGreSQL are designed to be capable of handling several clients applications communicating with the PostGreSQL server thru TCP/IP sockets.

So setup some PostGreSQL on a Linux remote server, and have your Android application communicate with it, probably indirectly thru some HTTPS server application (maybe coded with libonion) running on another Linux server connected to the Internet.

Read more about DMZ. And about Continuations and web.

Your Android application would make HTTPS requests to some web service (AJAX, SOAP, REST). That Web service could query an RDBMS.

Actually, your Android app could just be some web page, a single page application.

See also ocsigen and haxe.

Look also into the helpcovid project as an example (work in progress in April 2020).

| improve this answer | |
  • I think they already know they can have multiple apps talking to one database, this question is about whether they should. – Turksarama Apr 29 at 6:24
  • The question is too vague to get an answer. An app used by an entire country is not the same as an app used by a few hundred people – Basile Starynkevitch Apr 29 at 6:49
0

I donot know if this is "best practice" but this is how google has decided that android should work as (b):

In android local databases are private to the app that owns the database.

Instead of public local databases android has public content-providers that other apps can use. (i.e. there is a telephone-book contentprovider where other apps can interact with.)

Technically it is easy to have a private local database. If you want to use a public local database you need this android workaround

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.