events - Nativescript Android physical back button override? -
how can override android physical button can make own code on it's event. i'm using newest nativescript.
you can try this:
var applicationmodule = require("application"); var androidapplication = applicationmodule.android; var activity = androidapplication.startactivity || androidapplication.foregroundactivity || topmost().android.currentactivity || topmost().android.activity; activity.onbackpressed = () => { //your code here };
Comments
Post a Comment