how to export import sqllite database from/to Drop box in android?
<p>I have successfully integrated dropbox with my app and can upload and can download files, but when I upload a sqlite database file then after downloading it, the file doesnt contains any data.</p>

<p>Here is my code how I upload:</p>

<pre><code>public void upload() {

        FileInputStream inputStream = null;
        try {
            File file = new File(Environment.getExternalStorageDirectory()
                    .toString() + "/tripmileagedatabase");
            inputStream = new FileInputStream(file);
            Entry newEntry = mDBApi.putFile("/tripmileagedatabase", inputStream,
                    file.length(), null, null);
            Log.i("DbExampleLog", "The uploaded file's rev is: " + newEntry.rev);
        } catch (DropboxUnlinkedException e) {
            // User has unlinked, ask them to link again here.
            Log.e("DbExampleLog", "User has unlinked.");
        } catch (DropboxException e) {
            Log.e("DbExampleLog", "Something went wrong while uploading.");
        } catch (FileNotFoundException e) {
            Log.e("DbExampleLog", "File not found.");
        } finally {
            if (inputStream != null) {
                try {
                    inputStream.close();
                } catch (IOException e) {
                }
            }
        }

    }
</code></pre>

<p>and my download method is:</p>

<pre><code>public void download() {

        FileOutputStream outputStream = null;
        try {
            File file = new File(Environment.getExternalStorageDirectory()
                    .toString() + "/tripmileagedatabase");
            outputStream = new FileOutputStream(file);
            DropboxFileInfo info = mDBApi.getFile("/tripmileagedatabase", null,
                    outputStream, null);
            Log.i("DbExampleLog", "The file's rev is: "
                    + info.getMetadata().rev);
            // /path/to/new/file.txt now has stuff in it.
        } catch (DropboxException e) {
            Log.e("DbExampleLog", "Something went wrong while downloading.");
        } catch (FileNotFoundException e) {
            Log.e("DbExampleLog", "File not found.");
        } finally {
            if (outputStream != null) {
                try {
                    outputStream.close();
                } catch (IOException e) {
                }
            }
        }

    }
</code></pre>

<p>But when I take this database in my app then it shows no data in that database, what can I do now?</p>
