back_button how to disable on Android

1004
5
04-03-2018 10:20 AM
MarekFlorianczyk
New Contributor III

Hi,

I'm developing 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

Tags (1)
0 Kudos
5 Replies
LucasDanzinger
Esri Frequent Contributor

I'm not aware of anything in the Runtime SDK that should be affecting this. Were you able to find any clues?

0 Kudos
MarekFlorianczyk
New Contributor III

Hi,

Actually, no I haven't found the sollution, I was counting on You Guys

There are some references on back button and  ArcGIS Runtime SDK so I belive this button is handled by ArcGIS

Back button from mapView exits application

handling back button android

Handling back button in Android

The last one does not work for me. Do you want me to prepare running example for testing ?

Best Regards

Marek

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Thanks Marek. I've always been under the impression that handling the back button was up to the user, but perhaps I am mistaken. Usually I have added something like the following to perform some behavior when back is pressed:

Keys.onReleased: {
    if (event.key === Qt.Key_Back) {
        // do something
    }
}
0 Kudos
MarekFlorianczyk
New Contributor III

Hi Lucas

This is crucial for me, my application is car navigation it cant just shut down when I press back button.

This Keys.onReleased does not work for me, maybe there is some interaction with V-Play framework. I will prepare minimal working example to demonstrate the problem

Best,

Marek

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Ok, thanks. If this is a high priority issue for you, I suggest you contact Esri Support or your local Esri Distributor, as they are equipped to troubleshoot these types of things. They can help diagnose the issue, and if applicable, log a bug and hopefully suggest a workaround. This is your best bet to finding a resolution. The GeoNet community will do its best to help make suggestions, but setting up different test environments and troubleshooting high priority issues is best addressed by Esri Support/Distributor. 

0 Kudos