Hi Felgo Team,
its me again^^ I’m sorry. I found an interesting bug. I used nativeUtils displayCameraPicker to take a photo. I replaced it with NativeDialog.camera to reduce boilerplate code.
This seems to work on iOS but makes problems on android in my app. Can you check out the problem? Tested on Google Pixel 8 and Sony XPeria X compact. Both didn’t work.
Here is some code.
Before (we opened a extra page to take the photo, this works perfectly):
import Felgo
import QtQuick
AppPage {
id: currentPage
title: qsTr("Kamera")
Component.onCompleted: {
nativeUtils.displayCameraPicker("Foto aufnehmen")
}
Connections {
target: nativeUtils
onCameraPickerFinished: {
if(accepted)
{
console.log("Foto aufgenommen");
logic.storeImage(path);
}
currentPage.navigationStack.pop();
}
}
}
New (this works not on android. Get called from click event handler):
NativeDialog.camera((success, path) => {
if(success)
{
logic.storeImage(path)
}
})
Thanks for your support.