Hello All,
Just as a follow up, to minimize/exit the app from any page, you can use a custom JSAction as shown below:
here is the JSAction code:
// This file was generated by Mendix Studio Pro.
//
// WARNING: Only the following code will be retained when actions are regenerated:
// - the import list
// - the code between BEGIN USER CODE and END USER CODE
// - the code between BEGIN EXTRA CODE and END EXTRA CODE
// Other code you write will be lost the next time you deploy the project.
import "mx-global";
import { Big } from "big.js";
// BEGIN EXTRA CODE
import { BackHandler } from 'react-native';
// END EXTRA CODE
/**
* @returns {Promise.<void>}
*/
export async function ExitAppJS() {
// BEGIN USER CODE
BackHandler.exitApp();
// END USER CODE
}
credits to @Willian Oliveira to point me this solution. Thanks Bro!
When the user does not sign out but only kills the app, the data is retained. On a licensed node, the app will not reload any data when the app is opened with a user still logged in. Note that a sandbox is seen as dev environment so a native app built against a sandbox node will require a connection to the node at startup. So killing the app should be sufficient. You might use AppEvents widget to force a biometric check after app is in the background for x minutes. Note that devices can kill backgrounded apps when the device needs the resources.