title: I'm trying to develop an android and I need some advices
body: <p>I'm trying to develop an app that retrieves from firebase the state of electric doors in some different cities and if a door error exists in any city, the app would automatically call or send SMS to the manager of that specific city based on the phone number saved in the db and this app should work in the background as well, I think I must start a foreground service but I wasn't so sure because I'm a beginner, could anyone advice me please.
  here's my db structure <a href="https://i.stack.imgur.com/qaDgc.png" rel="nofollow noreferrer">db</a>.</p>