title: Flutter background Firebase communication
body: <p>In my Flutter project, I want to be able to request some data from the smartphone of the user. Now, since I use Firebase, I tried out the <a href="https://pub.dev/packages/firebase_messaging" rel="nofollow noreferrer">firebase_messaging</a> plugin. At this point, it enables me to send a <strong>notification message</strong> to the device and once I click on it, the callback is triggered that does the required logic and sends the data to firebase. </p>
  
  <p>However, my problem with this approach is that the user <strong>really needs to click</strong> on the notification in order to trigger the callback. It looks like the firebase_messaging plugin only supports notification-messages and not pure data ones. So I am kind of restricted to only executing my code once a notification is clicked on.</p>
  
  <p>My question is, is there a way to trigger my code in the Flutter app without the notification? </p>
  
  <p>I would love to be able to send some data requests to the device and receive some response back (or at least trigger some code). Maybe there is another plugin or some hacks somebody is aware of?</p>
  
  <p>Thank you in advance.</p>