android - Retrieve data from a class in Parse.com -


i have class in parse.com, xyz, , has columns email, password, phone, age. have email , password combination , want check whether there such combination in class? how do this?

i have class donate, , have been given email(e) , password(pw). here goes code:

`parsequery<parseobject> query = parsequery.getquery("donate");             query.whereequalto("email", e);             query.whereequalto("password", pw);             query.findinbackground(new findcallback<parseobject>() {                 @override                 public void done(list<parseobject> list, parseexception e) {                     if (e == null) {                         toast.maketext(getapplicationcontext(), "success!!!", toast.length_long).show();                     } else {                         toast.maketext(getapplicationcontext(), "something went wrong!!!", toast.length_long).show();                     }                 }             });                     `             

and shows 'success' irrespective of strings e, , pw.

parsequery return parseexception if there technical issue calling server. else, though query doesn't find looked for, return empty list , 'e' var null. need :

    parsequery<parseobject> query = parsequery.getquery("donate");     query.whereequalto("email", e);     query.whereequalto("password", pw);     query.findinbackground(new findcallback<parseobject>() {         @override         public void done(list<parseobject> list, parseexception e) {             if (e == null) {                 if (list.isempty() == false) {   // add                     toast.maketext(getapplicationcontext(), "success!!!", toast.length_long).show();                  }else{                     toast.maketext(getapplicationcontext(), "worng password!!!", toast.length_long).show(); // add                  }              } else {                 toast.maketext(getapplicationcontext(), "something went wrong!!!", toast.length_long).show();             }         }     }); 

Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -