androidgoogle-tv

MP4 video fail to play from SD Card in Google TV OS


My android application's video is working very well in touch devices(e.g. Mobile, Tablet).

Now I am working same application made for Google TV OS using existing code with modification.

But I seen MP4 video is not playing using my application, and video is play using VideoView.

It display message :

Title : Cannot play video

Message : Sorry, this video cannot be played

Even same code is working in other android devices(e.g. Mobile, Tablet)

When I play same video from SD card then it play very well in built in Google TV video player.

Log information :

W/MediaPlayer(1164): info/warning (1, 0)

I/MediaPlayer(1164): Info (1,0)

E/MediaPlayer(1164): error (14, 0)

E/MediaPlayer(1164): Error (14,0)

D/VideoView(1164): Error: 14,0

Note :

My MP4 video is working in one odd scenario When my any one application is running and my application is front of that app then video is running fine but no any application running at at time my video is not running and above Error is comes.


Solution

  • Solve it my self after research:

    Problem in Android Manifest configuration

    <activity 
        android:launchMode="singleTop" 
        android:name=".VideoScreen"
        android:screenOrientation="landscape"
        android:configChanges="keyboardHidden|orientation"
        android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    

    In above configuration for "Video Screen" activity, android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" is not supported in full screen with VideoView.

    Google TV OS is available with 3.2 OS, So In 3.2 OS for Full Screen used android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" and set minimum SDK Version <uses-sdk android:minSdkVersion=11" />