I am currently using NativeScript version 5.2.4 along with TypeScript. My goal is to disable the back button functionality in one specific page only, but I'm facing an issue where it also disables the back button behavior for child pages. Below is the code snippet that I have been working on:
constructor(page: Page, obj: any = null, initValues = true) {
super(page, obj, initValues);
this.title = Helpers.getString('visit_cart');
if (obj != null) {
this.Parse(obj);
}
else {
this.barcodeScanner = new BarcodeScanner();
application.android.on(application.AndroidApplication.activityBackPressedEvent, (args: any) => {
args.cancel = true;
Helpers.infoMsg('press_end_visit');
});
}
}