Let's follow up this discussion at the Neptune Community

(this forum will be kept in read-only mode)

Returning to an App

Hi


I have an app that loads another app and when the user hits the back button I want to be returned to the original app.


So AppA loads AppB.  When the back button on AppB is called navigate back to AppA without reloading AppA..


I use the following command to nav to AppB

AppCache.Load("AppB");


I am currently doing something like this, but we have an issue for some users and I think it could be in our code.


var navHere = "";

if (typeof(AppCacheNav) != undefined){

  navHere = AppCacheNav.getPreviousPage().sViewName; // Get the calling page

}

 

if (navHere == "" || typeof(navHere) == undefined){

  AppCache.Back();

}else{

  AppCache.Load(navHere);

}



Any pointers are greatly appreciated.

1 Comment

Hi Darren,


I have only modified one line of your code (marked in red below).  Let us know if it helps.


var navHere = "";

if (typeof(AppCacheNav) != undefined){

  navHere = AppCacheNav.getPreviousPage().sViewName; // Get the calling page

}

 

if (navHere == "" || typeof(navHere) == undefined){

  AppCache.Back();

}else{

  AppCacheNav.back();

}


Also, could you identify what error some of your users got ?


Kind regards,

Julian

Login or Signup to post a comment