By default, when you press the device's back button, you'd get an error message "There is nothing to go back to". You or your customer may want to change this behaviour so that it is more in line with other Android apps, that is, to close the application.
The behaviour of the back button in Android is controlled by two system properties.
1) OnSysBack_AllowNavigateAway (default = false)
Indicates whether pressing the back button can cause LongRange to close.
2) OnSysBack_NavigateAwayNoConfirmation (default = false)
Indicates whether LongRange will ask the user for confirmation when it’s about to close due to the user pressing the back button.
Example how to set system value (RPG):
Code: Select all
LRNG_AssignBoolToProp(*ON : '/SysStates.OnSysBack_AllowNavigateAway'); LRNG_AssignBoolToProp(*ON : '/SysStates.OnSysBack_NavigateAwayNoConfirmation');
In LongRange Studio, go to Schema Properties".
Best to set these in program designated as “local objects generator”
Note - setting these properties on other platforms (iOS, Windows) will not do any harm, so no need to condition them.