I have an app where i am using Audio recording, I have it so it works just fine on a Android Device (Motorola Xoom) and Apple iPad1,2,+3.
I just got the chance to test this on a Nook Tablet and also a Kindle fire. Both of these devices crash as soon as i hit my record button.
here is the recording code i am using, anyone know of how to get recording of audio to work on a Nook or Kindle Fire…
[lua] function setAudioFileName(tempLoopID)
dataFileName = “word-”…tempLoopID
local platformName = system.getInfo( “platformName” )
if platformName == “iPhone OS” then dataFileName = dataFileName … “.aif” end
if platformName == “Android” then dataFileName = dataFileName … “.3gp” end
if platformName ~= “Android” and platformName ~= “iPhone OS” then dataFileName = dataFileName … “.3gp” end
print (dataFileName)
end
function startRecording(tempLoopID,tempWordKeyID)
if recordingLoopID == “none” or recordingLoopID == tempLoopID then – prevents multiple records at one time.
if recordingFlag == false then
print (“I am recording now”)
recordingLoopID = tempLoopID
activeRecordButton[tempLoopID].isVisible = true
word.setAudioFileName(tempWordKeyID) – generate the file name.
local filePath = system.pathForFile( dataFileName, system.DocumentsDirectory )
–print (filePath)
r = media.newRecording(filePath)
r:startRecording()
recordingFlag = true
else
r:stopRecording()
media.playSound( dataFileName, system.DocumentsDirectory, word.onCompleteSound)
dbfunctions.wordUpdateAudio(tempWordKeyID,dataFileName)
activeRecordButton[tempLoopID].isVisible = false
recordingFlag = false
recordingLoopID = “none”
print (“DONE RECORDING”)
word.setReset()
end
end
end
function onCompleteSound(event)
audio.dispose(event.handle)
end[/lua] [import]uid: 88147 topic_id: 25731 reply_id: 325731[/import]