java - Retrieving objects from Parse data browser -


i've saved object parse data browser , i'm able see object on website, i'm having trouble retrieving object in android app here code i'm using

public class mainactivity extends activity implements onitemselectedlistener {  @override protected void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);     setcontentview(r.layout.activity_main);     spinner spinner = (spinner) findviewbyid(r.id.spinner1);     parseanalytics.trackappopened(getintent());       spinner.setonitemselectedlistener(this);                         } @override public void onitemselected(adapterview<?> parent, view view, int position,         long id) {     parse.initialize(this, "app id", "client id");       parsequery<parseobject> q = parsequery.getquery("testobject");     q.getinbackground("brulhlsw6d", new getcallback<parseobject>() {          @override         public void done(parseobject arg0, parseexception arg1) {             log.d("test4", "good");             if (arg1 != null) {                 toast.maketext(this, arg0.getstring("foo").tostring(), toast.length_long).show();             }              else {                 toast.maketext(this, "help", toast.length_long).show();             }         }     });  } 

not sure you're expecting getcallback, but... in done() method (probably) checking "good result" when arg1 not null. is, instead, error case (arg1 exception).

so, query works missed if branch.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -