EN

Duo: Holo File Manager w/ Root

UNCOPT LLC

We provide a public development kit to enable anybody to create their own extension. Installation of those extensions is done from the free SDK plugin. Please keep in mind that you should only install extensions from trusted sources, as they could contain malicious code.



SDK Plugin
DOWNLOAD
y
The SDK plugin is used to manage SDK extensions. From its settings, you can see the list of extensions that you have already loaded, and you can also load another by browsing for the extension jar file. You can activate / deactivate / uninstall extensions individually. Each extension can provide its own set of settings. You can access those by simply pressing on the extension entry in the list. The SDK is versioned and while we try to avoid incompatible changes, every now and then, a new feature requires a version upgrade. After updating the main application, plugins that are not compatible and in need of an update are automatically uninstalled.

Dependencies
DuoFM is developed in Kotlin, a JVM language developed by JetBrains, the creators of the IntelliJ Idea IDE from which Android Studio is derived. You do not have to use Kotlin to develop your extension, you can do it using Java or any other JVM language. However if you do use Kotlin, you should use version M7 as its runtime and stdlib are already provided by the SDK plugin and you won't have to include those in your extension jar file. The SDK plugin provides a library to access image and video metadata (metadata-extractor 2.6.4 and xmpcore) and of course a library for the DuoFM public extension API. You can download the jars for those libraries and add them to your build classpath (if you use maven, you can add them to your local repository, and then use them as dependencies with the "provided" scope): metadata-extractor jar duofm-extension-api jar
Examples
We've prepared two sample extensions. The first is called Timezones.It is written in kotlin.
It's a very simple extension that displays a list of timezone names. Pressing on a timezone brings up a short message (Toast) with the current time in that timezone. The goal of this example is to show how to create and display simple items, and how to override the default action for a press.

The second one is called Vault. It is written in Java.
It's a more complete example. It uses a reserved directory on the external storage to store its content. This content is stored in an encrypted form, and an sqlite database is used as an index for the files and folders in the vault.
This example illustrates how to implement all the file operations, and how to provide the adequate representations for the files, in both list and grid views with thumbnails.

Convensions
- Package nameThe package name for the extension should start with "com.uncopt.android.filebrowser.plugins". The jar file for the extension should follow the following convension:
    package.name-optional.version.number.jar
"package-name" should be the package name of the "INSTANCE" class with the "init()" method, minus the "com.uncopt.android.filebrowser.plugins." prefix. As an example, the timezones sample extension uses the package name: com.uncopt.android.filebrowser.sdk.sample.timezones. Its jar file name is sdk.sample.timezones-1.1-SNAPSHOT.jar.
If the jar file name doesn't follow this convension, it will not load properly from the SDK plugin.

- Item URIs Each item should have a unique URI identifying it. URIs should be of the form:
scheme://authority/path?optional_query
The scheme and authority should be used to identify if an item belongs to the extension or not. The authority can be empty. As an example, the vault sample extension uses "vault" for the scheme and an empty authority. Its item URIs look like: vault:///dir1/dir2/file1 (scheme: vault, authority: empty, path: /dir1/dir2/file1).
The path portion of the URI should be encoded properly. For directories (items you can browse into), it should always end with a trailing slash.
Only the last path segment can include a query. Queries should be encoded properly as well. For directories, the query should be before the trailing slash.
Example:
file:///mnt/sdcard?softlink=%2Fsdcard%2F/
scheme: file
authority: empty
path: /mnt/sdcard/
query: softlink = /sdcard/