When the resume event occurs, I must invoke the method this.callResume()
. However, upon calling the method, a runtime error is thrown:
TypeError: this.callResume is not a function
I am uncertain about how to call a method from within the resume method of the lifecycle. I have placed the resume method in the constructor.
constructor() {
applicationOn(resumeEvent, function (args: ApplicationEventData) {
if (args.android) {
// For Android applications, args.android is an android activity class.
console.log("Activity: " + args.android);
this.callResume();
} else if (args.ios) {
// For iOS applications, args.ios is UIApplication.
console.log("UIApplication: " + args.ios);
}
});
}
callResume():void{
console.log("ResumeCalled", "Test");
}