I have an application where the user can add quotes.
I'm using Room for data storage.
I want to make it so that the user can add a quote and it would be visible to other users of the application.
Questions:
How can this be done correctly?
How to open access so that all users can see, not just you?
Thanks!
Related
I'm designing a fitness app where a trainer would upload workouts to a database and a client could access those workouts via an app. This is easy enough to setup, however, I'm struggling to find a good way to upload workouts to a database in a way that someone who is non technical could easily do. I've been primarily playing around with FirebaseDB, but I'm open to suggestions. I'm trying to avoid having to create my own app for the trainer to input data and upload to the database as it will take extra time. Is this the best approach?
If you are thinking to expand your app in near future i suggest you to avoid FirebaseDB. Go with MS-SQL. Create User Table and add a Field may be called as 'Member_Types' (Admin|User). If the logged in user is Admin then Show him Different Page from where He can Upload Data by just inserting in Textboxes/Dropdowns/etc,etc and Clicking One Button Click. Whereas if the user logged in as a USER type show him the page which shows the data uploaded by Admin.
Using FirebaseDB is OK but If you want to deal with really complex data which this app can (In case to want to expand this app and want to add more and more features). I even Suggest if u are going with MS-SQL , Create your Own WebAPI to handle the requests.
All the Very Best for your App.
I am stuck at a point and can't figure it out how can I manage to send user's data which is stored in the database to another user with admin privileges after user just press a button in an app and display this info on admin's screen.
Till now I am done with the database to store user info during registration, I am new to android development and have just basic knowledge is there any better way in which i can possibly do that please let me know.
thanks
Yes, I assume you access your SQLite with a content provider/resolvers. You have to make them available to other apps, at which point they can access your data. Starting reading about it here:
https://developer.android.com/guide/topics/providers/content-providers.html
Think about why you can easily use content provider/resolver to see all gallery photos, it works the same way. It is because the photos are stored in a publicly available SQLite database and by using content provider you can access or even modify them.
I am creating an android app that can be used by common users and also admin.
Suppose, if admin adds a new place name, that name should be added to database and when common user uses the app, he should be able to see the place name that is added.
I used MySqlLite database. But the problem is that if the app is uninstalled all data is lost. So I want some persistent data storage in which all the places that are added by admin are saved permanently.
Regards,
Sindhu
With the data being needed across multiple devices, your only option is to create/use a backend API.
Parse would have been a good choice but since that is getting shut down soon then it wouldn't be wise to use that.
Take a look at these alternatives here
You could also write one yourself, but unless you have some experience in that sort of thing then it will take some time to learn.
I am developing a app and want to see offline data if Internet is not available . And this app can use multiple user like as after logout one user then another user can login and can see own data So how we can make database to accessible for among user
Use a discrimator column in your database table design to mark owner ship of every record.
Then you can impl. your data access methods so that they only query records for active user.
It's a design issue not a developing problem ;)
I'm writing an (Android) app (probably a website too) that logs some data from the user when they click a button. I'm currently playing with storing this data in a Google Fusion Table. How can I configure the permissions so that the app (or the website) is allowed to add an new entry to the table, and view it, but not change existing data?
I imagine I could do this by running a service in the middle that takes the data from the phone, and is auth'ed to write to the table, but would rather a simpler solution.
I think what you want is not possible, as there is no "INSERT only" permission, if you are the editor of a table you actually can edit and insert data.
see also issue 538
Maybe you can do something similar when using views, so a user can update this view, but not all the other data. Maybe you can hide the data from the editable view right after a user inserted it. Of course, this must be considered as a hack or workaround.
to get the idea: Flu Vaccine Finder example