M mw71 Well-Known Member Licensed User Longtime User Jan 26, 2024 #1 Hello, I have been using services for a long time (since at least 2016) for backing up data, among other things. This works well. Now these are no longer suitable for this, see here: https://www.b4x.com/android/forum/threads/receivers-and-services-in-2023.145370/ I have now added a reciver as a trial that is started at time X and only issues a notification. This works well so far. Now Erel writes in the post linked above "Receivers run for a short time." and I'm not sure if this is enough time to upload data to Google and/or an FTP server. Does anyone have experience with the correct way to do scheduled backups now (with Android 12+)? ps: can I start a service from the reciver (I think not, but I'm not sure)?
Hello, I have been using services for a long time (since at least 2016) for backing up data, among other things. This works well. Now these are no longer suitable for this, see here: https://www.b4x.com/android/forum/threads/receivers-and-services-in-2023.145370/ I have now added a reciver as a trial that is started at time X and only issues a notification. This works well so far. Now Erel writes in the post linked above "Receivers run for a short time." and I'm not sure if this is enough time to upload data to Google and/or an FTP server. Does anyone have experience with the correct way to do scheduled backups now (with Android 12+)? ps: can I start a service from the reciver (I think not, but I'm not sure)?
Erel B4X founder Staff member Licensed User Longtime User Jan 30, 2024 #2 It is no longer possible to start services while the app is in the background (=no visible activity). You can start the backup process when the app is visible, using a foreground service. Upvote 0
It is no longer possible to start services while the app is in the background (=no visible activity). You can start the backup process when the app is visible, using a foreground service.