mixare/mixare — pull request #9 by abduegal (2012-03-21 17:32:19+00:00)
Title: Plugin structure for mixare

I have added plugin functionalities to mixare. The plugins can change the behaviour and features of the mixare application. The previous functionalities are not changed if the user does not install any plugins.

I have created 2 working plugins for this pull request.
The First plugin is a marker plugin which shows a custom image marker on the augmented reality browser when installed.
The Second plugin is a barcode plugin, which starts a barcode on startup, when the user scans a datasource with the barcode, that datasource will be loaded instead of the default ones.

The connection between the plugin and the core is done with the AIDL interface of Android.

For the marker plugin I created a Marker interface (Marker.java) and I renamed the old marker to LocalMarker. I have also created a RemoteMarker (which is in the core and connects to the plugin). The RemoteMarker transfers all method request to the marker for the plugin (PluginMarker). All markers in the plugin must override from the PluginMarker. All markers in the core are overriding from the core marker. One of the limitations of working with AIDL's is that not all objects can be send between applications because of the sandboxing in android. To overcome this limitation I decided to draw the markers on the core side.(marker.draw package in the library).

For the Barcode plugin I created a Activity and a Service. The core application contacts the service and asks which activities exist in the service, The core then loads the activity and waits for a result. The core will then use that result in the application.

The user is free to install any plugin he wants, and the application scans for installed plugins. Currently I have added 2 plugin categories: marker plugins (custom markers) and bootstrap plugins (plugins loaded on startup).
I have also created plugin types: Services and Activities. Services are not directly visible to the user, I.E. a marker plugin. And a Activity plugin is an external Activity that will be loaded by mixare I.E. The bootstrap plugins.

I have also created a mixare library (mixarelib). That is a library which contains shared classed between the plugin and the core mixare (main application). I did this so that the code can be reused by both sides.

There is also a mixare splashscreen allong with this pull request (can be found in MainActivity.java)

The plugins and the mixarelib can be found in the plugins folder. In order to start the application in eclipse you have to open both the mixare application and the mixare library, because of the dependencies.

I am aware of the fact that there are allot of things that can be improved, but I would like to hear your opinion about this.

I am eagerly awaiting your response