I'm looking for a way to mount Samaba shares programatically.
I am aware of this question which, if it works, would allow browsing a Samba share within my app, but I want the shares to be available to other apps once mounted.
I know ES File Explorer can do this, so it must be possible to implement in code, but I'm trying to figure out how it's done. The only method I can think of is opening a Process with Runtime.getRuntime().exec(...) but then there's the issue of what commands to send. I've been playing about in a terminal emulator app and the standard mount command doesn't seem to be working. I've tried the following:
mount -t smbfs //[ipaddress] /mnt/sdcard/net/Share1
and
mount -t cifs //[ipaddress] /mnt/sdcard/net/Share1
but in both cases I'm getting the rather uninformative error message "mount: no such device"
Where could I be going wrong?