Apache Felix: HelloAndroid

21 Jan

Apache Felix is a cool OSGi implementation, and has been widely used in Java applications. To use Felix in Android applications, embedding Felix into Android can help you harness the component based development with ease.

Here is how to achieve this.

  • Create an Android Project in Eclipse, with an empty activity called MainActivity

image   image

  • In MainActivity.Java, add code launchFelix(); in the onCreate() function


Add function body for launchFelix() function


Here a LogEx is a function which not only shows the log in Eclipse, but also display info in a TextView:


To run this Android app, remember to add Felix.jar in the project:
Copy felix.jar from felix\bin –> \libs folder of the project.

Run the Android App, success!



Leave a comment

Posted by on January 21, 2014 in Android, Programming


Tags: , , , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: