php - Android app and login to my database -


i'm developing android app similar social network. have created signup form, login form , other asynctask send data database. send data using post request receipt php page execute query database e send json result application.

for example, when user log in app, send post "login.php" page check if there user in database. then, if user exist in database, php page send json application read , open home activity.

now, if close app (without logout) or reboot phone when open again application have login everytime.

how can maintain connection open in app? user must log off if press logout button.

also there better way send data such username , password server?

sorry english

you can use sharedpreferences storing credentials. save data when exit app , when return app data sharedpreferences , check see if login succeeded or not.if login succeeded start home page activity or start login activity. can use database store credentials, if want , can use encryption send data , server


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -