Skip to main content

Android video component

3 replies [Last post]
yavji
Offline
Joined: 2008-12-21
Points: 0

hey, i successfully deployed my lwuit project to android beside one point:
i cannot understand how to deploy my video player.
in symbyan and blackberry there was Player that i putted in lwuit MediaComponent which i added to the form.
in android there is no Player, only MediaPlayer, and i do not understand how should i add it to lwuit form.
i will most appreciate if someone will post some sample "MediaPlayer to lwuit" or some other way to load rtsp video in Android on lwuil.
Tnx in advance.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
thorsten_s
Offline
Joined: 2008-08-15
Points: 0

Right now the implementation for Android does not support adding media player components to your LWUIT forms. I believe this is technically possible but I did not get to implement that. If someone has done this already, or is interested in doing that, I would appreciate it if he or she shares some code with us ;)

A quick and dirty workaround (for some use-cases) is to launch the mediaplayer via the intent system. Which basically means that you start an external player application.

yavji
Offline
Joined: 2008-12-21
Points: 0

Tnx for the response.
I have managed to create an android Activity which shows the streaming video.
i am calling it like this:

Intent i = new Intent(com.sun.lwuit.impl.android.LWUITActivity.currentActivity, LiveVideo.class);
com.sun.lwuit.impl.android.LWUITActivity.currentActivity.startActivity(i);

but when i press the back button (on my android/and simulator) it restarts the program, instead of getting it back to the last form that opened it.
i didnt managed to find any solution for this.
do you know what the problem is?

thorsten_s
Offline
Joined: 2008-08-15
Points: 0

Might be related to your Android app's configuration . Check out the AndroidManifest.xml file and the myriad of configuration options and/or check the android community on why the system shuts down your application. This is not directly related to the LWUIT implementation I believe.