Hi, I am a beginer in Android platform and I would like to ask you a
question about intent. I have a button that when clicked, it allows a user
to record his voice and it comes back to my application; at the same time
the path of the recored file is saved as iSCanvas title.
I would like a user to play that recording if the user press that button
again. Below is my failed attempt. So I have the path of the file that the
user recorded. My question is how can you start voice recording activity so
that the voice recording activity plays the recording from the given path
right away. Is this possible?
Thank you very much,
Inho Hwang
private OnClickListener VoiceBtnClickListener = new OnClickListener()
{
public void onClick(View v)
{
if (iSCanvas.getTitle().equalsIgnoreCase(""))
{
Intent recordIntent = new Intent(
MediaStore.Audio.Media.RECORD_SOUND_ACTION);
startActivityForResult(recordIntent, REQUEST_CODE_RECORD);
}
else
{
Intent recordIntent = new Intent(
MediaStore.Audio.Media.RECORD_SOUND_ACTION);
recordIntent.putExtra(iSCanvas.getTitle(), true);
startActivityForResult(recordIntent, REQUEST_CODE_RECORD);
}
}
};
....ActivityforResult.....
else if (requestCode == REQUEST_CODE_RECORD)
{
Uri recording = data.getData();
String recordingPath = recording.getPath();
iSCanvas.setTitle(recordingPath);
}
--
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