Android :: Downloaded Media File Cannot Be Played

May 9, 2010

I have an application that will record and play audio files. Some of the audio files are downloaded using simple standard http downloads using httpclient. It worked like a charm for a long time. Now all of a sudden I cannot play the files I download. It fails with this stack. I store the files on the SD Card and I experience the problem both on a handset and a USB connected device. I have checked that the downloaded file is cool on the server, and I can play it without any issues. These are the code snippets I use ( I know that recordingFile is a valid path for the file).

// inside the activity class
private void playRecording() throws IOException{
File recordingFile = new File(recordingFileName);
FileInputStream recordingInputStream = new FileInputStream(recordingFile);
audioMediaPlayer.playAudio(recordingInputStream);
}

Here is the media player code:
// inside my media player class which handles the recordings
public void playAudio(FileInputStream audioInputStream) throws IOException {
mediaPlayer.reset();
mediaPlayer.setDataSource(audioInputStream.getFD());
mediaPlayer.prepare(); mediaPlayer.start();
}

Here is the exception:
E/MediaPlayerService( 555): offset error
E/MediaPlayer( 786): Unable to to create media player
W/System.err( 786): java.io.IOException: setDataSourceFD failed.: status=0x80000000
W/System.err( 786): at android.media.MediaPlayer.setDataSource(Native Method)
W/System.err( 786): at android.media.MediaPlayer.setDataSource(MediaPlayer.java:632)
W/System.err( 786): at net.xxx.xxx.AudioMediaPlayer.playAudio(AudioMediaPlayer.java:69)
W/System.err( 786): at net.xxx.xxx.Downloads.playRecording(Downloads.java:299)
W/System.err( 786): at net.xxx.xxx.Downloads.access$0(Downloads.java:294)
W/System.err( 786): at net.xxx.xxx.Downloads$1.onClick(Downloads.java:135)

I have tried seeking some answer of the offset error, but not really clear what this issue might be. I download the file with this code:
public FileOutputStream executeHttpGet(FileOutputStream fileOutputStream) throws ClientProtocolException, IOException{
try { // Execute HTTP Post Request
httpResponse = httpClient.execute(httpPost, localContext);
int status = httpResponse.getStatusLine().getStatusCode();
// we assume that the response body contains the error message
if (status != HttpStatus.SC_OK) {
ByteArrayOutputStream ostream = new ByteArrayOutputStream();
httpResponse.getEntity().writeTo(ostream); fileOutputStream = null;
} else { InputStream content = httpResponse.getEntity().getContent();
byte[] buffer = new byte[1024]; int len = 0;
while ( (len = content.read(buffer)) > 0 ) {
fileOutputStream.write(buffer,0, len);
} fileOutputStream.close();
content.close(); // this will also close the connection }
} catch (ClientProtocolException e1) {
// TODO Auto-generated catch block e1.printStackTrace();
fileOutputStream = null; } catch (IOException e2) {
// TODO Auto-generated catch block e2.printStackTrace();
fileOutputStream = null;
} return fileOutputStream;
}

Android :: Downloaded Media file Cannot be Played


Media :: Moving Downloaded (RAR) File To SD Card?

Nov 9, 2010

I downloaded a Rar file to my Sumsung Galaxy S, I unrated it using the app from the Android Market! Now, since I downloaded music, I want to move it from my phone, to the External SD where all my other music is stored, but I can't move it from the phone to the SD card!

View 1 Replies View Related

Media :: MP4 / The Video Could Not Be Played

Mar 4, 2010

I have encoded several videos to mp4. All of these videos played fine on on my phone until yesterday. Now none of them will play correctly. The default video player says "The video could not be played" and Act 1 says "Video is falling behind audio. It may be too much data for your phone to process, or may not be supported by Android" What gives? They play correctly on my wife's droid. I haven't downloaded any new apps since they played correctly. I have killed all apps to make sure I have enough memory. What could have changed? I have followed the instructions given on the forums to encode video to a T.

View 2 Replies View Related

Android :: Where Can A Video File Be Placed / Played In Droid Other Than Sd Card?

Aug 19, 2010

1.how do we build our own video player in android,it will be helpful if ull can give me some code related to it.

View 1 Replies View Related

Media :: Media Player Not Play Downloaded MP3 Files?

Oct 23, 2010

My application gets playlist from a XML file, requests URL of mp3 file from server, downloads and plays it. It was able to download mp3 file but unable to play it. When I used emulator with Android 2.1, it was displayed in LogCat:

[Quote]

View 5 Replies View Related

Motorola Droid X :: Error - File Cannot Be Displayed Or Played

Nov 2, 2010

I've had the phone for a out a month now and everythings been amazing. However,starting yesterday I haven't been able to play any of my music, videos, online videos, nothing. The error I get mainly is "file cannot be displayed or played" or something like "audio file not supported" when I try to play music.

View 2 Replies View Related

Motorola Droid X :: Video Playback Error - File Cannot Be Displayed Or Played

Aug 22, 2010

Anybody getting this when they try view recorded videos? Worked well in 2.1, but I get this error in 2.2

View 4 Replies View Related

Media :: Android Music Player Won't Show Downloaded Podcasts

Apr 20, 2010

On my HTC Legend, when I download podcasts using Listen, BeyondPod, or Dpod, the downloaded .mp3 files are not visible on the android music player widget. Nor are they visible on btunes, even if I enable the audio books/podcasts features on btunes and hard-set the sdfolder path to where the .mp3 files are stored. On the music widget, I do see an empty "podcasts" playlist, but if I tell it to update, I get a "force close" error. Any ideas?

View 3 Replies View Related

Android :: Private Media File Clean Up By Media Provider

May 9, 2009

the media provider cleans the media files, if files didn't get read since last two month. does it cleans(delete) the private application media file stored on sdcard, too if didn't get read from last two month? or Appl Private media file does not come under media file?

View 2 Replies View Related

Media :: How To Downloaded Pandora?

Oct 8, 2010

Downloaded Pandora on my fascinate and i only have 4 stations on my Pandora it just directly goes to them 4 stations how can i get more.

View 4 Replies View Related

Media :: Delete Downloaded Ringtones?

Oct 9, 2010

I have a few ringtones I dowloaded through a ringtone app that I've since deleted. I no longer use these ringtones, and would like to delete them from the phone. is there anyway to do so? I can't seem to find them in a file mode. I can get to them through choosing a ringtone, but can't delete them, and only 2 of them showed up in the music category. is there anyway to find them in the phone and make them go away??

View 1 Replies View Related

Media :: Downloaded Songs Out Of Order

Mar 3, 2010

When I download music from my computer (PC) to my motorola droid the songs for each album are put in alphabetical order rather than the original album track order.I don't see an option to reorder them any other way.Could this be happening because of the download method I use? I'm using Windows Media Player to save from CD to PC, then copy and paste onto my SD card.

View 11 Replies View Related

Media :: Deleting Downloaded Ringtones

Nov 6, 2008

I downloaded a ringtone from myxer.com and I can't figure out how to delete it.

View 5 Replies View Related

Media :: Hero - Downloaded A Mp4 Video

Dec 18, 2009

I downloaded a mp4 video and I get sound and a black and gray screen when I play it on my Hero. What format does the Hero play?

View 1 Replies View Related

Android :: How To Import Downloaded APK File Into Eclipse?

May 13, 2010

I am newb To Android. I just to check out few applications in my Desktop and have downloaded some sample applications. However, they are in the format .apk. Please let me know the procedure to import this file into Eclipse which helps me to run the application.

View 2 Replies View Related

Android :: How To Access File Downloaded With Handcent?

Jan 18, 2010

I've done 30 minutes of searching on the site, read a bunch of threads about file management, SMS/handcent and I still don't have an answer to this: Where in god's name is handcent storing files that were sent via SMS?

I clicked "download" in handcent and received confirmation that the image downloaded. Already have a file manager installed, have browsed pretty much every directory on the phone and the sd card looking for the file, to no avail.

View 13 Replies View Related

Android :: Forward Locking Specific Downloaded File

Sep 5, 2009

I am interested in forward locking a downloaded file (an image, or a ringtone, etc). Is there any way to do this? As far as I can tell packages can be forward locked, but their resources remain public, is there a way to forward lock a specific file I've downloaded to the Android?

View 7 Replies View Related

General :: APK Installs As Zip File When Downloaded From Android Market

Mar 7, 2012

I have created a Black and Pink Glass theme for Go launcher that installs and loads fine. When I upload the theme to the android market and then its downloaded from the market and installed it installs as a .zip file instead of an .apk file. I have several other themes that are working fine. I have tried rebuilding it from scratch and the issue is still there. I have attached the android manifest.xml for reference.

View 1 Replies View Related

Media :: New Motorola Droid User - Downloaded Music

Jan 14, 2010

I purchased a Motorola Droid about a week ago and have it running to my liking except for music. I noticed that the songs I transferred onto my Droid were sorted in alphabetical order rather than by the oringial album sort. How do I change the sort from alphabetical to the original album sort?

View 2 Replies View Related

General :: Downloaded APK And Got EXE File Instead

Jan 9, 2014

I've downloaded several android apps and when extracted the file is an .exe (windows) file instead. This is more common than I like. I download my apps from my usenetserver. What, if anything, can I do with these .exe files to get them installed on my android device?

ASUS Transformer Pad TF300T

View 7 Replies View Related

Motorola Droid X :: Where Does Downloaded File Go?

Jul 17, 2010

I went to open a PDF file and it started to download, where is it located when its done? And is it normal for the x to heat up under heavy use?

View 3 Replies View Related

HTC EVO 4G :: Downloaded Song Not Shown In MP3 File

Jun 4, 2010

I downloaded a song on to my SD Card. However, I do not see it in the mP3 player or ringdroid? Whats up with that?

View 3 Replies View Related

Android :: Media File Playing Details In Android Media Player?

Aug 31, 2010

Is there any way to get the details of media files that is executed in android(default) media player?

View 3 Replies View Related

Android :: Playing Media File In Android Media Player Application

Apr 14, 2010

I just started with creating my own media player application by looking at the code samples given in Android SDK. While I am trying to play a local media file (m.3gp), I am getting IOException error :: error(1,-4).

package com.mediaPlayer;
import java.io.IOException;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.os.Bundle;...........

View 1 Replies View Related

HTC Desire :: Sending Downloaded File Via Bluetooth?

Sep 14, 2010

I've downloaded this .pdf document, used Astro to find it in the download folder and it opens fine from there. Even managed to to use that folder app and create a label/link/shortcut thingy to it on my main screen, however I can't seen to send it to anyone else via bluetooth?

View 4 Replies View Related

HTC Droid Eris :: Cant Find Downloaded Pdf File

May 21, 2010

How do I find them on the phone? Not talkin about apps from the market. I dl'ed a pdf file and now I cant find it

View 2 Replies View Related

HTC Droid Eris :: Delete A Downloaded PDF File?

May 19, 2010

How do you delete a downloaded PDF file?

View 2 Replies View Related

Samsung Moment :: Cannot Open File Downloaded Custom Kernel

Jan 12, 2010

when i try and download odin downloader it is saved and when i go to open it it says that "windows can not open this file" then it gives 2 options of use web service to find correct program and select a program from a list of installed programs. The file is downloaded as a .rar file if it matters. This also happens when i try to download the newest kernel.

View 5 Replies View Related

HTC Droid Eris : Check Md5 Checksum On File Downloaded With Windows (xp)?

Apr 12, 2010

Anyone know an easy way to check the md5 checksum on a file downloaded with windows (xp)?

View 3 Replies View Related

LG Ally : ZVB Not Apply Correctly / Pull Info On Update From Downloaded File?

Oct 1, 2010

Firstly, just wanted to say everyone on this forum has been awesome! You all do great work and are extremely helpful!

Ok from Velocity 0.2 with Clockworkmod and V9 SW version I flashed the stock V6 Rom, then flashed stock recovery. got ota updates to V8 and then ZVB without any errors. SW Version on phone read VS740ZVB. I then rerouted, applied Clockworkmod recovery and installed Velocity 0.2 and then the GNMTurbo4 kernel. SW Version on phone reads VS740ZVB. Then another OTA update showed up. It claimed to be 24.9MB just like the ZVB update. Of course it would not install because I was using custom recovery.

My question is, what is this update? Is it the ZVB update coming through again? Did my ZVB update not apply correctly or is it not recognized by Verizon since I'm using custom recovery and rom? Is there a new update that I'm missing out on, and if so, what is it, and do I need to apply it?

Lots of questions, I know.Just wondering what exactly is going on and do I need to do anything about it? Is there any way to pull info on this update from the downloaded file, and if so, where can I find the file and how do I get info from it?

View 11 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved