My app uses the phone's microphone to record audio. I need to make it available to other apps so that they can call upon it whenever they want to.
Say email or a messaging service like telegram should be able to click on "add attachment". My app should be listed in the content peer picker. When the user picks my app, it should record and send the file back to the asking app.
My MainView
qml file has a section like this:
ContentPeer {
id: trkSourceSingle
contentType: ContentType.Music
handler: ContentHandler.Source
selectionType: ContentTransfer.Single
}
Connections {
target: ContentHub
onExportRequested: {
// show content picker
isTransferRequested=true
transfer.items = selectedItem;
transfer.state = ContentTransfer.Charged;
console.log("I am expected to export content")
}
}
The idea is that when the hub asks for the app, the app will respond by showing its recording page. When the user stops the recording, the app should quit and return control to the asking app
However, I get an error, and my app crashes. The sdk log
shows a "failed event received"
. What is wrong and how should I proceed.
Thanks in advance
0 Answers