📖 View this page in our documentation

iOS

Android

/* Auto New Windows Configuration */
[
  {
    "regex": "https://gonativeio.github.io/gonative-demos/auto-new-windows-demo.html/?",
    "level": 1
  },
  {
    "regex": "https://gonativeio.github.io/gonative-demos/contact.html/?",
    "level": 2
  },
  {
    "regex": "https://gonativeio.github.io/gonative-demos/about.html/?",
    "level": 3
  }
]
/* Set Auto New Windows */
var json = JSON.stringify({
    active: true,
    levels: [{
      regex: "https://gonativeio.github.io/gonative-demos/auto-new-windows-demo.html/?",
      level: 1
    }, {
      regex: "https://gonativeio.github.io/gonative-demos/contact.html/?",
      level: 1
    }, {
      regex: "https://gonativeio.github.io/gonative-demos/about.html/?",
      level: 2
    }]
});

window.location.href = 'gonative://navigationLevels/set?persist=true&data=' + encodeURIComponent(json);
/* Revert Auto New Windows */
if (navigator.userAgent.indexOf('gonative') > -1) {
  window.location.href = 'gonative://navigationLevels/set?persist=true';
}