Code Monkey home page Code Monkey logo

dropboxsdk-for-android's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dropboxsdk-for-android's Issues

DropboxServerException (nginx): 500 Internal Server Error (Internal Server Error)

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();
}

Import Proyects

Hi men, I tryed to import the proyects and run the DropboxSample but it doesb´t work. The error is: Uncaught Handler..

Any help?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.