How to handle device back button in Outsystems 10 Mobile app

How to handle device back button in Outsystems 10 Mobile app

  

Hi,

I am developing a mobile application. I have to restrict user from clicking back button of the device and also I want to know on how to control the application behavior when user clicks on device back button.

I tried using Javascript Api as mentioned here: https://success.outsystems.com/Documentation/10/Reference/OutSystems_APIs/JavaScript_API/Navigation

I have called a JavaScript under Required scripts (at application level). But it does not execute. My finding is that $public is not working for me. My Service Studio version is 10.0.201.0

Thanks,

Waseema.

Hi Waseema,

The $public will not work from the scripts that you place in the 'required scripts' sections (page or application level), but it does work from the JavaScript widget which you can find in the toolbar when you are in an action.

Hope this helps.

Kind regards,

Remco Dekkinga

Hi Remco,

Thanks for that quick response. But I tried that too.

I am getting an error while publishing. 

So does that mean I need to upgrade my server as well?

Thanks,

Waseema.


Remco Dekkinga wrote:

Hi Waseema,

The $public will not work from the scripts that you place in the 'required scripts' sections (page or application level), but it does work from the JavaScript widget which you can find in the toolbar when you are in an action.

Hope this helps.

Kind regards,

Remco Dekkinga



Solution

Hi Remco,

I found the issue. My server is running older version. I updated by personal environment and things are working now.


Thanks,

Waseema.

Waseema wrote:

Hi Remco,

Thanks for that quick response. But I tried that too.

I am getting an error while publishing. 

So does that mean I need to upgrade my server as well?

Thanks,

Waseema.


Remco Dekkinga wrote:

Hi Waseema,

The $public will not work from the scripts that you place in the 'required scripts' sections (page or application level), but it does work from the JavaScript widget which you can find in the toolbar when you are in an action.

Hope this helps.

Kind regards,

Remco Dekkinga





Solution