title: Background Task to run even when Application is closed
body: <p>I am trying to read from my Firebase database even when my application is closed. How do I create a thread or background task which runs even when the app is closed. I need it to be connected to the internet.</p>
  
  <p>I also tried to use Firebase Cloud Messaging to recieve notifications but I cannot send any message from phone X to phone Y.</p>