Hi Ahmad,
You can use below custom runtime settings to control the timeout
.com.mendix.webui.HybridAppLoginTimeOut: Determines how many minutes your token will remain valid before re-authenticating using your full credentials. This setting defaults to -1, which is equal to no timeout.-1
https://docs.mendix.com/refguide/custom-settings/#web-client-settings
Although the runtime setting is called "hybrid" this applies for native mobile apps too.