how to fetch currently logged in user's values in android??????

my users table consists of 3 columns-id,password and designation. i want
to fetch currently logged in user’s designation. i am unable to do it. i
would be grateful if somebody could come up with a solution and help me
out please.


This page can be useful for you
According to this, after user is logged in you can fetch user by calling Backendless.UserService.CurrentUser().



Thanks for your reply.
But how can I fetch the designation of the current user?

BackendlessUser user = Backendless.UserService.CurrentUser();
String designation = (String) user.getProperty( “designation” );

its generating an error
“Cannot cast from Object to String”

What is the type of designation property in Users table?

its string type

i m really sorry…
its boolean type.

So you can just make following:
String designation = user.getProperty( “designation” ).toString();

i m really sorry…
its boolean type.

If designation is boolean just cast it to boolean

thanks alot…it worked… :slight_smile:
i am developing an android app…i might need your help again…hope to get your help in future…!!!

You are welcome)

I have posted a new topic “how to upload and download a pdf file through backendless??”."