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 6469953
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:03:11+00:00 2026-05-25T06:03:11+00:00

I am developing my android application using Netbeans and java. When I am using

  • 0

I am developing my android application using Netbeans and java. When I am using the emulator I can access the File explorer and insert an SQLite database in to device internal memory by accessing the following path, data/data/com.example.helloandroid/database

But I can not access this location to push the SQLite File in to the phone’s internal storage (location) when I am using the real device.

Can someone please help me how to add the file in to phones internal storage. Thanks

  • 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-05-25T06:03:12+00:00Added an answer on May 25, 2026 at 6:03 am

    I think the device doesn’t have root permission, that’s why you can’t access it. If you want to do in your app with programmatically then it is possible. If anybody knows better then this please share it.

    EDIT: ok, first of all,

    1. copy your Database.db file in your projects assets folder.
    2. now using code copy database file from /asset to device's internal storage 
       (data/data/<package name>/database folder).
    

    For copy file use below code,

    try {
         // Open your local db as the input stream
         InputStream myInput = myContext.getAssets().open("your database file name");
    
         // Path to the just created empty db
         String outFileName = "/data/data/<your_app_package_name>/databases/<database_file_name>";
    
         OutputStream myOutput = new FileOutputStream(outFileName);
    
         // transfer bytes from the inputfile to the outputfile
         byte[] buffer = new byte[1024];
         int length;
         while ((length = myInput.read(buffer)) > 0) 
             {
           myOutput.write(buffer, 0, length);
         }
    
        // Close the streams
        myOutput.flush();
        myOutput.close();
        myInput.close();
    } 
    catch (Exception e) 
    {
         Log.e("error", e.toString());
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i am developing an android application using google maps data.I can access google maps
I'm developing an Android application and using SQLite. I would like to access the
I am developing an Android application using SQLite as backend. I want to make
I'm currently developing an Android application that fetches images using http requests. It would
I am developing a small application on Google's android emulator. I am trying to
Has anybody had any success with developing for Android platform using Netbeans (5.5+ )
I'm developing Android application using third party libraries (Twitter4j). I want to be able
I am developing a simple android application using eclipse. I wrote a JUnit TestCase
I am using Titanium appcelerator for developing my android application, more over i am
I'm developing an Android application using Android 1.5. I'm using an older version of

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.