Load a new xlet from arunning one

Hi,Does anybody knows how can i load anew class (an xlet)from arunning one.I have an xlet, i catch apress on the remote control, bythe KeyEvent, when that happens i want to load a newjava xlet class, how can i do that?
[267 byte] By [knikita] at [2007-9-26 5:54:41]
# 1

Hi,

if you are using MHP, you can do this via the application listing and launching API in org.dvb.application:

get an instance of AppsDatabase, retrieve available applications using getAppAttributes (use a CurrentServiceFilter as AppsDatabaseFilter) and find your application. Then, get the Application ID via getAppID and from the AppsDatabase, get the ApplicationProxy using getAppProxy(AppID). Using the AppProxy, you can start your application. Note that your initial application will not automatically be destroyed but hover around untill you exlicitely kill it. Note also that using this API is tricky and needs a lot of dealing with states, events, and exceptions to work properly. My AppController class is some 40k in size... and for a reason.

Good luck!

Thomas

> Hi,

> Does anybody knows how can i load anew class (an

> xlet)

> from arunning one.

> I have an xlet, i catch apress on the remote control,

> by

> the KeyEvent, when that happens i want to load a new

> java xlet class, how can i do that?

JavaTikker at 2007-7-1 14:25:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2

Hi!

I can start other xlets without any Problem, but as you say my starterXlet doesn't stop clean.

I call destroyXlet when the other one is started. there I set all threads and Hscene ... null and finally I call xletContext.notifyDestroyed();

still when I try to restart my first xlet, the animation is still running and I get an access error.

are there more commands to kill my xlet?

thanks

_elBoB_ at 2007-7-1 14:25:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3

Which implementation are you using?

Cleaning up after you application can be tricky - it's easy to miss things. You will need to stop all threads yourself and unregister any event listeners, as well as destroying any Graphics objects that you 're using,disposing of any HScenes, and a few other things. Unless you've actually stopped the threads, setting references to null in your application may not be enough to kill it.

Steve.

stevem_tw at 2007-7-1 14:25:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4

thanks! I added scene.dispose()

I'm using the IRT, but don't know if I can test running more than one xlet with it, and a galaxis linuxTV STB.

I found out that my destroyXlet method was not called. i did that when the other xlet changed from paused to started. no i'm calling destroy when it changes to paused after loading and it works.

the first version would be better (shouldn't it work?). now I'm waiting for a few seconds to be able to see my loader until the new xlet is there.

_elBoB_ at 2007-7-1 14:25:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 5

still having problems with that:

when I start my 2. xlet and leave the first one running, it starts really fast and runs stable.

as soon as I pause or destroy the first xlet, I get a black scren for 20 seconds, and then the second runs as before.

it seems like destroying the first, also affects the 2. xlet which is quite strange to me.

i'm running xlets on a galaxis linuxTV.

another thing on this box is, that I can't pass arguments. the code compiles but I don't get a String Array.

Has anyone worked with LinuxTV and knows workarounds?

Thank a lot. I don't have too many ideas left :)

_elBoB_ at 2007-7-1 14:25:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 6
Hello, I want to start programming mhp xlets, and I would like to running it on a galaxis linux tv. But, I dont know how to run a xlets on it. Please could you say me how I do it?Thanks
jlcp at 2007-7-1 14:25:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...