java - ParseUser Query Android - Store users in List -


i have parse query retrieves users stored in parse if xyz field true. have tested query correctly in activity, passing data via intent activity within done() call. however, i'd call parse query via fragment , store list of users in fragment used later, in mdataset.

fragment

protected list mdataset;

@override public void oncreate(bundle savedinstancestate) {     super.oncreate(savedinstancestate);      parsequery<parseuser> query = parseuser.getquery();     query.whereequalto("xyz", true).findinbackground(new findcallback<parseuser>() {         public void done(list<parseuser> objects, parseexception e) {             if (e == null) {                 (parseobject user : objects) {                     string eachuser = user.getobjectid();                     mdataset.add(eachuser);                         // here pass mdataset via intent if using 2 activities (which i'd rather not do)                 }             } else {                 // handle parse exception here             }         }     }); 

instead, mdataset remains empty after done() call completes. how go fixing this? thanks.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -