nuxeo integration with Android?

Hi All,

   I am new to nuxeo platform. I want to use nuexo cloud for Android Application.Can you please guide me from where i can start? Any nuxeo Sdk require for Android. if  we are integrating nuxeo with android then how to integrate it , in order the get the nuxeo cloud data.

Thanks in Advance.

0 votes

2 answers

1792 views

ANSWER



The Eclipse import of a Maven Android project is sometimes a little bit tricky. How do you import it exactly?

When do you get that error? I just checked and all projects are properly imported in my Eclipse using mvn eclipse:clean eclipse:eclipse -DoutputDirectory=bin/main && ~/workspace/nuxeo/fixeclipse.

That error seems to happen while using an application or running a test.

0 votes



Hi ,

 Thanks for reply. i imported the project on Juno eclipse.

When i clicked on the list view of items in My Document then its throwing that error.

Regards.

05/14/2013

Should i use maven-eclipse-plugin to run the android nuxeo demo instead of Juno eclipse?

Regards.

05/14/2013

Hi Carsique,

         I think you have updated some files of nuxeo-android . i download the project and run on Juno eclipse, its is giving ::   Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define    Lorg/nuxeo/ecm/automation/client/jaxrs/AutomationClient;

if i am going on a wrong way then please correct me on this .

Regards.

05/14/2013

Hi,

I don't know what is the Eclipse "list view of items in My Document". It seems you have some Eclipse plugins and automatic build options I don't have installed or configured.

For running the demo, both options are valid. You can run it within an emulator managed by ADT from command line, a Maven plugin or an Eclipse plugin. Or you can run it on a real device. Or even in a VM (we published a blog about that solution).

Yes, next to your message, I tested a new import and updated the files. Note it is a bad practice to include IDE files (.project, .classpath, …) in the source code and I should have removed them rather than update; but given how hard it can be to properly import and configure Android projects and "libraries" into Eclipse, I though it could help…
Usually, at Nuxeo, when an IDE file is not easily generated, we commit a copy of it named .project.ok, .classpath.ok, … So, you can choose to reuse them (with an automatic copy) or not.

Also, we are considering as a good practice to make Eclipse and Maven use different build directories ("target" versus "bin" for instance). That is not the default behavior of maven-eclipse-plugin. See fixeclipse or fixeclipse.py.

About your issue, it sounds like such a build directories concurrency issue or a cache issue. You can delete the Android generated directories (especially the "gen" directory) to force Eclipse/ADT/Dalvik regenerate them properly.

"Multiple dex files define Lorg/nuxeo/ecm/automation/client/jaxrs/AutomationClient" => you can recursively grep your project in order to find all those concurrent compiled files for AutomationClient. That could help to understand your issue.

Finally, ADT and DEX are poorly forward and backward compliant from a version to another: sometimes, a simple upgrade of ADT is enough to fix (or break!) the build from Eclipse or Maven.

05/14/2013

Hi,

still its giving me the same issue :(. i am using the

  1. nuxeo-automation-thin-client-5.4.1-SNAPSHOT.jar
  2. com.smartnsoft.droid4me.jar

After doing this its giving me exception on classes :

DocumentViewActivity
NoteViewActivity
PictureViewActivity

OnMethod:--
  documentBtn.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(PictureViewActivity.this,
                        DocumentViewActivity.class).putExtra(
                        BaseDocumentViewActivity.DOCUMENT, document.toString()));
            }
        });

Error: - The Method putExtra(String, Boolean); is not applicable for arguments(String , Document); so i used document.toString(); After compilation it was throwing the above ClassCastException.

to run the project. After Login–>Nuxeo Android Home Page –>My Document–> List of Files —–> Onclick –> Dialog Popup –> Problem its calling the class NuxeoAndroidApplication and after that Method SmartApplication.I18N getI18N()and shows–>"You have unveiled a bug in the application, and we are sorry for

that! Would you be kind enough to report that problem to us? Thank you." 

I just wanna ask that am i missing some other jar file for Picture View or any other file View. please guide me on this.

Regards.

05/15/2013


0 votes



Hi,

Thanks for reply , yeah i looked in that but on importing it to eclipse its giving some intent error for document. and giving the following log :

05-13 15:13:38.320: E/SmartApplication(12334): An unexpected error occured!
05-13 15:13:38.320: E/SmartApplication(12334): java.lang.ClassCastException: java.lang.String cannot be cast to org.nuxeo.ecm.automation.client.jaxrs.model.Document
05-13 15:13:38.320: E/SmartApplication(12334):  at org.nuxeo.android.simpleclient.docviews.BaseDocumentViewActivity.fetchDocument(BaseDocumentViewActivity.java:84)
05-13 15:13:38.320: E/SmartApplication(12334):  at org.nuxeo.android.simpleclient.docviews.PictureViewActivity.onRetrieveBusinessObjects(PictureViewActivity.java:125)
05-13 15:13:38.320: E/SmartApplication(12334):  at com.smartnsoft.droid4me.app.SmartActivity.onRetrieveBusinessObjectsInternal(SmartActivity.java:329)
05-13 15:13:38.320: E/SmartApplication(12334):  at com.smartnsoft.droid4me.app.SmartActivity.access$000(SmartActivity.java:51)
05-13 15:13:38.320: E/SmartApplication(12334):  at com.smartnsoft.droid4me.app.SmartActivity$3$1.run(SmartActivity.java:303)
05-13 15:13:38.320: E/SmartApplication(12334):  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
05-13 15:13:38.320: E/SmartApplication(12334):  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
05-13 15:13:38.320: E/SmartApplication(12334):  at java.lang.Thread.run(Thread.java:856)

If you have any idea about that then please guide me on that .

Regards.

05/13/2013