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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:43:17+00:00 2026-05-21T03:43:17+00:00

I have been developing an application on the HTC desire. It runs fine. The

  • 0

I have been developing an application on the HTC desire. It runs fine. The application when a button is clicked downloads a file from the my web server and saves it onto the SD card.

I now want to run this application on my Samsung Galaxy Tab. However, is crashes when i click on the button.

The only reason i can see is that the tab is not allowing access to the SD Card. It is the same SD Card i had in the HTC Deisre phone and it is not write protected or anything?

Anyone know what can be wrong?

This is the code i am using to download a file and store it on the card…

 class CreatefilesTask extends AsyncTask<Object, Integer, Boolean> {
    protected Boolean doInBackground(Object... arg0) {
        try{
            URL url  = new URL("http://213.143.36.32/file.csv");
            URLConnection conexion = url.openConnection();
            conexion.connect();
            int lenghtOfFile = conexion.getContentLength();
            InputStream is = url.openStream();
            File testDirectory = 
            new File(Environment.getExternalStorageDirectory()+"/File");
            if(!testDirectory.exists()){
                testDirectory.mkdir();
            }
            FileOutputStream fos = new FileOutputStream(testDirectory+"/file.csv");
            byte data[] = new byte[1024];
            int count = 0;
            long total = 0;
            int progress = 0;
            while ((count=is.read(data)) != -1){
                total += count;
                int progress_temp = (int)total*100/lenghtOfFile;
                if(progress_temp%10 == 0 && progress != progress_temp){
                    progress = progress_temp;
                }
                fos.write(data, 0, count);
            }
            is.close();
            fos.close();
        }
        catch(Exception e){
            e.printStackTrace();
        }

This works fine on the Desire.

StackTrace..

03-31 12:45:07.823: INFO/PowerManagerService(2494): Ulight 3->7|0
03-31 12:45:07.831: VERBOSE/WindowManager(2494): Delivering toWindow{48419208 com.android.qservices/com.android.qservices.AdminActivity paused=false}
03-31 12:45:07.898: VERBOSE/WindowManager(2494): Delivering toWindow{48419208 com.android.qservices/com.android.qservices.AdminActivity paused=false}
03-31 12:45:08.261: WARN/System.err(5314): java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare()
03-31 12:45:08.261: WARN/System.err(5314):     at android.os.Handler.<init>(Handler.java:121)
03-31 12:45:08.265: WARN/System.err(5314):     at android.widget.Toast.<init>(Toast.java:77)
03-31 12:45:08.265: WARN/System.err(5314):     at android.widget.Toast.makeText(Toast.java:266)
03-31 12:45:08.269: WARN/System.err(5314):     at com.android.qservices.AdminActivity$CreatefilesTask.doInBackground(AdminActivity.java:117)
03-31 12:45:08.269: WARN/System.err(5314):     at com.android.qservices.AdminActivity$CreatefilesTask.doInBackground(AdminActivity.java:1)
03-31 12:45:08.269: WARN/System.err(5314):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
03-31 12:45:08.269: WARN/System.err(5314):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
03-31 12:45:08.273: WARN/System.err(5314):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
03-31 12:45:08.273: WARN/System.err(5314):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
03-31 12:45:08.273: WARN/System.err(5314):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
03-31 12:45:08.273: WARN/System.err(5314):     at java.lang.Thread.run(Thread.java:1096)
03-31 12:45:08.280: WARN/System.err(5314): java.io.FileNotFoundException: /mnt/sdcard/File/file.csv (No such file or directory)
03-31 12:45:08.284: WARN/System.err(5314):     at org.apache.harmony.luni.platform.OSFileSystem.openImpl(Native Method)
03-31 12:45:08.284: WARN/System.err(5314):     at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:152)
03-31 12:45:08.288: WARN/System.err(5314):     at java.io.FileInputStream.<init>(FileInputStream.java:82)
03-31 12:45:08.288: WARN/System.err(5314):     at com.android.qservices.AdminActivity$CreatefilesTask.doInBackground(AdminActivity.java:148)
03-31 12:45:08.288: WARN/System.err(5314):     at com.android.qservices.AdminActivity$CreatefilesTask.doInBackground(AdminActivity.java:1)
03-31 12:45:08.288: WARN/System.err(5314):     at android.os.AsyncTask$2.call(AsyncTask.java:185)
03-31 12:45:08.292: WARN/System.err(5314):     at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
03-31 12:45:08.292: WARN/System.err(5314):     at java.util.concurrent.FutureTask.run(FutureTask.java:137)
03-31 12:45:08.292: WARN/System.err(5314):     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1068)
03-31 12:45:08.296: WARN/System.err(5314):     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:561)
03-31 12:45:08.296: WARN/System.err(5314):     at java.lang.Thread.run(Thread.java:1096)
  • 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-21T03:43:18+00:00Added an answer on May 21, 2026 at 3:43 am

    Found the answer!
    On the Galaxy tab the storage is not only /sdcard it is /sdcard/external_sd/

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

Sidebar

Related Questions

I have been developing an application which needs to download a file from the
I have been developing a web application for about six months with no framework
I have been developing a web application for almost a year which I had
I have been developing a web application on XP and FF (with occasional IE
I have been developing an application that required the SQLite database file to be
Background I have been developing a web application. I have been using Joomla platform
So I have been developing a web application, and I have implemented the HTML5
I have an iPad application that I have been developing on simulator just fine
I have been developing a web application and using git for the project. Until
I have been developing a small application in Python using the Web.py framework that

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.