Unsolved where to save the output of QAudioRecorder for iOS and Android?
-
I'm trying to implement voice messaging in my app. The idea is to use QAudioRecorder for recording the audio message, and save the output to a file. After recording, upload the file/data to server using QNetworkAccessManager.
I've been following the example Qt provides for Audio Recorder (https://doc.qt.io/qt-5/qtmultimedia-multimedia-audiorecorder-example.html). My problem is, this example seems to work fine on Desktop. But on Mobile platforms, where should I store the temp file, for Android and iOS? (aka, what should I pass to the setOutputLocation() function, like in the example https://doc.qt.io/qt-5/qmediarecorder.html#details)
-
Hi,
Use QStandardPaths to get a suitable folder.
Note that you will get a valid name but it does not mean that the folder already exists. You will have to create it the first time you want to use it.