Closed miguelflores1993 closed 3 years ago
This is expected behaviour, see #10 Is there a specific reason you want the notification to live on after the app is closed?
Este es el comportamiento esperado, consulte el n . ° 10. ¿Hay alguna razón específica por la que desea que la notificación siga activa después de que se cierre la aplicación?
@JulianAssmann Yes, because I am applying the Offline First Mobile architecture, and I need that when the application is closed it still sends the local SQLITE data to the Amazon cloud.
Similar to WhatsApp when it is synchronizing your data and when you close it, a current notification appears.
I'm not sure this plugin is the best choice for this kind of task. This plugin keeps the Flutter app running in the background, but the Flutter runtime is terminated when the user explicitly closes the app (e.g. by swiping up in the task view). So there is no use in still holding on to the Wake Lock, as nothing would happen anyway. I don't know the specifics of your use case, but maybe something like the Android JobScheduler or the workmanager plugin might be more suitable to it. However, background execution on Android is a mess in general (see here and dontkillmyapp for more).
No estoy seguro de que este complemento sea la mejor opción para este tipo de tarea. Este complemento mantiene la aplicación Flutter ejecutándose en segundo plano, pero el tiempo de ejecución de Flutter finaliza cuando el usuario cierra explícitamente la aplicación (por ejemplo, deslizando hacia arriba en la vista de tareas). Por lo tanto, no tiene sentido seguir aferrándose al Wake Lock, ya que de todos modos no pasaría nada. No conozco los detalles de su caso de uso, pero tal vez algo como Android JobScheduler o el complemento workmanager podría ser más adecuado para él. Sin embargo, la ejecución en segundo plano en Android es un desastre en general (consulte aquí y dontkillmyapp para obtener más información). @JulianAssmann How will facebook or whatssap be able to do it? will they have their own sdk?
thanks for your clarification
You're welcome :)
Describe the bug
I bought an s10 plus phone. I just tested flutter_background and when I close the app the notification closes as well. I have seen in some applications that when the application is completely closed, a notification always remains on the screen.
To Reproduce close the application the notification closes
Expected behavior The notification should not be closed.
Screenshots none
Smartphone: Samsumg s10 + android 11