Search code examples
arcgisarcgis-runtime

ArcGIS Qt - back_button how to disable on Android


I'm developing Qt/QML application

It seems that "back button" is handled by ArcGIS Runtime for Android

As soon as I add qml runtime to my pro file:

include(/opt/arcgis/runtime_sdk/qt100.2.1/sdk/ideintegration/arcgis_runtime_qml.pri)

I have no control over back button on android.

I'm using V-Play framework which is handling back button, but when I create app with arcgis_runtime_qml.pri back button closes the app immediatelly.

How to disable back button handling by ArcGIS ?

Best Regards

Marek


Solution

  • If you want to get control over back button on android you just have to add on your main qml file this:

    import QtQuick 2.10
    import QtQuick.Controls 2.3
    
    ApplicationWindow {
        onClosing:{
            // handle back button
            close.accepted = false;
        }
    }