Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2012
    Location
    Queensland, Australia
    Posts
    12
    Rep Power
    0

    Default Windows File Manager Unable to See Files on Android Device

    Hi,

    We are currently building an application for the android platform that collects field data.

    Part of the functionality entails exporting the data to a csv file.

    The export functionality of the application works fine.

    The csv created is visible with android filemanagers like "Astro File Manager", "ES File manager" and "Root Explorer".

    When the the android device is connected to a local pc with a usb cable windows file manager is unable to see the created csv file.

    Has anybody else come accross this situation and what was your workaround

    Kind Regards

  2. #2
    achill is offline Member
    Join Date
    Jan 2011
    Location
    Bielefeld, Germany
    Posts
    10
    Rep Power
    0

    Default Re: Windows File Manager Unable to See Files on Android Device

    Hi,

    you have to locate your csv file to the sdcard of your device:

    File newcsvfile = new File(Environment.getExternalStorageDirectory() + File.pathSeparator + csvFilename);
    // your code to write data
    When you connect your device to your local pc, you will find your file in the root directory of the device.

  3. #3
    Join Date
    Feb 2012
    Location
    Queensland, Australia
    Posts
    12
    Rep Power
    0

    Default Re: Windows File Manager Unable to See Files on Android Device

    This code snippet appears not to work when I use it the path it generates is as follows

    /mnt/sdcard:Powdery Mildew Rows 1 2011-12 Data.csv

    The File.pathSeparator function appears to output a colon as seen above. Is this correct?

    To my knowledge this is not a valid path separator.

    Regards

  4. #4
    achill is offline Member
    Join Date
    Jan 2011
    Location
    Bielefeld, Germany
    Posts
    10
    Rep Power
    0

    Default Re: Windows File Manager Unable to See Files on Android Device

    Oh, your are right - I'm sorry, my fault.
    Just try

    File newcsvfile = new File(Environment.getExternalStorageDirectory() + "/" + csvFilename);
    It's not portable, but it should work. I thought, File.pathSeparator gets the path separator or delimiter for the actual System, e.g. "/" for Unix based OS and "\" for Windows.

    Quote Originally Posted by Glorfindel Arnatuile View Post
    This code snippet appears not to work when I use it the path it generates is as follows

    /mnt/sdcard:Powdery Mildew Rows 1 2011-12 Data.csv

    The File.pathSeparator function appears to output a colon as seen above. Is this correct?

    To my knowledge this is not a valid path separator.

    Regards

Similar Threads

  1. Replies: 7
    Last Post: 03-05-2012, 06:26 PM
  2. Replies: 1
    Last Post: 12-24-2011, 05:41 AM
  3. Replies: 0
    Last Post: 11-21-2011, 07:34 PM
  4. Replies: 3
    Last Post: 08-10-2011, 09:05 AM
  5. Replies: 0
    Last Post: 02-25-2011, 12:46 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •