1

I was wondering, given that Flutter is multi platform and each store requires its own procedure for the final step of setting up Push notifications, would it be worthwhile to implement a full "flutter proprietary push notification system" something that would ignore completely the Android/iOS and other stores implementation?

The main service that the store provides is to "find" the device in the final step of the push, this could be replaced with:

  • a subscribe / ack of this flutter layer to a server (whenever the app declares that it wants to use it), that will send the message when required (with a messaging queue?)
  • an always on instance on the phone to actually receive the push (this is probably the most critical part)

UPDATE: I am realising that this necessity will probably be covered by some sort of third party provider, such as what Crashlytics has done with error and crash reports.

Edoardo
  • 4,485
  • 1
  • 27
  • 31
  • 1
    you have to tie up with device manufacturers to make your service part of their OS – Yadu Aug 03 '20 at 09:07
  • I was mostly thinking about a service layer that would be used by each and every flutter app and that would be interfacing in the same way with other flutter apps – Edoardo Aug 03 '20 at 10:00

2 Answers2

2

Operating system push notification services (OSPNS) are provided by the Android and iOS and other platforms. If you want your messages to be shown as notifications on the notification tray/status bar you have to configure it as required by that platform and there is no other option for this. If you want to use only one push service than Huawei Push Kit might be the one to choose since it can send push notifications to all platforms Android, iOS, Huawei devices and also Web.

zhangxaochen
  • 32,744
  • 15
  • 77
  • 108
1

This is almost impossible.

Because on the basis of Android, there is a part handled by the OS in the case of push, so even if the app does not reside in memory, it can be processed. If you're going to create a Flutter-only Push system, the Flutter app should always be running as a background service (iOS is a different issue).

If you only want to be able to use push while the Flutter app is running, that might be the way to go. However, it will be difficult after the app is closed.

url link : https://developer.android.com/reference/android/app/NotificationManager

Junsu Cho
  • 826
  • 7
  • 16
  • 1
    not taking battery draining issue that will arise into account, google takes battery draining issue very seriously!! – Yadu Aug 03 '20 at 09:06