Hello asxz,
thank you for posting this issue of yours.
Unfortunately I cannot help you with the code (I wrote a couple of
apps myself a few months ago but not using Flash Player).
What I can tell you is, as far as I know, the Flash player is (quite
strangely) made not to play/function when in background. I hate this
because for example
there is no way to listen to a youtube video music without having to
look at the video itself (in some case the video is a still image!!).
Have a look at this:

http://android-developers.blogspot.com/2010/04/multitasking-android-way.html

Regards



On Dec 29 2011, 2:55 am, asxz8722 <[email protected]> wrote:
> Hi, dear
>
> I want to build a live video chating system.
>
> In my design, there are two activities:
> 1. chat
>    People can chat in this activity.
>    There should be a list of TextView, dynamic changing when someone is
> talking.
> 2. Live video player
>    In this activity, a WebView embed a flash player to play the live
> stream.
>
> I can overwrite the onOptionsItemSelected in Activities to switch between
> Activities
> Here is a part of my code:
> public boolean onOptionsItemSelected(MenuItem item){
> switch(item.getItemId()){
> case Menu.FIRST;:
> Intent intent = new Intent();
> intent.setClass(Video.this,Chat.class);
> startActivity(intent);
> break;
> default:}
>
> return super.onOptionsItemSelected(item);
>
> }
>
> and, here is my problem:
> When I am chating with other people, the live stream should still alive.
> However, when I change the activity from Live video player to chat
> Activities
>
> Intent intent = new Intent();
> intent.setClass(Video.this,Chat.class);
> startActivity(intent);
>
> would recreate the Chat activity, and the original activity(Live video
> player) would be paused.
>
> So, is there any solution to make the flash player play like in background?
> even when changing activities, this flash player is still playing.
>
> P.S I have tried to put a webview with a flash player embed in in Service
> and get the
> webview back from Service and add it to chat activity.
>
> then I get an error:
>
> Thread [<1> main] (Suspended (exception ClassCastException))
> ViewRoot.draw(boolean) line: 1634
> ViewRoot.performTraversals() line: 1323
> ViewRoot.handleMessage(Message) line: 1959
> ViewRoot(Handler).dispatchMessage(Message) line: 99
> Looper.loop() line: 150
> ActivityThread.main(String[]) line: 4310
> Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean)
> line: not available [native method]
> Method.invoke(Object, Object...) line: 507
> ZygoteInit$MethodAndArgsCaller.run() line: 839
> ZygoteInit.main(String[]) line: 597
> NativeStart.main(String[]) line: not available [native method]
>
> But, when the webview just load a normal url without flash likewww.google.com,
> it will load successfully.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to