wallforfry / dart_mercure

Dart library for dunglas/mercure
BSD 2-Clause "Simplified" License
13 stars 4 forks source link

Background exec #4

Open louia opened 4 years ago

louia commented 4 years ago

Is there any solution to have a background execution for have mercure + notification + background subscription to mercure topic ?

wallforfry commented 4 years ago

Hi @louia ! It looks like the only way to implement a background service is to use native code for iOS and Android.

This plugin allow you wake up your app periodically but it doesn't match with Mercure usage.

According to Flutter documentation, it's possible to use a native service to wake up a small part of flutter app. I think the best way is to create a PR that implements for both OSs a mercure listener and that pass received data in background to the woke up app

louia commented 4 years ago

Yes i think is a good idea. If I have the time i will do that but if anyone can start or do. (Oh un français !)