How to get Current User Information using parse.com android -


i working on android parse.com. have logged in , signed credentials , data uploading in parse.com tables. code snippet login given below:

loginbutton.setonclicklistener(new onclicklistener() {              public void onclick(view arg0) {                 // retrieve text entered edittext                 usernametxt = username.gettext().tostring();                 passwordtxt = password.gettext().tostring();                  // send data parse.com verification                 parseuser.logininbackground(usernametxt, passwordtxt,                         new logincallback() {                             public void done(parseuser user, parseexception e) {                                 if (user != null) {                                     // if user exist , authenticated, send user welcome.class                                     intent intent = new intent(                                             loginsignupactivity.this,                                             welcome.class);                                     startactivity(intent);                                     toast.maketext(getapplicationcontext(),                                             "successfully logged in",                                             toast.length_long).show();                                     finish();                                 } else {                                     toast.maketext(                                             getapplicationcontext(),                                             "no such user exist, please signup",                                             toast.length_long).show();                                 }                             }                         });             }         }); 

now need information of current user, kindly mention me method or changing have information of current user.

thanks in advance!

calling things user.getobjectid(); or user.getstring("username"); how information parseobject.

loginbutton.setonclicklistener(new onclicklistener() {              public void onclick(view arg0) {                 // retrieve text entered edittext                 usernametxt = username.gettext().tostring();                 passwordtxt = password.gettext().tostring();                  // send data parse.com verification                 parseuser.logininbackground(usernametxt, passwordtxt,                         new logincallback() {                             public void done(parseuser user, parseexception e) {                                 if (user != null) {                                     // if user exist , authenticated, send user welcome.class                                      string username = user.getstring("username");                                     string userid = user.getobjectid();                                      intent intent = new intent(                                             loginsignupactivity.this,                                             welcome.class);                                     startactivity(intent);                                     toast.maketext(getapplicationcontext(),                                             "successfully logged in",                                             toast.length_long).show();                                     finish();                                 } else {                                     toast.maketext(                                             getapplicationcontext(),                                             "no such user exist, please signup",                                             toast.length_long).show();                                 }                             }                         });             }         }); 

Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -