0

I'm trying to make an Android application with two kinds of users, with a login and registration form, performing functions such as GPS tracking, Google Maps, the application communicates with a server in PHP and a MySQL database.

Now the question is, how do I manage sessions? I have to manage it in PHP and also with the shared preferences in Android? Or just handle them only with the shared preferences or only in PHP?

halfer
  • 19,824
  • 17
  • 99
  • 186
ivan
  • 9

1 Answers1

0

The contents are stored at the server. However the session is identified by a session-id, which is stored at the client and send with each request. Usually the session-id is stored in a cookie, but it can also be appended to urls.

please refer this post:

Android Http get Session Cookie

Community
  • 1
  • 1
Sam
  • 4,046
  • 8
  • 31
  • 47
  • can you give me an example how to do this? – ivan Aug 18 '14 at 10:01
  • what you said in the not edited post? to save something in the shared pref id don't remember. And can you redirect me to some php code or post an example please? – ivan Aug 19 '14 at 08:30