Hi *,
I develop tv player with Android SDK 4.0.3
I have TVChannelActivity and TVPlayerActivity.
TVChannelActivity contains 3 Fragments.
1st column ChannelsListFragment
2nd column TVPlayerFragment and EPGGuideFragment.
TVPlayerFragment uses VideoView.
TVPlayerActivity contains TVPlayerFragment only and has those 2 lines in
onCreate(...)
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
to work in full screen mode.
Wenn I select one channel in ChannelsListFragment then after 2-3 seconds
buffering of video stream I can see preview of the tv.
If I click on the same channel again then I switch to TVPlayerActivity.
And here is my problem:
If I transfer tv channels stream url to TVPlayerActivity and set this url
to TVPlayerFragment's VideoView then buffering happens again and user waits
2-3 seconds until video starts.
If I stay in TVChannelActivity and simply try to hide ChannelsListFragment
and EPGGuideFragment then:
1) my TVPlayerFragment doesn't resize
2) I can not call requestWindowFeature(Window.FEATURE_NO_TITLE); because
GUI has been drawn.
What should I do?
Can I use the same instance of TVPlayerFragment in TVChannelsActivity and
TVPlayerActivity?
Or should I create some art of MediaPlayer singleton that I can share
between all TVPlayerFragments?
Best regards
Roman