Search code examples
iphonetitaniumsharevoice

Titanium iPhone : How to access Voice Memos programmatically and store the sound object in a file?


I am writing an Titanium iPhone app when I want user to share his Voice Memos records.

There are two options : (1) Record -> save -> Share (2) Browse Voice Memo -> Share

I am facing issue in both of this. In (1) I managed to record an audio and play it back. But I am confused how to convert this recorded sound object to file object so that i can share that file. and in (2) I am unable to find out a way to get access to Voice Memos records programmatically.

Any help???


Solution

  • I managed to save sound file after a lot of research. Solution For issue1:

    var file = var file = Titanium.Filesystem.getFile( 'thePath', 'newRecording.wav' );
    
    // Write the data.
    
    file.write( sound.toBlob() );
    

    Still working out for second issue. Any help???