Tejas Tamkahne
Tejas Tamkahne

Reputation: 233

Playing a video before the main screen of the app

in my app i want to add a video before the main screen shows up. That means when clicked on the icon of the app, it should show a video (for eg. as seen in games before they start) . can anyone tell me how it is done.

Upvotes: 0

Views: 304

Answers (2)

manolovnikolay
manolovnikolay

Reputation: 131

Commonly, there is a "splash screen" activity that displays a graphic/video and launches your "main screen" activity after few seconds (or after the video is over). This "splash screen" should be manifested as the one to be started by the application launcher in the AndroidManifest.xml.

Upvotes: 2

Paresh Mayani
Paresh Mayani

Reputation: 128438

I think you should do Google for the same. but still FYI, there is already VideoView provided by android.

XML:

 <VideoView 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:id="@+id/videoView1">
    </VideoView>

Upvotes: 0

Related Questions