Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8193137
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:22:47+00:00 2026-06-07T04:22:47+00:00

I have a simple application that starts with a splash screen activity that plays

  • 0

I have a simple application that starts with a splash screen activity that plays an mp4 video within a VideoView. When the video has completed, I’m trying to start a new activity via an OnCompletionListener.

When I start the application, the video works perfectly; playing both sound and audio as expected. Once the video has finished, the app displays a dialog with the title “Cannot play video” and continues normally once the “OK” button is pressed. The problem seems only to occur when I’ve added audio to the mp4 that I’ve created with Adobe After Effects. I’ve used the exact same video minus the audio track and it doesn’t throw this error. I’m assuming the encoding of the file is fine as it plays fully before showing the dialog.

Here’s my code:

public class Splash extends Activity {


 @Override  
 public void onCreate(Bundle savedInstanceState) {  

     super.onCreate(savedInstanceState);
     setContentView(R.layout.splash);

     Uri video = Uri.parse("android.resource://" + getPackageName() + "/" + R.raw.audio_intro); 

     VideoView videoview = (VideoView) findViewById(R.id.splash_view);
     videoview.setKeepScreenOn(true);  
     videoview.setVideoURI(video);

     videoview.setOnCompletionListener(new OnCompletionListener() {  
           public void onCompletion(MediaPlayer mp) {  
                 Intent intent = new Intent(Splash.this, Menu.class);
                 startActivity(intent);
                 finish();
           }
     });

     videoview.requestFocus();
     videoview.start();
 }

}

Here’s what LogCat shows:

06-30 14:49:33.095: V/MediaPlayer-JNI(21544): native_setup
06-30 14:49:33.095: V/MediaPlayer(21544): constructor
06-30 14:49:33.095: V/MediaPlayer(21544): setListener
06-30 14:49:33.095: I/MediaPlayer(21544): path is null
06-30 14:49:33.095: V/MediaPlayer-JNI(21544): setDataSourceFD: fd 54
06-30 14:49:33.095: V/MediaPlayer(21544): setDataSource(54, 2521, 173889)
06-30 14:49:33.110: V/MediaPlayer(21544): setVideoSurfaceTexture
06-30 14:49:33.110: V/MediaPlayer-JNI(21544): setAudioStreamType: 3
06-30 14:49:33.110: V/MediaPlayer(21544): MediaPlayer::setAudioStreamType
06-30 14:49:33.110: V/MediaPlayer(21544): setVideoSurfaceTexture
06-30 14:49:33.110: V/MediaPlayer(21544): prepareAsync
06-30 14:49:33.140: V/MediaPlayer(21544): message received msg=5, ext1=480, ext2=270
06-30 14:49:33.140: V/MediaPlayer(21544): New video size 480 x 270
06-30 14:49:33.140: V/MediaPlayer(21544): callback application
06-30 14:49:33.140: V/MediaPlayer(21544): back from callback
06-30 14:49:33.140: V/MediaPlayer(21544): message received msg=1, ext1=0, ext2=0
06-30 14:49:33.140: V/MediaPlayer(21544): prepared
06-30 14:49:33.140: V/MediaPlayer(21544): callback application
06-30 14:49:33.140: V/MediaPlayer(21544): back from callback
06-30 14:49:33.145: I/MediaPlayer(21544): mOnVideoSizeChangedListener. Send MEDIA_SET_VIDEO_SIZE message.
06-30 14:49:33.145: V/MediaPlayer(21544): getVideoWidth
06-30 14:49:33.145: V/MediaPlayer-JNI(21544): getVideoWidth: 480
06-30 14:49:33.145: V/MediaPlayer(21544): getVideoHeight
06-30 14:49:33.145: V/MediaPlayer-JNI(21544): getVideoHeight: 270
06-30 14:49:33.145: I/MediaPlayer(21544): mOnPreparedListener. Send MEDIA_PREPARED message.
06-30 14:49:33.145: D/MediaPlayer(21544): getMetadata
06-30 14:49:33.145: V/MediaPlayer(21544): getVideoWidth
06-30 14:49:33.145: V/MediaPlayer-JNI(21544): getVideoWidth: 480
06-30 14:49:33.145: V/MediaPlayer(21544): getVideoHeight
06-30 14:49:33.145: V/MediaPlayer-JNI(21544): getVideoHeight: 270
06-30 14:49:33.170: I/MediaPlayer(21544): sendBroadcast android.media.IMediaPlayer.videoexist
06-30 14:49:33.170: V/MediaPlayer-JNI(21544): start
06-30 14:49:33.170: V/MediaPlayer(21544): start
06-30 14:49:37.915: V/MediaPlayer(21544): message received msg=100, ext1=1, ext2=-1007
06-30 14:49:37.915: E/MediaPlayer(21544): error (1, -1007)
06-30 14:49:37.915: V/MediaPlayer(21544): callback application
06-30 14:49:37.915: V/MediaPlayer(21544): back from callback
06-30 14:49:37.915: E/MediaPlayer(21544): Error (1,-1007)
06-30 14:49:37.915: D/VideoView(21544): Error: 1,-1007

I’m hoping someone can help me out as I’ve tried a number of things to resolve this and can’t seem to find a similar issue being mentioned/solved anywhere. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T04:22:49+00:00Added an answer on June 7, 2026 at 4:22 am

    Just an idea: I suggest to try to convert the video with a video converter, for example http://www.wondershare.com/pro/media-converter.html, (from mp4) to mp4 again, just to make sure you get audio (and video) to a standard that’s supported by Android, as listed on http://developer.android.com/guide/appendix/media-formats.html#core.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a Android application that requires a splash screen. I have a simple
I have a simple WPF application that uses ClickOnce to handle installing. Within this
I have an application which starts with a simple start screen allowing the user
I have a simple application that loads an unmanaged dll and passes a few
I have a simple c++ application that generates reports on the back end of
I have a simple iPhone application that is very similar to the Page Control
I have a simple Android application that uses a JAR I have built. When
I have a simple test application (C# console application) that does an HTTP GET
I have a simple Desktop Facebook application that allows the user to retrieve some
I have a simple Swing Java application that performs searches, and the results are

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.