0

I'm developing an application in Flutter and I would like to add a feature that allows receiving background notifications for new orders, even when the app is closed or in the background. After receiving a new order notification, I want the app to open a screen with the order details without using local notifications or Firebase Cloud Messaging (FCM).

I've looked into WorkManager and it seems like it could be helpful for performing background tasks, but I'd like some guidance and specific examples on how to use WorkManager to receive background notifications for new orders and display a screen with the order details when the app is closed or in the background, and how to bring the app to the foreground when the mentioned screen is opened.

Can anyone provide me with a code example in Flutter that demonstrates how to implement this functionality using WorkManager without using FCM or local notifications?

I would greatly appreciate any help or suggestions you can provide.

Thank you!

4
  • Its not possible. The only way to get external information to the app is via push, and additionally push cannot launch the app if its terminated, and even if not terminated, you can't get the app to automatically launch a view without any sort of user interaction i.e. without alerting them via a notification Commented Jul 31, 2023 at 18:52
  • The Indriver application has this functionality that shows a view even when closed and in the background, so it is possible. Commented Jul 31, 2023 at 18:55
  • here is an example: firebasestorage.googleapis.com/v0/b/… Commented Jul 31, 2023 at 19:00
  • I should have added the part "on iOS". It's very annoying when a ticket is tagged with both iOS and Android. You should split your question into iOS and Android because the platforms, and what's possible, are so different in this area. If your app has location functionality? that opens options up a little more on iOS, but if that is the case, you neglect to say so in your question. Commented Jul 31, 2023 at 20:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.