After linking my Dropbox account, I try to gather and store the datastore names inside of my local database. All is fine when I'm debugging my app, I can find all names inside of the datastore as well. But when I'm running the app without debugging, my database seems empty.
I think there is a problem of syncing, somebody could give me clue? I haven't found out solution corresponding to my issue.
This is the part of the code in question:
private void gatherData(){
db = new SQliteHelper( this ) ;
Set<DbxDatastoreInfo> datastorePresent = null ;
try {
datastorePresent = mDatastoreManager.listDatastores();
} catch (DbxException e1) {
e1.printStackTrace();
}
Iterator<DbxDatastoreInfo> datastoreLoop = datastorePresent.iterator() ;
while (datastoreLoop.hasNext()){
TitleList tit = new TitleList(datastoreLoop.next().id) ;
tit.setConnectDropbox();
db.addLists(tit);
}
mDatastoreManager.shutDown();
Intent returnIntent = new Intent();
boolean syncOK = true ;
returnIntent.putExtra("result", syncOK) ;
setResult(RESULT_OK, returnIntent);
finish();
}
0 comments:
Post a Comment