blob: afc09330b9ed70c3bf573e1dd3ce16f230d8759c [file] [log] [blame]
OpenCMIS Android Client
The OpenCMIS Android Client provides a collection of methods to access and manage CMIS Repository.
OpenCMIS Client Bindings supported
OpenCMIS Android Client supports the AtomPub Binding and the Browser Binding.
The Web Service Binding (SOAP protocol) is not supported by this library.
Android Version Supported
Previous versions of Android don't contain all dependencies required to run and use OpenCMIS Android client.
It's only since Android 2.3 (aka Gingerbread) everything works.
In other terms, Android client supports Android 2.3 and above.
OpenCMIS Android Client is a SYNCHRONOUS library !
It's highly recommended that you encapsulate all CMIS operations in background thread.
In Android it's possible to use
+ Services
+ Loaders
+ AsyncTask
+ Thread/Handler
For more information on Thread and background task : <>
Importing the Android OpenCMIS Client into your Android Project
The Android OpenCMIS Client requires SLF4J for android.
Download it from here: <>
Put the Android OpenCMIS Client Jar and SLF4J jar into your Android project libs folder.
Now you're ready to use OpenCMIS inside your project.
For more information on Project libs folder : <>
Importing the Android OpenCMIS Client with Maven
If you use Maven to build your Android Project, it's possible to add this library as Maven dependency.
Add to your pom project :
Code sample
This code sample illustrates how to display in a simple TextView a list of folder children.
public class FirstOpenCMISActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
new FirstOpenCMISAsyncTask().execute();
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(, menu);
return true;
private class FirstOpenCMISAsyncTask extends AsyncTask<Void, Void, String>
protected String doInBackground(Void... arg0) {
SessionFactory sessionFactory = SessionFactoryImpl.newInstance();
Map<String, String> parameter = new HashMap<String, String>();
parameter.put(SessionParameter.USER, "admin");
parameter.put(SessionParameter.PASSWORD, "admin");
parameter.put(SessionParameter.ATOMPUB_URL, "");
parameter.put(SessionParameter.BINDING_TYPE, BindingType.ATOMPUB.value());
Repository repository = sessionFactory.getRepositories(parameter).get(0);
parameter.put(SessionParameter.REPOSITORY_ID, repository.getId());
Session session = sessionFactory.createSession(parameter);
String listChildren = "";
Folder mediaFolder = (Folder) session.getObjectByPath("/media");
ItemIterable<CmisObject> children = mediaFolder.getChildren();
for (CmisObject o : children) {
listChildren += o.getName() + " - " + o.getType().getDisplayName() + " - " + o.getCreatedBy() + "\b\n";
return listChildren;
protected void onPostExecute(String result) {
TextView tv = (TextView) (FirstOpenCMISActivity.this).findViewById(;