[android-developers] Re: Copy a file from a Desktop PC

2011-09-08 Thread franky.b
Ok, bad luck :(

Does the Android device at least appear as External Storage Device
in the file explorer when it is connected via USB?
So it would be possible to figure out the drive letter of that storage
volume and to do a common file copy in the desktop application?

Regards,
Frank

On Sep 7, 4:48 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Sep 7, 2011 at 10:43 AM, franky.b frank.bit...@gmail.com wrote:
  I'm writing an application that must be able to copy a file between an
  Android device and a Desktop PC and vice versa. The best way to do
  this would be to connect the Android device to the Desktop PC via an
  USB cable.

  Is there any API that can be used to copy files to and from the device
  when an USB connection is etablished?

 No, sorry.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Copy a file from a Desktop PC

2011-09-08 Thread Mark Murphy
On Thu, Sep 8, 2011 at 4:01 AM, franky.b frank.bit...@gmail.com wrote:
 Does the Android device at least appear as External Storage Device
 in the file explorer when it is connected via USB?

If the user elects to mount it, yes. With Honeycomb (and, presumably,
future releases of Android), this will also require that the host OS
support MTP -- Windows does, OS X and Linux need third-party apps.

 So it would be possible to figure out the drive letter of that storage
 volume and to do a common file copy in the desktop application?

I don't know how you would determine the drive letter, since it could
be just about anything. And, of course, the notion of a drive letter
is a Windows construct.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in Oslo: http://bit.ly/fjBo24

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Copy a file from a Desktop PC

2011-09-08 Thread franky.b
Okay, thanks a lot for your response.

I have to deal with Windows only; we have a legacy application running
on Windows that must sync some files to the Android device; it's a
totally old-school, fat desktop application and actually I don't like
it, but replacing it by a web based application is not possible right
now ;-)

In order to figure out the drive letter some nasty tricks come into my
mind... like writing a marker file to a specified folder on the device
when starting the mobile app for the first time. The desktop
application then can search all drives for that file.

Cheers,
Frank


On 8 Sep., 14:07, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, Sep 8, 2011 at 4:01 AM, franky.b frank.bit...@gmail.com wrote:
  Does the Android device at least appear as External Storage Device
  in the file explorer when it is connected via USB?

 If the user elects to mount it, yes. With Honeycomb (and, presumably,
 future releases of Android), this will also require that the host OS
 support MTP -- Windows does, OS X and Linux need third-party apps.

  So it would be possible to figure out the drive letter of that storage
  volume and to do a common file copy in the desktop application?

 I don't know how you would determine the drive letter, since it could
 be just about anything. And, of course, the notion of a drive letter
 is a Windows construct.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training in Oslo:http://bit.ly/fjBo24

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Copy a file from a Desktop PC

2011-09-08 Thread Mark Murphy
On Thu, Sep 8, 2011 at 12:43 PM, franky.b frank.bit...@gmail.com wrote:
 In order to figure out the drive letter some nasty tricks come into my
 mind... like writing a marker file to a specified folder on the device
 when starting the mobile app for the first time. The desktop
 application then can search all drives for that file.

What if the user deletes the file?

Syncing in Android is usually to/from the cloud, which is why you
won't find much for USB-based sync readily available.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en