selendroid/selendroid — pull request #569 by ainsej (2014-09-04 08:42:08+00:00)
Title: RFC: Added dynamic extension loading feature

Here's dynamic extension loading.
This allows a dex to be passed via the new capability "selendroidExtensions", this dex is pushed to the device using ADB.

Extensions currently have two methods of usage:
* Bootstrap loading
* A new capability bootstrapClassNames has been added, this allows the driver to specify classes from the loaded extension to be run before starting selendroid and the main activity
* Dynamically loaded extensions
* A new endpoint has been added which redirects extension calls to BaseHandlers that are dynamically loaded from the DEX file.

There's an example of a demo extension handler in this repository (https://github.com/ainsej/selendroid-extension)

I've also added a new test in the selendroid-test-app (ExtensionLoadTest) which shows how extensions can be called. I would have preferred to add a full unit test to selendroid-server, but the android DEX Loader is stubbed out in the SDK so it makes the test useless for actually verifying that the extension was loaded.

Comments are welcome!