android - Parse.com how to get data that is saved from other device -


i've implemented class called 'donar' in parse.com , used in android app. can store , retrieve data class without problem let 'device 1'. problem i'm not getting data 'device 2' , vice versa. problem?

code saving data

                parsequery<parseobject> query = parsequery.getquery("donar");                 query.whereequalto("team_id", team_id);                 query.countinbackground(new countcallback() {                       public void done(int count, parseexception e) {                         if (e == null) {                             parseobject donar = new parseobject("donar");                             donar.put("name", name.gettext().tostring());                             donar.put("contact", contact.gettext().tostring());                             donar.put("nid", nid.gettext().tostring());                              donar.saveinbackground(); 

code retrieving data

        parsequery<parseobject> query = parsequery.getquery("donar");         query.findinbackground(new findcallback<parseobject>() {             public void done(list<parseobject> donarlist, parseexception e) {                 if (e == null) {                     donars = donarlist;                 } else {                     log.e("user", "error: " + e.getmessage());                 }             }         }); 

ok, got solution.

just comment out these lines in application class. @ least works me.

parseuser.enableautomaticuser(); parseacl defaultacl = new parseacl(); // optionally enable public read access. defaultacl.setpublicreadaccess(true); parseacl.setdefaultacl(defaultacl, true); 

Comments

Popular posts from this blog

java - Andrioid studio start fail: Fatal error initializing 'null' -

android - Gradle sync Error:Configuration with name 'default' not found -

html - jQuery UI Sortable - Remove placeholder after item is dropped -