Bluetooth app works randomly

I have created two app inventor apps to connect with micro:bit (one is published on Google play). The one not publsihed I have some strange problems with. It is in fact a version taken from mit app inventor example app. I pair, and after that I open the app. I select scan, then stop scan. So I select the microbit I want to connect to and then I press connect. On the micro.bit I have a code that will play a melody when the connection is OK. The melody plays, but then the app close. if I start the other app (lets say app nr 2), it will connect fine. If I, after connecting with the other app (app 2), then the first will work. I find this a bit strange.

Any suggestions?

To find out what happens, use logcat

Taifun

Or, what is the difference in the connection procedure between the two apps (show some blocks). And, what is on the micro:bit? Upload the .hex file maybe?
Does it say no pairing required?
And, what are the versions of the BLE extension and the micro:bit extensions in both apps?