mlamina / dropboxsdk-for-android Goto Github PK
View Code? Open in Web Editor NEWA fork of Dropbox's Android SDK
Home Page: hackingmobile.wordpress.com
A fork of Dropbox's Android SDK
Home Page: hackingmobile.wordpress.com
Hi i use this library for access dropbox in my application. in my application i need download data from dropbox in my application,i have code for it.
everything is ok selected file is created in sdcard bit it not download it give some error
error:
11-30 10:10:50.971: W/EGL_emulation(3110): eglSurfaceAttrib not implemented
11-30 10:10:50.971: W/OpenGLRenderer(3110): Failed to set EGL_SWAP_BEHAVIOR on surface 0xa487cf40, error=EGL_SUCCESS
11-30 10:10:53.295: W/System.err(3110): DropboxServerException (nginx): 500 Internal Server Error (Internal Server Error)
11-30 10:10:53.295: W/System.err(3110): at com.dropbox.client2.RESTUtility.parseAsJSON(RESTUtility.java:265)
11-30 10:10:53.295: W/System.err(3110): at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:415)
11-30 10:10:53.295: W/System.err(3110): at com.dropbox.client2.RESTUtility.execute(RESTUtility.java:339)
11-30 10:10:53.295: W/System.err(3110): at com.dropbox.client2.DropboxAPI.getFileStream(DropboxAPI.java:1549)
11-30 10:10:53.296: W/System.err(3110): at yptech.privategallery.upload1.DropboxDownload$3.run(DropboxDownload.java:292)
11-30 10:10:53.296: W/System.err(3110): at java.lang.Thread.run(Thread.java:818)
I got error in this method
private void copy(final Entry fileSelected, final File localFile) {
final ProgressDialog pd = ProgressDialog.show(DropboxDownload.this, "Downloading...","Please wait...");
new Thread(new Runnable() {
@Override
public void run() {
BufferedInputStream br = null;
BufferedOutputStream bw = null;
DropboxInputStream fd;
try {
fd = mApi.getFileStream(fileSelected.path,localFile.getPath());//****Here I get error******
br = new BufferedInputStream(fd);
bw = new BufferedOutputStream(new FileOutputStream( localFile));
byte[] buffer = new byte[4096];
int read;
while (true) {
read = br.read(buffer);
if (read <= 0) {
break;
}
bw.write(buffer, 0, read);
}
pd.dismiss();
Message message = new Message();
message.obj = localFile.getAbsolutePath();
message.what = 1;
mHandler.sendMessage(message);
} catch (DropboxException e) {
e.printStackTrace();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
if (bw != null) {
try {
bw.close();
if (br != null) {
br.close();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
}
}).start();
}
Hi men, I tryed to import the proyects and run the DropboxSample but it doesb´t work. The error is: Uncaught Handler..
Any help?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.