Automatic transition from one screen to another screen in mobile

I want the screen1 to automatically transit to screen2 after screen1 displaying the contents for few seconds. Is there any technique like a Javascript funtion or any other steps to be followed?

Solution

Hi Kush,

You  can use below  steps:

  1. First create a client action to navigate to "SwipeScreen" screen. 
  2.  On ready call below JS node
  3. On destroy clear the timeout.


Hope it will help you.

Cheers ,

Dileep

Thank you so much dileep. It's working! :)

mvp_badge
MVP

Hi Kush,y

You can use the ready event of your screen.

Add a JavaScript node and include a JavaScript setTimeout() function. Set the setTimeout function and set the timeout in milliseconds. Use $Resolve() inside the timeout function block to run the JavaScript synchronically, to ensures the action flow of the ready event only continues when the timeout is finished. After the JavaScript node add a destination node to navigate to the next screen.

setTimeout(function(){ 

     $Resolve();

 }, 3000);


regards,

Daniel

Hey Daniel,

I tried doing the same as you mentioned above. But nothing worked. 

I'm posting the images of my implementation, check once. In the below images I'll navigate to "Awesome" screen manually. Now I wanted the "Awesome" screen to automatically navigate to "SwipeScreen" screen.



Solution

Hi Kush,

You  can use below  steps:

  1. First create a client action to navigate to "SwipeScreen" screen. 
  2.  On ready call below JS node
  3. On destroy clear the timeout.


Hope it will help you.

Cheers ,

Dileep

Thank you so much dileep. It's working! :)

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.