felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jackson, Bruce" <bru...@qualcomm.com>
Subject Re: Felix on Android
Date Fri, 12 Feb 2010 15:13:41 GMT
Yes, you can.

In the code I sent you, you'll see that you can get a handle to the
BundleContext for the framework itself. From this you can then call:

context.installBundle(String location);

to install your own bundles.


On 12/02/2010 15:07, "pablomj" <pablomj85@hotmail.es> wrote:

> 
> Oh, thanks Bruce and Karl for your comments.
> 
> I did something wrong, because I can't instanciate an "Felix" object. So, I
> am going to review all steps...
> 
> Although I don't see running this yet, I will can start and stop bundles
> from my Android application? I excited to view this!
> 
> Regards,
> Pablo.
> 
> 
> Karl Pauls wrote:
>> 
>> Why would you need 1.5 to be able to dex the bundle (the framework
>> itself is build for 1.3 btw.)?
>> 
>> regards,
>> 
>> Karl
>> 
>> On Fri, Feb 12, 2010 at 1:15 PM, Jackson, Bruce <brucej@qualcomm.com>
>> wrote:
>>> Hi Pablo
>>> 
>>> See the attached code. The biggest problem I've encountered is that the
>>> Felix distribution is a huge pain to build under JDK 1.5, and therefore
>>> to
>>> be able to use some of the bundles (for example the http service) that
>>> are
>>> part of the distribution. Its not a simple job of just changing a couple
>>> of
>>> entries in POM files: some components download pre-built JAR files from
>>> the
>>> web and explode these, thereby having classes built under 1.4 which will
>>> not
>>> work when you dexify the bundles.
>>> 
>>> This is something that would be great to see some work done on by the
>>> Felix
>>> community, because while its true that the basic Felix core does and will
>>> support Android, most of the add-on bundles wont.
>>> 
>>> For my part, the ideal solution would be to see the whole framework be
>>> based
>>> on JDK 1.5 and not 1.4.
>>> 
>>> Thanks
>>> 
>>> Bruce
>>> 
>>> 
>>> On 12/02/2010 11:32, "pablomj" <pablomj85@hotmail.es> wrote:
>>> 
>>>> 
>>>> Hi Bruce, I am trying the same, but I don't have the solution yet.
>>>> Do you have some advance?
>>>> Salutations, thanks.
>>>> Pablo.
>>>> 
>>>> 
>>>> Jackson, Bruce wrote:
>>>>> 
>>>>> The Felix site has a useful section on getting things going on Android
>>>>> (
>>>>> http://felix.apache.org/site/apache-felix-and-google-android.html) but
>>>>> isn't
>>>>> so clear about embedding the framework into an Android app"
>>>>> 
>>>>> "Apache 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."
>>>>> 
>>>>> Has anyone got an example of how you do this? I understand how to write
>>>>> the
>>>>> Android app, and I get the point being made here. What I need to
>>>>> understand
>>>>> is:
>>>>> 
>>>>> 1. How do you launch the Felix framework. What do I need to
>>>>> instantiate?
>>>>> 2. Where does the framework get its boot configuration (i.e. what
>>>>> bundles
>>>>> to
>>>>> load, run levels, environment variables, etc) from in this case?
>>>>> 
>>>>> 
>>>>> 
>>> 
>>> 
>> 
>> 
>> 
>> -- 
>> Karl Pauls
>> karlpauls@gmail.com
>> 
>> 


Mime
View raw message