Android save user session -
i'm new in android i'm trying save login session , send every time send request server, web service php (zend framework 2).
this code identify user:
$auth = zend_auth::getinstance(); $identityobj = $auth->getidentity();
it's possible save session , send use web browser without make change in web service.
yes, is. have store session using sharedpreferences.
the idea is, after login, guess return kind of session id or whatever. need store it. then, in subsequents executions, fetch session before doing request.
sharedpreferences preferences = getsharedpreferences("com.blabla.yourapp", context.mode_private); //save preferences.edit().putstring("session", <yoursessiontoken>).commit(); //fetch // second parameter default value. preferences.getstring("session", "");
anyway better read documentation understand doing.
Comments
Post a Comment