I am thinking about the design of an android application which will need to create user accounts and have some information about the app users. While researching in the internet and the developer site, I got the impression that to maintain the database , you have to have a server.
What if I don't want to maintain the account information in my own server (i.e. I am not willing to maintain my own server for this), what options do I have and what will be their drawbacks (if any).
If there is no other choice but to use a server, then can I get suggestions as to how can I modify my design so that I don't have to use a server.
I am a novice at this field, so I would appreciate advice.
Thanks in advance!
Create external database file with credential table in this table create appropriate columns like username,password etc..here if you have registered users then store those users details in credential table.Finally copy that database in assests folder then using SqliteOpenHelper class copy that external database to phone memory.Here you need to maintain registration page with conditions.If the user completes the registrations procedure with your conditions then store his/her details in credential table.When user wants to login to the App please check the username and password in credential table.
Related
I am building a series of Android Apps that will be used by hotels to help with their operation. The backend for the apps to access the database is written using the SlimPHP microframework. Once I get the system is complete, my customers will be assigned a database for their information. I need a way of configuring Slim to use the assigned database name. The way I have it planned is when the customer signs up for an account with me, I will have a script that will create an account for the customer to include a database. The database with be identical from customer to customer. I just need a way to set SlimPHP to use the correct database. I was thinking of have the database name saved in android, and have that name sent to Slim from the app with each request. I am not sure how/if Slim can do it. Is it possible, or will I need to create my own API from PHP for my apps? If I need to provide more information, please let me know. Thanks for any help. Troy.
I need to add a password reset part to my application but in my application user's email and password store in the realtime database not in the authentication database. Like this:
Actually I do not care about security so I just built this for my education purpose. Can you give me any tutorial or example that I can follow to code the reset password part?
Should be relatively simple to do.
Video here on it
https://www.youtube.com/watch?v=0-DRdI_xpvQ
However, please do not store passwords as raw text data. It is insecure and not good practice. Sure its fine for demo applications but you should store them using some kind of encoding/encryption/hashing.
Well, the Firebase authenticator has a function to reset the password via email, if you want to try with that one.
If you want to stay just with realtime DB my suggestion is to update that value for that specific user Google Firebase Documentation for that
It's not a code problem but it's just by my curiosity.
I am making an application that can be logged in by social login, and also email login.
In my application, I plan to use some SQLiteDatabase to save simple datas.
However, when I just save it with A account and login with different account, won't there be conflict because its the same device and server is not intervened with it? How do you know it's different account when its the same device, one application?
Think its sort of a silly question maybe, but if there's a way that everyone uses to solve it, I would like to know.
There can be two cases -
You want to use same database for different users -
In this case, there is no problem as your SQLite database gets saved in your app's /data/data folder which will be always accessible from inside your app.
You want to use different database for different users -
In this case, you have to add user_id column in all the tables of your SQLite database, and based on your user_ids, you can do your database actions like query, deletion, etc
I'm trying to use SQLite Databases, but as I'm learning (via the internet), I'm getting really confused and I have a few questions.
Where is the data actually stored? For example, let's say I want a database that stores all the usernames and all the passwords for everyone who uses my application. I need to write this information onto the database, but where is it? Is it on the user's phone? Is it on the web somewhere? Whenever the user goes onto the app, I need to read from the database. Does it read from somewhere online or does it only read from the database created on the user's phone? Is there any way to create a static database that all users are able to write to?
If I'm using a SQLite Database to store username and passwords, do I need to secure it with a password? If so, how? I've read on some websites that this information can easily be read if it isn't secured with a password, but others tell me that it can only be accessed by my application.
SQLite Databases are used where you need to store the data of particular user or save his usage or some data which is permanent. This DataBase resides in the Android device. If you want to save the user accounts (say username & password) this should be done in the server (backend) and should get the data by using service calls every time.
Ex: You have a comic book application for which the user has to signup / signin. Then you maintain the user account in the server. After signup / signin, when user downloads a book to read. Make that book stored in the SQLite Database in Android device, so that it will be available forever.
If you try to maintain user accounts in the SQLite DataBase, you cannot get data of all the users an store in one Android device. So global data should be on server and Local data should be stores in SQLite DataBase.
1)straight answer is: When u use SqLite database in android application, in the sense your application have sqliteDatabase, means when u download that application in to your device then all sqlite database data stored in device.
2) For password security u have to encrypt password and store in sqlite database.
I'm creating an app which allows a user to login and retrieve some information about his account from a server. These information are inserted in a SQLite database, and then the user can set other preferences on them (I use sharedpreferences for this).
Now i want to expand the app allowing more users to login.
The problem is that i don't know exactly how to manage the database with multiple users, infact:
if I keep db after logout, and login with another account, I find the information related to the previous user;
if I don't keep the db, and erase it after logout, I miss all the preferences set by the user;
How can I solve this problem? Thanks..
This can be done in multiple ways
1. Have user id table created and link that to other tables using foreign key.
another way is
2. create new DB for each of the users. so your database name will have username. If user name changes then database changes.
with second way your code changes will be minimal.