Back to All

Top Navigation Bar - Dynamic Titles

I added the following code to handle Dynamic Titles for the Top Navigation Bar:


if (navigator.userAgent.indexOf('median') > -1) {
	// Set Dynamic Titles on Top Navigation Bar
  median.navigationTitles.set({
    active: true,
    persist: true,
    titles: [
      {
        title: 'News',
        regex: '.*/news/.*'
      }
    ]
  })
}

When I tested it on the simulator, it worked well as intended on iOS. Specifically, when it matched the condition 'regex: './news/.'', the title displayed as 'News'.

However, on Android, it briefly shows as 'News' but then changes back to the default title.

Could you help me prevent this issue?

Thanks.
Woojin Oh