Bluetooth connection should remain active even when screen is off

I am trying to make an app to receive signal from PIR motion sensor attached to arduino through a bluetooth connection. I want to keep.the mobile in passive mode and get activated if a motion is detected. But the bluetooth connection between my HC05 and mobile break as soon as mobile screen turn off. How can i keep the bluetooth connection active in background and wake up the mobile screen as soon as a motion is detected. I am new to MIT App Inventor.

MIT AppInventor cannot operate background services.

It can be done with a different programming language. You can try Google’s Android Studio to program in Java or Kotlin, or B4A (Basic For Android), an easy-to-code language related to Basic.

Thanks for the updates.

3 posts were merged into an existing topic: App Inventor Services: this "services" service is obsolete