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

  • Home
  • SEARCH
  • 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 8156571
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T16:59:36+00:00 2026-06-06T16:59:36+00:00

I am downloading an audio file to my Android application’s cache that must then

  • 0

I am downloading an audio file to my Android application’s cache that must then be accessed with MediaPlayer. The file gets created with permissions of -rw——- (as seen in Eclipse’s File Explorer).

With these permissions, the MediaPlayer cannot access the audio file. Failure is shown in logcat as:

java.io.IOException: Prepare failed.: status=0x1

My app targets API level 8.

How do I set the downloaded audio file’s permissions to make it readable by the MediaPlayer?

By the way, I am creating the file with:

FileOutputStream out = new FileOutputStream(fRecording);

When I try to create the file as MODE_WORLD_READABLE, no file is created:

FileOutputStream out = activity.openFileOutput(fRecording.getAbsolutePath(), Activity.MODE_WORLD_READABLE);

The logcat error using openFileOutput is:

java.lang.IllegalArgumentException: File /data/data/com.calltrunk.android/cache/727adda7-0ef1-490f-9853-fe13ad1e9416 contains a path separator
  • 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-06T16:59:37+00:00Added an answer on June 6, 2026 at 4:59 pm
    • Call openFileOutput() with the name of the file and the operating
      mode. This returns a FileOutputStream with permission
      MODE_WORLD_READABLE.

    • Write to the file with write().

    • Close the stream with close().

    For example: (Code for txt file, in your case its a Audio file make changes according to it)

    String FILENAME = "hello_file";
    String string = "hello world!";
    
    FileOutputStream fos = openFileOutput(FILENAME, Context.MODE_WORLD_READABLE);
    fos.write(string.getBytes());
    fos.close();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an application that creates an audio file. I need to provide a
i am downloading an application in Android using the DownloadManager class. When the download
I am using async task for downloading an audio file and I am having
I have some audio files that my app is downloading, and due to the
In my application I have sent an audio 3gp file to the server and
I read that concatenating and possibly gzipping a javascript file will make an application
I am downloading some file Audio/Video/PDF from amazon S3 server. What I am doing
I'm downloading files of various types (pictures, audio, videos) through my application. The folders
I have a trouble with my application: I use MediaPlayer to download audio from
I have an application that records audio, and the quality is poor when I

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.