Application in the background

I have a code for communicating between a phone and an Arduino to make an alarm for a scooter. My problem is that I don’t know how to make the program run in the background (when the phone is in sleep mode or the app is closed).

Sorry for mistakes, I speak Russian.

Hi @NomMi,

processing android is imho not supporting background services, at least never heard or tested it…
You should take a closer look regarding alarms and background services/tasks for Android here…

Cheers
— mnse

Thanks for your answer, in that case, I will use android studio and processing