Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,848 Members 36,614 Now Online
XDA Developers Android and Mobile Development Forum

How Get The Current User ID

Tip us?
 
clonedaccnt
Old
#1  
Member - OP
Thanks Meter 0
Posts: 31
Join Date: Jun 2014
Default How Get The Current User ID

I created a login system for my app, my login has a session management functionality so that user don't need to login everytime he/she uses the app. My question is how to get the current user id?

Note: The login details are fetched from a web server.
 
panwrona
Old
#2  
Junior Member
Thanks Meter 1
Posts: 9
Join Date: Jun 2014
Location: Wrocław

 
DONATE TO ME
Make a table in local db for example CURRENT_USER and store there details for user session
 
deanwray
Old
#3  
deanwray's Avatar
Senior Member
Thanks Meter 417
Posts: 1,120
Join Date: Apr 2006

 
DONATE TO ME
Quote:
Originally Posted by clonedaccnt View Post
.
Quote:
Originally Posted by panwrona View Post
.
a database for what equates to a session token is a bit much I would think.

Maybe just issue a login token from server and store that in 'shared preferences' on the device with the expire time.
The Following User Says Thank You to deanwray For This Useful Post: [ Click to Expand ]
 
clonedaccnt
Old
#4  
Member - OP
Thanks Meter 0
Posts: 31
Join Date: Jun 2014
I learned so much from you deanwray. Thank you very much.
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes