Thanks for your reply.
I'll study the tutorial you referenced and see how to integrate AsyncStreamsText
While waiting for help, I found in the original HC-5 classic code. The sub "Activity_Pause" was empty. So when exiting the application the Astreams remained running.
I added this to the Main section
Sub Activity_Pause (UserClosed As Boolean) 'modified
If UserClosed Then
CallSub(Starter, "AST_Close_Starter")
End If
End Sub
And in the Starter section this
Sub AST_Close_Starter
ast.Close
connected = False
CallSub(Main, "SetState")
End Sub
Now when I exit the app it disconnects the bluetooth. Not sure if this is the best way. Attached is full project.