Hi,

     I am building a mobile application. I need to track the time, a specific user spending on a specific screen. Is there a way to find it?


Regards,

Gowtham

Hi Gowtham,

In your screen you can create a local variable with datatype "DateTime". In you screen, you can use the Event "OnInitialize" to set the local variable to the CurrDateTime().

After that, you can use se Event "OnDestroy" to catch the difference between of the currDateTime() with you local variable.

Regards.

Hi Gowtham,

Your best bet is to search for a plugin on the Forge.  Be sure to select a plugin that works on mobile, not just web.

Here are some I just searched for:

https://www.outsystems.com/forge/component-overview/4991/firebase-mobile

https://www.outsystems.com/forge/component-overview/714/AdoptionMonitor/

If possible, you could add a cordova analytics plugin like this one

https://www.npmjs.com/package/cordova-plugin-google-analytics

I hope this helps!

Kind regards,

Stuart

Paulo Cação wrote:

Hi Gowtham,

In your screen you can create a local variable with datatype "DateTime". In you screen, you can use the Event "OnInitialize" to set the local variable to the CurrDateTime().

After that, you can use se Event "OnDestroy" to catch the difference between of the currDateTime() with you local variable.

Regards.

Hi Paulo,

     Thanks for your reply. My issue here is I need to navigate the user to another screen, after the user used the specific screen for a specified amount of time.

For example,

     Consider the user is in a screen for 20 seconds, at this point of time nothing has to happen. If the user is in the screen for more than 45 seconds without any activity I need to navigate a user to another screen or need to open a popup automatically. Is this achievable?


Stuart Harris wrote:

Hi Gowtham,

Your best bet is to search for a plugin on the Forge.  Be sure to select a plugin that works on mobile, not just web.

Here are some I just searched for:

https://www.outsystems.com/forge/component-overview/4991/firebase-mobile

https://www.outsystems.com/forge/component-overview/714/AdoptionMonitor/

If possible, you could add a cordova analytics plugin like this one

https://www.npmjs.com/package/cordova-plugin-google-analytics

I hope this helps!

Kind regards,

Stuart

Hi Stuart,

     Thanks for your reply. I don't need the report of the user. I need to perform action on the screen based on the tracked time.


Gowtham wrote:

I don't need the report of the user. I need to perform action on the screen based on the tracked time.


My issue here is I need to navigate the user to another screen, after the user used the specific screen for a specified amount of time.



Hi Gowtham,

For that you can you setTimeout. On the OnReady of the page set a JS to call an action after X milliseconds:


Then on the NavigateAway action, simply navigate to the other screen (or adjust the logic to do whatever you need to do)


Cheers,

André