You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by Cristina Tabacaru <cr...@sip-communicator.org> on 2008/04/15 15:58:49 UTC

launching Android GUI as a felix bundle

Hi all,

I've got an issue on *launching GUI bundles on Android* I would like to
consult you about.

1. I built an Android apk with an Activity - *DictionaryActivity* which
launches Felix and creates a *HostActivator* which starts some bundles
(saying EnglishDictionary, FrenchDictionary and SpellChecker from the
Android-Felix example)


   - *EnglishDictionary* - supplies a Dictionary service implementation
   with the following collection of words "welcome", "to", "the", "osgi",
   "tutorial"
   - *FrenchDictionary* - supplies a Dictionary service implementation
   with the following collection of words "bienvenue", "au", "tutoriel", "osgi"
   - *SpellChecker* - supplies a spell checker that retrieves the first
   Dictionary implementation it finds and checks if the word you've entered is
   in the dictionary or not.


2. Normally, I would create my user interface in *DictionaryActivity *(an
edit box for word input and a button that checks the word in the
dictionaries - english or french), recuperate the SpellChecker service
through the HostActivator and do my word-checking.

But I would like to be able to have my user interface in a *.jar* of
Activities and launch it as a bundle - saying *ActivityBundle.jar* in the
OSGI framework.
For my small example this wouldn't be necessary but for SIP Communicator to
work on Android that would be of a great importance.

As an Activity is launched through a *android.content.Context* class, I
thought I could pass that Context from  *DictionaryActivity *to the
HostActivator and in some way to my *ActivityBundle.jar *and thus launch the
user interface. Of course *ActivityBundle.jar *should contain all
directories and files which are specific to an Android application
(resources and so on).

I don't know if this is a clean solution or even a solution ... so I was
wondering if anyone thinks there are better or any other ways to do it or
should I carry this up ?

Thanks,
Cristina

Re: launching Android GUI as a felix bundle

Posted by Marcel Offermans <ma...@luminis.nl>.
Hi Cristina,

On Apr 16, 2008, at 20:01 , Cristina Tabacaru wrote:

> My research hasn't been so successful thus far so I'm looking  
> forward for
> your example before I jump into another research session.

As we were not sure about the legal status of code with dependencies  
on Google Android, we committed the example code to the luminis open  
source server and I quickly whipped up some documentation to go with  
the slides (which I also uploaded there, because I don't think the NL- 
JUG has them available already).

Anyway, follow this link for more information about what we did and if  
you have any questions, feel free to ask them here.

https://opensource.luminis.net/confluence/display/SITE/Creating+a+dynamic+OSGi+application+on+Android

By the way, as soon as this is cleaned up a bit, I would like to  
integrate this into the Apache Felix documentation.

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: launching Android GUI as a felix bundle

Posted by Cristina Tabacaru <cr...@sip-communicator.org>.
Hi Marcel,

My research hasn't been so successful thus far so I'm looking forward for
your example before I jump into another research session.

cheers,
Cristina

Re: launching Android GUI as a felix bundle

Posted by Cristina Tabacaru <cr...@sip-communicator.org>.
Hello Marcel,

Thank you for the reply and for the good news - I'll chew over these ideas
and continue my research...
Good luck with your speech tomorrow,

Cheers,
Cristina

On Tue, Apr 15, 2008 at 4:43 PM, Marcel Offermans <
marcel.offermans@luminis.nl> wrote:

> Hello Cristina,
>
> On Apr 15, 2008, at 15:58 , Cristina Tabacaru wrote:
>
>  As an Activity is launched through a *android.content.Context* class, I
> > thought I could pass that Context from  *DictionaryActivity *to the
> > HostActivator and in some way to my *ActivityBundle.jar *and thus launch
> > the
> > user interface. Of course *ActivityBundle.jar *should contain all
> > directories and files which are specific to an Android application
> > (resources and so on).
> >
> > I don't know if this is a clean solution or even a solution ... so I was
> > wondering if anyone thinks there are better or any other ways to do it
> > or
> > should I carry this up ?
> >
>
> I'm currently busy with my final preparation for a talk I will be giving
> tomorrow at the J-Spring 2008, an event organised by the NL-JUG (dutch Java
> user group). I can give you an answer to your question tomorrow evening, as
> well as example code that is based on the paint program mentioned on the
> Felix website, which solves a problem similar to the one you're describing.
>
> Greetings, Marcel
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: launching Android GUI as a felix bundle

Posted by Marcel Offermans <ma...@luminis.nl>.
Hello Cristina,

On Apr 15, 2008, at 15:58 , Cristina Tabacaru wrote:

> As an Activity is launched through a *android.content.Context*  
> class, I
> thought I could pass that Context from  *DictionaryActivity *to the
> HostActivator and in some way to my *ActivityBundle.jar *and thus  
> launch the
> user interface. Of course *ActivityBundle.jar *should contain all
> directories and files which are specific to an Android application
> (resources and so on).
>
> I don't know if this is a clean solution or even a solution ... so I  
> was
> wondering if anyone thinks there are better or any other ways to do  
> it or
> should I carry this up ?

I'm currently busy with my final preparation for a talk I will be  
giving tomorrow at the J-Spring 2008, an event organised by the NL-JUG  
(dutch Java user group). I can give you an answer to your question  
tomorrow evening, as well as example code that is based on the paint  
program mentioned on the Felix website, which solves a problem similar  
to the one you're describing.

Greetings, Marcel




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org