# Application in the background

**URL:** https://discourse.processing.org/t/application-in-the-background/37402
**Category:** Processing for Android
**Created:** [June 8, 2022, 12:57pm UTC](https://discourse.processing.org/t/application-in-the-background/37402 "2022-06-08T12:57:27Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![NomMi](https://avatars.discourse-cdn.com/v4/letter/n/58f4c7/32.png) [@NomMi](https://discourse.processing.org/u/NomMi)
#### Post date: [June 8, 2022, 12:57pm UTC](https://discourse.processing.org/t/application-in-the-background/37402/1 "2022-06-08T12:57:27Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)
#### Post date: [June 8, 2022, 1:45pm UTC](https://discourse.processing.org/t/application-in-the-background/37402/2 "2022-06-08T13:45:38Z")

</div>

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…

- [Guide to background work](https://developer.android.com/guide/background)
- [Alarms sections](https://developer.android.com/guide/background#alarms)
- [Tutorial Android Services](https://www.geeksforgeeks.org/services-in-android-with-example/)

Cheers  
— mnse

---

<div class="post-metadata">

### Author: ![NomMi](https://avatars.discourse-cdn.com/v4/letter/n/58f4c7/32.png) [@NomMi](https://discourse.processing.org/u/NomMi)
#### Post date: [June 9, 2022, 5:17pm UTC](https://discourse.processing.org/t/application-in-the-background/37402/3 "2022-06-09T17:17:27Z")

</div>

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