can i use your plugin on another project?

This is the forum to discuss problems or features for the Android USB Stick Plugin for Total Commander.

can i use your plugin on another project?

Postby sammycristi » Fri Feb 07, 2014 4:38 pm

Is it possible to use your plugin on another Android project? My email address is cristi.samoila@gmail.com.
sammycristi
 
Posts: 1
Joined: Fri Feb 07, 2014 4:36 pm

Re: can i use your plugin on another project?

Postby feri » Fri Feb 07, 2014 7:07 pm

Hello Christi,

please take a look at StickyCloud (https://play.google.com/store/apps/details?id=de.hechler.stickycloud)
It integrates as a provider for the Storage Access Framework (SAF) introduced with Android 4.4 KitKat.
So if this sufficces for your app you are free to use this. SAF supports reading and writing files.

So you might use the Content-Provider URI to access the files on any attached USB-Stick.
As rights you need the MANAGE_DOCUMENTS permission.

The biggest drawback of SAF is, that directory browsing is only possible for the user using the new file picker provided from the OS.
I have asked for an enhancement of the SAF, but I am the only one who seems to be interested in this:
http://code.google.com/p/android/issues/detail?id=65139

As a workaround we can define a simple interface which allows you to browse the content of a folder,
for example some speciale URI which returns the folder content in XML.

In fact, there already is a possibility to browse the folders.
If you atach an USB-Stick and start StickyCloud and click on the "Browse" button a web browser is started showing the root directory.
You can click on the subfolders to see their contents. But this HTML is thought to be human readable.

It is worth thinking about a workaround for the missing queryRoots() / queryChildDocuments() functions.

Best regards,

feri
feri
 
Posts: 94
Joined: Sun Mar 17, 2013 10:49 am

Re: can i use your plugin on another project?

Postby feri » Tue Feb 11, 2014 7:27 pm

If you have StickyCloud installed (requires KitKat) you can access the attached storage programmatically using the ContentProvider interface.
The Interface allows reading from and writing to attached USB Sticks.

There exists a reference implementation: https://sourceforge.net/projects/stickycloudclient/
feri
 
Posts: 94
Joined: Sun Mar 17, 2013 10:49 am

Re: can i use your plugin on another project?

Postby feri » Sun Feb 23, 2014 8:30 am

The StickyCloudClient now supports the File class.
For accessing (read/write) files the Class StickyCloudFile can be used the same as the File-class.
There also exist a StickyCloudFileInputStream and StickyCloudFileOutputStream.

So to adapt code which already uses File implementation the effort should be minimal.

Another interesting issue with KitKat is discussed in this thread:
https://groups.google.com/forum/#!topic ... 4VUiIgwUjY

So it might be of interest for devices which support mounting attached usb devices to use this API, not to have the restrictions introduces with Android 4.4.2.
feri
 
Posts: 94
Joined: Sun Mar 17, 2013 10:49 am


Return to USB Stick Plugin for Total Commander (Android)

Who is online

Users browsing this forum: No registered users and 2 guests

cron