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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T05:10:11+00:00 2026-06-15T05:10:11+00:00

I have an open question I would like to ask before starting development of

  • 0

I have an open question I would like to ask before starting development of functionality, only to learn more about the subject afterwards, just to start all over again 😉 I tried searching, but am not really sure what to search for. Therefor, I would like to pick your brains a bit here…

Here is the current situation:
I have an app that stores activity/event logs. In a simplified example:
“Person A filled a glass with 100ml of water”

This is stored as a record in a single table.

Now, for the requirement of the new functionality:
I connect an external storage device via USB to my tablet. On this storage device there are several text files. Each file contains parameters of an activity/event, similar to the one described above, but with different data.

I would like to create a function to import these files, read some of their content into the database as new records, and then store the file somewhere on the tablet, with a link to the file as a field in the DB. Ideally I would have liked to store the contents of the entire text file in a field, or a field in a related 1:1 table, but these files could be as big as 1MB (1MB would be very rare, but possible. Avg is around 100KB).

So, my questions are:

  • Is it at all possible to copy a file from an external storage device, linked via USB, to the android device’s SD card/internal memory? (I can access this storage device using a file explorer app on my tablet)
  • If so, what is the best way to go about this?
  • If not, what are my alternatives?
  • Also, if not possible to copy and locally store the files, is it still possible to access their contents on the external storage? In which case I will then just import the data I need, and not store a copy of the original file.

Thanks in advance, all replies are much appreciated!

  • 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-15T05:10:12+00:00Added an answer on June 15, 2026 at 5:10 am

    No one wants to take the chance? 🙂

    For future readers with the same problem:
    It is possible to read a file from a usb connected device. Keep in mind that reading the file directly from the file system is different than reading it as an attachment in a mail for instance. Not much more than a different path though 😉

    I ended up reading the file into a DB, splitting the lines across a record. In other words, not adding the whole file (or even a complete line) in a field, but rather parsing the file into a single record, split up into various fields.

    Two things I came across that might help you. Reading a file is pretty fast, but do not make the mistake I made by writing these lines to the database one by one. Better to add them all to a transaction, and commit at once. The other, you can use a read buffer to read the file, instead of the default inputstream. This also speeds up reading of large files.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

First off, before I ask, i would like to point out that this question
This question is about etiquette and open source projects. I have forked an application
I have already posted something similar here but I would like to ask the
I have a question about connecting Firefox via SSH. There are some websites like
This is a rather open-ended question, however I would like to know what are
This is a question from a Java noob. I have eclipse open (JRE 1.6),
I have a general question that is rather open-ended (i.e. depends on platform, application
I have a very simple Office utility question. Open Microsoft word (2003 or 2007),
I thought about migrating subversion a lot and I have several questions still open.
Before Some days my friend ask me some simple questions, but I have no

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.