How to create an android plugin with views, actions and objects

So ... I am trying to create a plugin for one of my applications. This plugin will require several types, images, activity and an analyzer for CharSequences ... Ideally, this plugin will be downloaded from the Android Market.

I understand how to create a library, but this should be included in the application.

I understand how to create an application as a service and just call it using intentions, but I need direct access to objects and code, which cannot be legible or serializable.

What I watched is the eyeless TTS . With their implementation, the developer includes a small TTS_library_stub.jar file in his application, which looks like it defines many necessary classes / objects.

So my question is: how do I come up with something like this and create this "stub" .jar file that will be included in my application? I tried to work out the TTS code, but this is a massive code base and it is hard for me to find what I am looking for.

Any help would be greatly appreciated :)

+5
source share
3 answers

The service and application must have the same sharedUserId in the manifest and be signed with the same key. Then the application and the service can share assemblers, class loaders, and even work on the same thread. I have never included part of the GUI in the service, so maybe this is a limitation ... not sure.

, . OpenIntents. , , . , .

, , , .

+2

, Android , . ( !). , ( ) (aidl) ( ) , , , .

0

If you build an application for an OSGi environment, such as apache felix , it may be possible to load libraries at runtime.
In their presentation, they described how the whole concept works. Since only the APK can be used on the Android market, you will need to write your own “update mechanism” that downloads your OSGi packages (your plugins) and deploys them to felix.

0
source

All Articles