Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Francis L.4
10 years agoExplorer | Level 4
Linked Accounts
Hi,
I've been left to maintain an Android application that on a couple of devices has stopped working, and I've traced it down to something which I believe is quite strange. I've typed in the code...
Francis L.4
10 years agoExplorer | Level 4
My apologies. My first post is pretty jumbled. I have a lot of programming experience, but none of it on Android. Until now. :)
I believe the version I am running is 3.0.0, and when I drop 3.1.2 in, the call to getInstance() never returns and never throws an exception.
I understand the Sync SDK is now deprecated, but I need to get this application back up and running quickly. I've been playing around some more and have some more details.
The problem seemingly related to specific versions on Android as I have an APK which will run on 4.4, 5.0.2, 5.1.1 and 6 on different Nexus 7's, but the same APK will also *not* run on Nexus 7's running the same.
I unboxed two identical Nexus 7's and set them up from scratch exactly the same, to 5.1.1 and ran the APK on both of them. After choosing which Dropobx account to link to (I chose the same account on both) the application would crash.
I believe something else is happening though. At first sight I was quite sure the problem was with the code I posted. The actual code (not mine) is posted below.
The FileLoader class extends AsyncTask, and I believe the main error is an uncaught exception in doInBackground().
From looking through the forums there is something similar to what I'm getting, especially the mkdir issue, which is apparently fixed with 3.1.2 installed, which doesn't work for me.
https://www.dropboxforum.com/hc/en-us/community/posts/203290225-Error-from-DbxFileSystem-forAccount-init-cpp-201-mkdir-dV-files-No-such-file-or-directory
Any help would be greatly appreciated. Oh, and thanks for taking the time to read my ramblings.
public final static String SETTINGS_LOCATION = "/sdcard/etl_civ_settings.conf";
public final static String SETTINGS_UPDATE_LOCATION = "/etl_civ_settings.txt";
private FileLoader fl = null;
private DbxFileSystem fs;
private DbxAccountManager mgr;
private static final int REQUEST_LINK_TO_DBX = 0;
private Activity act;
act = this;
mgr = DbxAccountManager.getInstance(this.getApplicationContext(), appKey, appSecret);
if(!mgr.hasLinkedAccount()){
mgr.startLink((Activity)this, REQUEST_LINK_TO_DBX);
} else {
fl = new FileLoader(SettingsHandeler.SETTINGS_LOCATION,SettingsHandeler.SETTINGS_UPDATE_LOCATION, mgr, this);
fl.execute(new String[] {});
try {
fs = DbxFileSystem.forAccount(mgr.getLinkedAccount());
fs.addPathListener(this, DbxPath.ROOT, DbxFileSystem.PathListener.Mode.PATH_OR_CHILD);
} catch (Unauthorized e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!