added enable discoverability in onresume