Note that launching shell commands is not a supported part of the SDK, and if you do this kind of thing you are opening your app to breaking in the future.
On Mon, May 11, 2009 at 1:39 PM, Scott Slaugh <[email protected]> wrote: > > I'm just using the built in MediaRecorder and MediaPlayer clases, so, > no I'm not using alsa_sound. > > However, thanks to some help I was able to discover that the problem > is being caused by the permissions set on the recorded file, which is > not world-readable in Android 1.5. I was able to fix this by > inserting the following code: > > //set player permissions > String command = "chmod 666 " + recordFile.toString(); > try { > Runtime.getRuntime().exec(command); > } catch (IOException e1) { > Log.e("SetPermissions", "Couldn't set permissions", e1); > } > > If I execute that before creating the MediaPlayer, my code works > fine. But, does anyone know of a better way to set the permissions > correctly besides using the exec command? > > Scott > > > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

