Amirition
Amirition

Reputation: 326

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.

Upvotes: 3

Views: 3375

Answers (1)

Andrew
Andrew

Reputation: 1413

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

Upvotes: 4

Related Questions