How can I view the details of the user who is currently logged in

41 views Asked by At

Am developing an android application in java android studio. I need to collect the details of the user who is currently logged in. I don't seem to find any help online. I have tried using the code below, but it is not working [[1]: https://i.stack.imgur.com/WZWH2.pnge].

https://i.stack.imgur.com/WZWH2.pnge

I have added a column in the user details table, called isCurrentUser, in this I am supposed to set it to true once a user logs in. I don't know how to do that either.

I would love some help on this, or a different way to achiev5e the same.

1

There are 1 answers

2
Cosmin Popa On

Try using "shared preferences". They are used to share data between activities.