# I am created a service but not able to start service when app is going to background, foreground and reboot tv.

**URL:** <https://forum.webostv.developer.lge.com/t/i-am-created-a-service-but-not-able-to-start-service-when-app-is-going-to-background-foreground-and-reboot-tv/24840>\
**Category:** Web App Development\
**Created:** [April 6, 2025, 10:51pm UTC](https://forum.webostv.developer.lge.com/t/i-am-created-a-service-but-not-able-to-start-service-when-app-is-going-to-background-foreground-and-reboot-tv/24840 "2025-04-06T22:51:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![user1725](https://avatars.discourse-cdn.com/v4/letter/u/7feea3/32.png) [@user1725](https://forum.webostv.developer.lge.com/u/user1725)\
**Post date:** [April 6, 2025, 10:51pm UTC](https://forum.webostv.developer.lge.com/t/i-am-created-a-service-but-not-able-to-start-service-when-app-is-going-to-background-foreground-and-reboot-tv/24840/1 "2025-04-06T22:51:24Z")

</div>

I have created a service project, and it’s run in the background when the app is started. But the app is going to the background or foreground or rebooting the TV; at that time, my service is not started.

Can you please give a sample so I can create a service where we can set my background service to run in the background, foreground and wake up the TV?

---

<div class="post-metadata">

**Author:** ![narae0.kim](https://avatars.discourse-cdn.com/v4/letter/n/87869e/32.png) [@narae0.kim](https://forum.webostv.developer.lge.com/u/narae0.kim)\
**Post date:** [April 7, 2025, 7:19am UTC](https://forum.webostv.developer.lge.com/t/i-am-created-a-service-but-not-able-to-start-service-when-app-is-going-to-background-foreground-and-reboot-tv/24840/2 "2025-04-07T07:19:34Z")

</div>

Basically, the app is caller and the service is callee. A service can only be started when the app is in the foreground. And the app can only be launched by the user. Thank you.
