After login in android app, how do I create a token session in the php api?
Like this:
I would like to make sure that when user log in it will stay in session no matter what happens (crashed, shut down/power down/reboot, leaving the app) at same time the user info data will be sending with all the activities in the app to the webserver.
Do I simply use:
session_start();
$_SESSION['username'] = $user;
$_SESSION['auth'] = "true";
If so how do I pass this session into the android application?
Login Authentification in Android App:
HttpClient client = new DefaultHttpClient();
String url = "http://www.somewebsite.com/login.php?username="+username+"&password="+password;
HttpGet request = new HttpGet(url);
// Get the response
ResponseHandler<String> responseHandler = new BasicResponseHandler();
response_str = client.execute(request, responseHandler);
php android authentication login session-cookies