|
Page Edited :
FELIX :
Apache Felix and Google Android
Apache Felix and Google Android has been edited by Richard S. Hall (Mar 09, 2008). Content:Apache Felix and Google AndroidThe purpose of this document is to explain how to use Apache Felix on Google's new mobile phone platform - Android. Dalvik VMGoogle Android SDK allows developers to write Java code in order to create Android applications. Instead of a regular Java Virtual Machine that executes this code, a special-purpose virtual machine named Dalvik is being used in order to comply with mobile platform requirements. Dalvik does not use Java bytecode format, but, a tool named dx, included in the Android SDK, transforms the Java class files of Java classes compiled by a regular Java compiler into another class file format (the .dex format) (the conversion is not done at runtime). Preparing bundlesAlthough latest version of Felix, 1.0.3, has now built in support for Android, there are still some things needed to be done in order to successfully make use of it ( you will need to install Android SDK and you should have <android_SDK_HOME>/tools added to system PATH variable). The zip file available for download has been created in the same manner. Step 1: Each JAR file you use, either as a Felix library or as a bundle, should contain its DEX equivalent. This means that you must first create a DEX file for your JAR: dx --dex --output=classes.dex JAR_file.jar Then you must add the DEX file to your JAR file:
start file:bundle/EnglishDictionary.jar start file:bundle/FrenchDictionary.jar start file:bundle/SpellChecker.jar Embedding FelixApache Felix can also be integrated with an Android application. To achieve this, you need to embed Felix into onCreate() method of your Activity class (see Android docs for more details on how to use an Activity) and process your bundles as shown above. DownloadThe project zip file osgi-android.zip |
Unsubscribe or edit your notifications preferences
