How to store parseObject locally as well as in parse Cloud using parse sdk android

I include local data storage:

Parse.enableLocalDatastore(mContext);
Parse.initialize(mContext, PARSE_APP_ID, PARSE_CLIENT_KEY);

      

and now I am trying to save changes to the current parseUser in the local database as well as in Parse Cloud

mParseUser.put(DBConstants.KEY_TAKEPICEVERY, takePicEvery);

//Save in local database
mParseUser.pinInBackground(new SaveCallback() {
  @Override
  public void done(ParseException e) {
    //try to save in Parse Cloud
    if(e==null)
      mParseUser.saveEventually(new SaveCallback() {        
        @Override
        public void done(ParseException e1) {
          Log.e("Save Done:", "="+e1);
        }
      });
  }
});

      

saveEventually

never stores updated information in the analysis cloud, doesn't even work saveInBackground

.

+3


source to share





All Articles