Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move files from android to linux

I'm writing an app for android, in this app I want to send a file to a Raspberry Pi device. I did some research and I realized I need to use scp command to do this.

scp path/to/file [email protected]:/path/to/destination
//I dont know where to put this code 

Now I want to now that how can I run this linux command in my Android app? Is there a library for this? How can I run the scp and move my file from android to linux.

I'm using unity for android development. My android and linux device(Raspberry Pi) are connected to same wi-fi. Also I'm using Raspbian for the Pi device.

like image 417
Amirition Avatar asked Jan 27 '26 10:01

Amirition


1 Answers

scp is a linux program and it may be absent on your android device (and usually android devices don't have scp installed).

I suggest to use on of next ways:

1) setup web server on Raspberry and send files via http
2) setup ftp server on Raspberry and send files via ftp
3) setup smb share on Raspberry, mount smb share on android and send files via smb

like image 81
Andrew Avatar answered Jan 30 '26 01:01

Andrew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!