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 7059885
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:17:09+00:00 2026-05-28T04:17:09+00:00

I am trying to load video files from my internal storage to a VideoView.

  • 0

I am trying to load video files from my internal storage to a VideoView. I download these video files from a server and then store them locally using this code:

FileOutputStream out = openFileOutput(filename, Context.MODE_WORLD_READABLE);

The documentation here: http://developer.android.com/guide/topics/data/data-storage.html#filesInternal made me believe that these files would be created as world readable, but I don’t think that is true.

Here is the code I use to load the file into the ViewView:

videoView.setVideoPath(getFilesDir() +"/"+ filename);

And here is the output I get from DDMS:

ERROR/MediaPlayer(4264): error (1, -2147483648)
ERROR/MediaPlayer(4264): Error (1,-2147483648)
DEBUG/VideoView(4264): Error: 1,-2147483648

If I change the code to load the same video from my raw resources directory, everything runs fine. However, I need to be able to download these videos and play them locally.

Are my only options to use external data or is there a way to make internal data public to something like a VideoView?

  • 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-05-28T04:17:10+00:00Added an answer on May 28, 2026 at 4:17 am

    CommonsWare solution in the comments is repeated below, as it is the one I ended up using:

    Note that you can always use MediaPlayer and SurfaceView if you don’t like the interface of VideoView. Or, implement a simple ContentProvider with openFile() to return the FileDescriptor and use the content:// Uri with VideoView. – CommonsWare

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

Sidebar

Related Questions

I'm trying to download a mp4 file from a server, then save it in
i m trying load UIImages from server asynchronously in UITableViewCell. My code worked fine
I am trying to load all the files(audio, video and images) in my application
Trying to load content into a div, then on click load the previous content
trying to load in a bunch of images into a list from a directory...my
When trying to load Microsoft.Xna.Framework.dll from any project, it throws a FileNotFoundException. The specified
What am I trying? I am trying to load a quicktime movie from the
I am trying to load my video into a webview. When I use this
I'm trying to load a video onto my page using Youtube API. Youtube specifies
I'm trying to load a YouTube video on a flash MovieClip using url http://www.youtube.com/v/4nRNoXT_gUc

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.