In Cordova, there in a JavaScript function called when you resume your app. So, add a JavaScript snippet to your mobile page layout with something like this:
document.addEventListener("resume", mxOnResume, false);
function mxOnResume() {
mx.data.action({
params: {
actionname: "MyFirstModule.DoSomething"
},
origin: this.mxform,
callback: function(obj) {
// no MxObject expected
console.log("We just did something!")
},
error: function(error) {
console.log(error.message);
},
onValidation: function(validations) {
console.log("There were " + validation.length + " validation errors");
}
});
}
Hi Romil,
In your navigation profiles, you can set the homepage to a microflow. This way you can handle which page will be shown to a user. The microflow will execute every time a user comes to the application or hits the home button.