Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

How Get The Current User ID

OP clonedaccnt

6th July 2014, 05:12 AM   |  #1  
OP Member
Thanks Meter: 0
38 posts
Join Date:Joined: Jun 2014
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.
6th July 2014, 07:51 AM   |  #2  
Junior Member
Flag Wrocław
Thanks Meter: 1
14 posts
Join Date:Joined: Jun 2014
Donate to Me
Make a table in local db for example CURRENT_USER and store there details for user session
6th July 2014, 10:50 AM   |  #3  
deanwray's Avatar
Senior Member
Thanks Meter: 429
1,145 posts
Join Date:Joined: Apr 2006
Donate to Me
Originally Posted by clonedaccnt


Originally Posted by panwrona


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: [ View ]
7th July 2014, 12:54 AM   |  #4  
OP Member
Thanks Meter: 0
38 posts
Join Date:Joined: Jun 2014
I learned so much from you deanwray. Thank you very much.
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes