Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8235339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:46:24+00:00 2026-06-07T18:46:24+00:00

I have successfully integrated dropbox with my app and can upload and can download

  • 0

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 doesn’t contains any data.

Here is my code how I upload:

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) {
                }
            }
        }
    }

and my download method is:

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) {
                }
            }
        }
    }

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:46:28+00:00Added an answer on June 7, 2026 at 6:46 pm

    Just access the sqlite file from their website on a browser and check in a sqlitebrowser to make sure data does exits in the database.

    This is what i’ve used. Might need to modify it a bit to work with ur api. But it should work

    private void saveStreamToFile(InputStream responseStream){
        try{
            byte[] buf = new byte[1024];int len;
            FileOutputStream out = getActivity().openFileOutput(
                    "SQLIITE_FILE_NAME", Context.MODE_PRIVATE);
            while ((len = in.read(buf)) > 0) {
                out.write(buf, 0, len);
            }
            out.close();
            in.close();
            responseStream.close();
    
            SQLiteDatabase appDb = SQLiteDatabase.openDatabase(this.getFilesDir()
                    .getAbsolutePath()+"/SQLITE_FILE_NAME.db", null
                    ,SQLiteDatabase.NO_LOCALIZED_COLLATORS
                    |SQLiteDatabase.OPEN_READONLY);
        }catch(IOException e){
            e.printStackTrace();
        }catch(Exception e){
            e.printStackTrace();
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have successfully integrated twitter's Oauth into my app, but anybody have an idea
I am working on a camera application and I have integrated it successfully but
I have successfully integrated the in app sample in my project and its working
I have successfully integrated PayPal. All is working fine. But I want my form
I'm creating a database so I can store usernames and passwords. I have successfully
i have successfully created distribution profiles and installed on my xcode organiser, but this
I have successfully integrated the Silent Post feature with our system for ARB subscriptions.
I have successfully integrated the three20 framework in my project, and I have extended
So we have Redmine successfully integrated with SVN. It's a mature integration (a few
I have successfully hosted my mvc website on server. But I'm not able to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.