For auto connect when the app starts, have a look at Android MIT App Inventor – Auto Connect To Bluetooth.
Connecting when it comes in to range is a different matter.
If Bluetooth is already connected the connection should be maintained when the module is moved out of range and back again. At least this happens for me using a Samsung device and also a Sony device.
I don't think auto-connecting when in range, when no connection exists, is possible with AI2.