MediaPlayer error (1, -1004) aka MEDIA_ERROR_IO trying to stream music on Samsung S3
The answer to this question turned out to be an issue on Android firmware installed on Samsung S III devices running Android 4.1.2.
It seemed to have been something relating to the source of the stream, because some sources eventually played on the device, but the one we needed, never played.
If you can get your stream from another source, it should work.
So if you're developing an application for a specific company/purpose and have some control over the source of the stream, or can communicate with people in control of the source of the stream, get them to change the source of the stream to something that'll work on a Samsung S III running Android 4.1.2.
Other than that all that will solve this is a firmware upgrade.
open failed: EACCES (Permission denied)
I ran into a similar issue a while back.
Your problem could be in two different areas. It's either how you're creating the file to write to, or your method of writing could be flawed in that it is phone dependent.
If you're writing the file to a specific location on the SD card, try using Environment variables. They should always point to a valid location. Here's an example to write to the downloads folder:
java.io.File xmlFile = new java.io.File(Environment
.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS)
+ "/Filename.xml");
If you're writing the file to the application's internal storage. Try this example:
java.io.File xmlFile = new java.io.File((getActivity()
.getApplicationContext().getFileStreamPath("FileName.xml")
.getPath()));
Personally I rely on external libraries to handle the streaming to file. This one hasn't failed me yet.
org.apache.commons.io.FileUtils.copyInputStreamToFile(is, file);
I've lost data one too many times on a failed write command, so I rely on well-known and tested libraries for my IO heavy lifting.
If the files are large, you may also want to look into running the IO in the background, or use callbacks.
If you're already using environment variables, it could be a permissions issue. Check out Justin Fiedler's answer below.
WebView won't play any sound
Try to add this
webSettings.setMediaPlaybackRequiresUserGesture(false)
Related Topics
Android Webview for Facebook Like Button
Getting Results of Nearby Places from User's Location Using Google Maps API in Android
How to Set Notification with Custom Sound in Android
Android - Listview - Performitemclick
Show Error on the Tip of the Edit Text Android
Android: How to Get Gsm Signal Strength for All Available Network Operators
Importing Jar Libraries into Android-Studio
Android Open Camera from Button
Adding Watermark Bitmap Over Video in Android: 4.3's Mediamuxer or Ffmpeg
How to Capture an Image in Background Without Using the Camera Application
Using Android to Submit to a Google Spreadsheet Form
How to Draw a Circle with Animation in Android with Circle Size Based on a Value
Sending a File Using Bluetooth Obex Object Push Profile (Opp)
Send a Notification When the App Is Closed
What Should Be the Package Name of Android App
What Is the Benefit of Using Fragments in Android, Rather Than Views