Recent

Author Topic: Transfer file from Android to Computer  (Read 14875 times)

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Transfer file from Android to Computer
« on: July 30, 2015, 04:01:44 pm »
Hi,

I want to know what is the best way to Transfer file from my Android phone to Windows or Linux in my program with USB or WiFi.
Is there any example or open source software that do this?Out there most people talk about adb or TCP but I curios how can I transfer file like for example AirDroid.
Also Im aware of that probably this is a Windows or Linux application but this should asked where people work on Android.
« Last Edit: July 30, 2015, 04:19:40 pm by aradeonas »

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Transfer file from Android to Computer
« Reply #1 on: July 30, 2015, 04:52:10 pm »
hi aradeonas,

sorry to keep pestering you, no hurt intended.

Although your changed your initial question a little, i do think the answer still applies.

I can connect my android device with an usb cable to a OS, and it will represent itself as a storage device to the operating system.

Alternatively i've downloaded some ftp-client/server from google appstore that just act similar to your average ftp client/server. ergo i can connect using a client/server on the OS, the underlying connection does not matter anymore in that case. There's also some telnet client if that would interest you.

Now, since you want to program things yourself (at least that is what i know understand from your question), things might become a little trickier.

Are there any working internet components available for android (i really have no idea), simplest would be if sockets would be working for Android (i suspect that full packages like synapse don't work (out of the box)).

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Transfer file from Android to Computer
« Reply #2 on: July 30, 2015, 05:30:53 pm »
Not at all,Thank you.

I prefer a default OS way but if I should I will write mine and I want to know is there any one here know about this subject?

gafe

  • New Member
  • *
  • Posts: 22
Re: Transfer file from Android to Computer
« Reply #3 on: July 30, 2015, 07:33:46 pm »
I think you should do it with "adb pull" , as it works with all versions of android and i think that also works with all OS.
It works with USB and there's ways to do it over wifi. You can also supply adb binaries in your program folder.

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Transfer file from Android to Computer
« Reply #4 on: July 30, 2015, 07:50:19 pm »
adb is a debugging tools so should user make debugging active for this way?
is there any good document or implementation for this job?Android documentation for adb as I found is very small.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Transfer file from Android to Computer
« Reply #5 on: July 30, 2015, 07:58:14 pm »
Hi,

I want to know what is the best way to Transfer file from my Android phone to Windows or Linux in my program with USB or WiFi.
Is there any example or open source software that do this?Out there most people talk about adb or TCP but I curios how can I transfer file like for example AirDroid.
Also Im aware of that probably this is a Windows or Linux application but this should asked where people work on Android.
search for a samba installation for android and use the wifi search your lan for available window shares. here are first two links from a quick google search I made for the keywords "android samba"
http://www.techrepublic.com/blog/five-apps/five-free-android-apps-for-easy-smb-connection/
https://play.google.com/store/apps/details?id=lysesoft.andsmb
« Last Edit: July 30, 2015, 08:02:38 pm by taazz »
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

gafe

  • New Member
  • *
  • Posts: 22
Re: Transfer file from Android to Computer
« Reply #6 on: July 30, 2015, 08:37:42 pm »
adb is a debugging tools so should user make debugging active for this way?
is there any good document or implementation for this job?Android documentation for adb as I found is very small.

The user should enable usb debugging. All the documentation you need is in  http://developer.android.com/tools/help/adb.html  , but there are lots of examples in every android forum.
The other USB options in modern android devices (if i'm not wrong) are PTP and MTP .

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Transfer file from Android to Computer
« Reply #7 on: July 30, 2015, 09:18:22 pm »
As I read about them they dont let me to transfer file programmatic  or I should use WPD .
Also if there is way that I can get more info from device for example contacts it can be a better way.

Ways like AirDroid that used a mini server can be good so we are able to do many thing.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: Transfer file from Android to Computer
« Reply #8 on: July 30, 2015, 11:55:41 pm »
Thanks for the hint about samba taazz.

That would for sure simplify things a lot. And oooh, why have i missed that Astro can do that (as that is the default filemanager on my device).

fwiw: i use this ftp server, which is now going to be redundant pretty soon :-D

mig-31

  • Sr. Member
  • ****
  • Posts: 305
Re: Transfer file from Android to Computer
« Reply #9 on: February 26, 2016, 10:59:40 am »
Next option insteand of Samba (Samba is not native unix/linux way for sharing files) is NFS, because Android is linux there is no prolem to istall and configure NFS server on it.
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

tonabbz

  • Newbie
  • Posts: 1
Re: Transfer file from Android to Computer
« Reply #10 on: May 16, 2016, 10:55:22 am »
Quote
I think you should do it with "adb pull" to transfer android files to pc , as it works with all versions of android and i think that also works with all OS.
It seems much easier with wireless transfer app such as Airdroid.
« Last Edit: May 19, 2016, 10:53:39 am by tonabbz »

aradeonas

  • Hero Member
  • *****
  • Posts: 824
Re: Transfer file from Android to Computer
« Reply #11 on: June 22, 2016, 12:58:15 pm »
I need a programming way not a ready to use tool.

Graeme

  • Hero Member
  • *****
  • Posts: 1428
    • Graeme on the web
Re: Transfer file from Android to Computer
« Reply #12 on: November 16, 2016, 05:56:48 pm »
The most convenient way I have found is to use the free AirDroid application. It is brilliant and allows you to manage your whole phone from a desktop web browser. Drag & Drop file transfer in both directions are supported.

https://play.google.com/store/apps/details?id=com.sand.airdroid
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

lainz

  • Hero Member
  • *****
  • Posts: 4460
    • https://lainz.github.io/
Re: Transfer file from Android to Computer
« Reply #13 on: November 17, 2016, 02:04:56 pm »
I need a programming way not a ready to use tool.

People don't read, don't you think  :D

Maybe the idea is find you an open source tool (if any for android) that allows transfer data to the PC and see the sources (if any).

Edit: well I found this
https://github.com/ppareit/swiftp

Is like ES File Explorer works, you create a ftp in your phone and then you can open it in the PC to copy or add new files to the android.

You need to code the rest. Maybe you also need the sources of a file explorer instead. These usually can:
- Connect to the LAN
- Enter username and password of PC (for example your Windows username and password)
- Copy / Paste any file in android / pc to android / pc of the shared folder (Usually 'Users' folder in Windows)
« Last Edit: November 17, 2016, 02:26:34 pm by lainz »

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: Transfer file from Android to Computer
« Reply #14 on: January 17, 2017, 11:11:38 am »
This thread attracts too many spammers, so it is now locked.

 

TinyPortal © 2005-2018