About the bluetooth connect

This is my coding, but every time I test it on my phone, as long as I click “connect”, it flash back to the home page.

Before connecting to the device you need to make sure that it is available. And you’re not even doing error checking and want to block work?

Thank you very much, but what should I do now? Should I add something or delete something? And how?

Display all blocks error. You see a list of Device Names?