mirror of
https://github.com/jberkel/sms-backup-plus.git
synced 2026-04-25 17:05:59 +03:00
[GH-ISSUE #572] Use SyncManager/JobManager to run backups in the background #489
Labels
No labels
AM+RCS
FAQ
awaiting response
backup
bespoke
bug
calendar
call log
cannot reproduce
cloudless
device-specific
documentation
dual- & multi-SIM
duplicate
feature-request
fixed in beta
good first issue
half-missing
help wanted
helpful
meta
misattribution
mms
other message sources
pull-request
question
rejuvenation
restore
schedule
security
stale
task
thanks
v1.5.1
v1.5.10
v1.5.11
v1.5.2
v1.5.3
v1.5.3
v1.5.4
v1.5.4
v1.5.5
v1.5.5
v1.5.6
v1.5.7
v1.5.8
v1.5.9
v1.6β
xoauth
~$ bounty $~
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/sms-backup-plus-jberkel#489
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jberkel on GitHub (Jul 16, 2015).
Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/572
Originally assigned to: @jberkel on GitHub.
Should work more reliably than existing solution.
@RodMyers commented on GitHub (May 7, 2016):
Since you closed my issue #507, I'll reply here
did an upgrade on the OnePlus One, and re-rooted the phone. seems something fixed something and it now works as advertised
@jberkel commented on GitHub (Jun 1, 2016):
Alternative to SyncManager API: JobScheduler (Lollipop+).
Android N adds trigger for content provider updates.
For older devices: Firebase JobDispatcher
@jakabp commented on GitHub (Oct 27, 2016):
Do you have any updates when can you release this fix?
@jberkel commented on GitHub (Oct 29, 2016):
I started to work on this recently, should be ready in the next 1-2 months.
@eole210 commented on GitHub (Nov 23, 2016):
I am hitting this problem as well, works for some time, sometimes even after a reboot, but then, just stops processing auto backup. Manual backups are always fine. My understanding is that the app has to be launched regularly for auto backup feature to work as expected. Can I use any "automation" app to do that (I am using Trigger and MacroDroid, which I prefer) or really those you are mentioning?
BTW, a big thank you for this great app, I wish I could create something like that myself :-).
@YMJH commented on GitHub (Dec 13, 2016):
Yes this is happening to me too. All I do is remember to manually backup. I have a Samsung Galaxy Note 4 and think it's probably something to do with that (I'm not techie though).
On behalf of others I am sorry you have received such criticism in previous posts (since 2013) jberkel. I still really appreciate the software as when I manually backup it works as well as ever. I just have to remember to do so. Worse things in life have happened than this.
Hope you have a great holiday season. Cheers.
@eole210 commented on GitHub (Dec 14, 2016):
+1
I think that problem is now solved in my case. Let me share what I did, if this can help anyone, even non techies. First, I had the phone not considering SMSBackup+ when it wants to shut down apparently inactive apps. In my case, this is done through the battery saver setting, where I listed this app and another one to be exempted of being touched by feature. This improved a lot, but not 100%. To reach 100% I had to configure the phone to automatically reboot once a week. So every Saturday, at 4:55AM the phone will shut down and at 5:00AM it will turn back on. Initially, I had this auto-reboot occurring every night and since then had not a single failure. Now I changed this to once a week.
I am a new Android user and heard that version 6.0 is now changing things and, by default, enabling this power saving which turns off apps. Maybe that's why many SMSBackup+ users are facing this issue.
Hope this helps.
@YMJH commented on GitHub (Dec 14, 2016):
Thank you very much for taking the time to post your solution eole210. I have just done as you've suggested and shall await the result.
I'd again like to say how fabulous SMS Backup+ is. Full credit to jberkel. I so admire these talented people who can invent such software that assists so many people. I would love to have talent like that :) .
Obviously you know your way around software too eole210. Well done !
Cheers :) .
@eole210 commented on GitHub (Dec 20, 2016):
Thanks YMJH. Please let us know if the workarounds worked for you as well.
@YMJH commented on GitHub (Dec 21, 2016):
Hey....look at that eole210. Seems to have worked. Have just checked and there were no SMS's or calls that needed manually backing up from the last time I posted and viewed your solution. All had been automatically backed up. Thank you very much. And a massive thank you to the inventor jberkel.
Have a lovely holiday season everyone :)
@MadsAndreasen commented on GitHub (Aug 2, 2017):
Hi Jan
I am running in to this issue as well. I'd like to help out creating a solution for this.
I know that there is a couple of issues, like moving to gradle etc that also needs to be taken care of.
So if you are interested I am able to help out. Let me know if you are interested.
Best regards,
Mads
@Billy4130 commented on GitHub (Aug 6, 2017):
I have used SMSBackup+ for many years and just recently went to a Samsung S8 series phone and am also having the issue with the automated back up not functioning any longer :( Sure wish we could get a fix for the newer phones where this would work again.
@MilanKerslager commented on GitHub (Aug 24, 2017):
On Samsung Galaxy S7 (Android 7.0) backup does not work even SMSBackup+ is selected as not to be optimised in battery settings.
Edit: I changed the backup interval, exited settings, and then changed it back, and the automatic backup works now.
Edit2: even it "works", it is not reliable. Sometimes it does not work. Sometimes it reports an error message to the notification area... Going to test Beta-version by joining beta program at https://github.com/jberkel/sms-backup-plus
@ecuamami commented on GitHub (Aug 29, 2017):
I am having similar issue where the app works great and backups all my texts except from one particular user. This just happened when I switched to Samsung s8 phone. Is there a reason it's only affecting one person's texts which is the one person I need to file? Please help!
@brunoni7985 commented on GitHub (Sep 9, 2017):
Been using sms backup+ for years but now it doesn't seem to backup at all.
Using note 8. I would any tips or advice to get it working again. Thanks.
@ghysla13 commented on GitHub (Oct 20, 2017):
We have two Samsung Note phones ( 5 and 8 ) and both have not been functioning for the auto backup. Manual backup works fine. We have set both of them to have the device management not sleep this app and provided as much memory as needed and yet the auto backup still does not function.
@Billy4130 commented on GitHub (Oct 22, 2017):
All,
For what it's worth I downloaded the Beta (using the invite link on Jan's
page) and Have now disabled "use Wi-Fi only" and my automated 24hr back ups
are now working again! May be a temporary fix for some of you folks to try
out.
Billy
On Oct 20, 2017 9:15 AM, "ghysla13" notifications@github.com wrote:
@jberkel commented on GitHub (Oct 29, 2017):
The new beta version (1.5.11-BETA5) contains the JobManager scheduler. Please try it out and let me know the results.
@Billy4130 commented on GitHub (Oct 29, 2017):
Although I can't isolate the situation - mine does not seem to function on
the beta version unless I uncheck the Wi-Fi only flag. After having done
that, it seems to work although I have noticed a few days it did not back
up though it was scheduled to.
My phone is usually not more than 30 or 40ft from my Wi-Fi router at home
when the back up happens so while it may be a signal/service issue I think
something else is going on.
On Oct 29, 2017 2:22 PM, "Jan Berkel" notifications@github.com wrote:
@jberkel commented on GitHub (Oct 29, 2017):
@Billy4130 a few people have reported this. I'll see if using API calls from more recent Android versions will fix it.
@ghysla13 commented on GitHub (Nov 2, 2017):
I've installed the bata on both phones and it worked for the first few days
but as of this morning, there has been no backups again on both phones.
We've done reboots of the phones to see if this would "refresh" the
activity but the app is still in idle...
On Sun, Oct 29, 2017 at 1:22 PM, Jan Berkel notifications@github.com
wrote:
--
Thanks again ~
Greta
@jberkel commented on GitHub (Nov 2, 2017):
@ghysla13 I have some ideas why it could stop working. I'll release another beta soon. Thanks for testing!
@Billy4130 commented on GitHub (Nov 15, 2017):
My last (daily) auto backup was Nov 6 :( not working again it seems.
On Nov 2, 2017 11:35 AM, "Jan Berkel" notifications@github.com wrote:
@jberkel commented on GitHub (Dec 9, 2017):
Ok, there's a new beta available (1.5.11-beta6) which hopefully fixes some of the issues. Please give it a try.
@Billy4130 commented on GitHub (Dec 9, 2017):
Installed and will use - thank you!
On Sat, Dec 9, 2017 at 5:29 AM, Jan Berkel notifications@github.com wrote:
@ghysla13 commented on GitHub (Dec 13, 2017):
We installed last Saturday and it's worked up to today... now it's back to
where I have to do manual push.
On Sat, Dec 9, 2017 at 4:29 AM, Jan Berkel notifications@github.com wrote:
--
Thanks again ~
Greta
@MilanKerslager commented on GitHub (Dec 13, 2017):
Version 1.5.11: I am still getting notification about SMSBackup+ error: Cannot connect to host.
It seems like app is woken up when phone was sleeping or so. I have unlimited mobile data plan and the data are always on and I am in a fully covered area of 4G network.
@jberkel commented on GitHub (Dec 13, 2017):
@ghysla13 bummer. can you enable the sync log and send me a copy, after it starts failing? maybe reinstall the app first.
https://github.com/jberkel/sms-backup-plus#i-want-to-file-a-bug-report-what-should-i-do
@ghysla13 commented on GitHub (Dec 13, 2017):
I will work on that - might not be today or tomorrow...but soon
On Wed, Dec 13, 2017 at 11:17 AM, Jan Berkel notifications@github.com
wrote:
--
Thanks again ~
Greta
@jberkel commented on GitHub (Dec 13, 2017):
@MilanKerslager that's weird. the new code is only supposed to wake up when there is connectivity. unfortunately i don't have an android phone so I can't debug this myself. i'll release a new version with some more logging, maybe there's something i've overlooked.
@MilanKerslager commented on GitHub (Dec 14, 2017):
I have a log when backup failed. It seems like it was when I was calling this time so 4G was downgraded to Edge. See attached log file at 14-12 18:27.
sms_backup_plus.log
@jberkel commented on GitHub (Dec 20, 2017):
@MilanKerslager thanks. it looks like the connection is sometimes failing, but then the backup succeeds later. i'll make some changes to retry connection errors more aggressively but intermittent connection problems are to be expected on mobile.
@MilanKerslager commented on GitHub (Dec 20, 2017):
@jberkel The next (succesfull) try in the log was run by my manual intervention. The error notification should occur only after a bunch of retries. Also if there is an EDGE (or even GPRS) internet connection, the backup will fail probably because of timeouts...
@jberkel commented on GitHub (Dec 20, 2017):
@MilanKerslager there's a new beta (1.5.11-beta7) which implements some of the logic i mentioned. please give it a try (might take some time to rollout everywhere)
@ghysla13 commented on GitHub (Dec 23, 2017):
I turned on the logging of the Note 8 giving it a few days to collect data
and also we're upgrading the Note 5 to a Note 8 as well. In the set up of
the new phone, saw a feature that can not be turned off stating that any
app that is "untouched" for more than 3 days goes into a deactivated sleep
state. This seems relative since when we first installed the beta version,
the first few days it worked fine on the original Note 8. We had already
set the beta app to a "non-monitored" app for the memory and battery usage
but don't see a way around this automatic sleep function.
On Wed, Dec 13, 2017 at 11:21 AM, Greta Lindblad ghysla13@gmail.com wrote:
--
Thanks again ~
Greta
@jberkel commented on GitHub (Dec 23, 2017):
@ghysla13 this sounds like Android's "App Standby" mode. It's possible that the backup will only be done when charging. The docs aren't quite clear on that:
I need to do some more testing with standby enabled.
@Kelvino9 commented on GitHub (Jan 9, 2018):
Is automatic backup possible without using Gmail? I'm using another mail provider and Auto backup and Auto backup settings is greyed completely.
@jberkel commented on GitHub (Jan 9, 2018):
@Kelvino9 yes, that should be possible, sounds like a bug. i'll release a new beta soon with a fix.
@jberkel commented on GitHub (Jan 10, 2018):
@Kelvino9 please give 1.5.11-BETA8 a try
@Kelvino9 commented on GitHub (Jan 10, 2018):
@jberkel I just tested BETA8 and the auto backup works flawless. Gave it two tries and both SMS were uploaded to my mailbox without an issue.
About the "Regular schedule" setting; does the 24 h schedule start at a specific time or exactly 24 hours after you set it? If so then I'll need to re-set it again for tomorrow evening instead of right now.
Thanks again for your quick support and fast bug fixing.
Any further required testing I can do for you tomorrow. It's bed time for me now ;)
@jberkel commented on GitHub (Jan 10, 2018):
@Kelvino9 it's not an exact time interval – the OS decides when to schedule the backup, based on connectivity, battery status etc. therefore it might be a bit more than 24h. but yes, it should be roughly 24h after you set it.
@FrankInSF commented on GitHub (Jan 24, 2018):
@jberkel I just want to say thank you and that ever since the new scheduler was introduced in a 1.5.11 beta, my backups have been working fine. Automatic backups stopped working for me a couple of years ago and so I had been tapping the Backup button whenever I remembered. Now Regular schedule and Incoming schedule both work reliably.
Samsung Galaxy S7 on Sprint (US), Android 7.0, version G930PVPU5BQL1
@MilanKerslager commented on GitHub (Jan 24, 2018):
I had error message in notification area even signal was Ok, but the phone was sleeping. I was able to backup manually just right then by hand.
sms_backup_plus-2.log
sms_backup_plus.log
@jberkel commented on GitHub (Jan 24, 2018):
@MilanKerslager it looks like the app wakes up and doesn't have network access. i'm not sure what I can do about that, since the new scheduler is specifically set to only wake up when there's network.
@MilanKerslager commented on GitHub (Jan 24, 2018):
I have unlimited data plan, constantly enabled mobile data, no WiFi. I was looking at the sleeping phone, when notification arived, I waked it up and checked Internet connection and it worked as ususally (hi-speed 4G or 4G+).
The notification is worthless as it should work later with no problem. I would like to see a notification only when there is real problem with many errors. I don´t like to be notified with every unsuccessful backup.
Maybe there should be user-defined counter (20 retries and more than a day or so).
@jberkel commented on GitHub (Jan 24, 2018):
@MilanKerslager OK. It's tricky to define what a permanent / serious failure is, and I'm hesitant to add more configuration options at the moment. It should probably distinguish between temporary and permanent failures, and never notify on temporary ones.
@jberkel commented on GitHub (Jan 24, 2018):
@FrankInSF thanks for letting me know. I've spent a lot of time trying to make this more reliable, but this seems to be tricky, not many users have reported improvements so far.
@Billy4130 commented on GitHub (Jan 24, 2018):
Mine has for the most part been updating and working as expected but I have
also gotten the error message about not being able to connect when the
phone was sitting in wifi and had cellular service. The next day though it
processes fine on its own. Two different occasions from what I recall.
I'd say for me personally I'm at about 98% functionality now on the
automated back up :)
On Wed, Jan 24, 2018 at 5:42 AM, Jan Berkel notifications@github.com
wrote:
@Erganomulos commented on GitHub (Jan 27, 2018):
I'm unable to back up anything either manually or automatically. It will display that there are zero out of thousands of text messages to back up but then the denominator number will start counting down with the numerator not changing from zero. All of a sudden we will get to the end and it will say there are no items to back up. I had it working for a very long time then when I changed to this phone it all of a sudden stopped working. I have a Pixel phone. I also have screen shots of what's happening.
@Lgaljour777 commented on GitHub (Jan 29, 2018):
@jberkel I am using 1.5.11 beta for a minute now and everything seems to be back to normal. Thank you for your time on this. Keep up the great work.
@MilanKerslager commented on GitHub (Jan 30, 2018):
I've got error notification after a day without backup even I'm using data/Internet access through whole day (only unlimited mobile data). If backup fails, is it possible to reschedule backup few seconds/minutes later (after data connection become stable)? 1.5.11-beta12
sms_backup_plus.log
@ecuamami commented on GitHub (Jan 30, 2018):
how is everyone getting the 1.5.11 beta version? what do i look for in app store to download?
@MilanKerslager commented on GitHub (Jan 30, 2018):
@ecuamami go and read/join at main page of the project here at https://github.com/jberkel/sms-backup-plus
@coderonline commented on GitHub (Mar 3, 2018):
Is it possible that automatic backup is greyed out together with OAUTH? I am using 1.5.11-beta7 from the f-droid store on the lineageos based on android 7.1.2 and I am NOT using the built-in data saver, manual backups work fine, but the option greyed out for me.
@jberkel commented on GitHub (Mar 3, 2018):
@coderonline I think this has been fixed in one of the newer betas. f-droid is a bit behind, I'll try to update it.
in the meantime you could install the APK via https://github.com/jberkel/sms-backup-plus/releases
update: F-Droid now has a version with a fix
@fezzzza commented on GitHub (Mar 25, 2018):
It seems to me that AutoBackup fails every time the app is updated from the Play Store, which prompts the "about" screen to update the user on the latest bug fixes etc. No functionality will resume before the "about" screen is dismissed. Could it be that doing away with the automatic pop-up of the "about" screen will allow the backups to continue in the background, or should I post a separate bug?
@jberkel commented on GitHub (Mar 25, 2018):
@fezzzza could you explain a bit more? so you have the beta installed, auto backup works fine, a new update is installed (automatically in the background), automatic backups stop working until you manually launch the app and dismiss the screen?
It could be that the app gets classified as "never used" after install which means it is exempted from accessing certain resources in the background (App Standby).
I'm not sure what to do about it, since users normally don't need to interact with the app. It could either periodically sent a notification (after a successful backup), or get explicitly whitelisted by the user.
if it's just between app updates it's not a big problem since regular (i.e. non-beta) updates don't happen that often.
@Billy4130 commented on GitHub (Mar 25, 2018):
I'm not sure that I have the exact same error but I have experienced
something very similar (and just did this morning actually)
On Sun, Mar 25, 2018, 9:00 AM Jan Berkel notifications@github.com wrote:
@MilanKerslager commented on GitHub (Mar 25, 2018):
Same problem here. I check it out. About screen pops up, I had last successful update 3/23. And last beta version update was 2 days ago (3/23). Samsung Galaxy S7, Android 7.0 (2/1/2018), SMS Backup+ 1.5.11-beta17
@fezzzza commented on GitHub (Mar 25, 2018):
@jberkel I don't think I have the beta installed. I just installed the app from the Play Store. All I know is that Autobackup stops working periodically and when I check with the app, it prompts me with the about screen and tells me the last successful backup was x days ago. Clearing the "about" screen and doing a manual backup seems to allow autobackup to continue, but I haven't kept a close eye on how frequently the backups are. Perhaps adding a (possibly hidden and default=false) option "show notification on successful autobackup" would allow us to monitor when the app is working so that we can figure out the next step. Or how about an option to keep(and maybe even automatically send back to you) a circular log file of whenever autobackups are done? I'd want more detail than just that in the log. 1MB should be more than enough for a circular log and take up so little space on the beta users' phone - especially only when the user selects the (possibly hidden) option. I would suggest logging (even just among the beta group) is the key to pinpoint what is causing it, starting with pinpointing when it stops. Btw, I have Samsung Galaxy S7 edge, Android 7.0, and I'm a programmer who rambles a lot!!!
@jberkel commented on GitHub (Mar 25, 2018):
@fezzzza the about screen should only show once (after an update). if not, you're very likely in the beta group (what's the version number displayed in about?). i'd suggest installing the beta since it has many fixes, esp. regarding auto backup.
@fezzzza commented on GitHub (Mar 25, 2018):
@jberkel About shows v1.5.11 and I'm pretty sure the About page shows every time the app is launched after an auto-update
@jberkel commented on GitHub (Mar 25, 2018):
@fezzzza 1.5.11 is the beta version, and it's normal that about is launched after updates (although it'll often display the same for betas)
@jberkel commented on GitHub (Mar 25, 2018):
Here's a thing you could check when auto backup fails to run the next time: see if Android has deactivated the app (= App Standby). (do this before you launch SMS Backup+, as this will re-activate it)
(steps 1 and 2 only need to be performed once)
See if SMS Backup+ is listed there as "Inactive" (see screenshot), and let me know if it is (just post to this thread)
@fezzzza commented on GitHub (Mar 25, 2018):
Ok, I'll watch and wait for the next update and then experiment
@Woi commented on GitHub (Apr 3, 2018):
I did launch SMS Backup+, but still no automatic backups. Neither after calls I made, nor the scheduled backup which should run every 6h.
Samsung Galaxy S3 (i9300), LineageOS 14.1 for MicroG (Builddate 20180322), SMS Backup+ 1.5.11-BETA18, Battery optimization disabled for SMS Backup+
@jberkel commented on GitHub (Apr 3, 2018):
@Woi can you check if the app is marked as "inactive"? contents of sync log?
@Woi commented on GitHub (Apr 19, 2018):
The app is marked as
active. Checked this with my device running for a while, as well as immediately after a reboot.Sync log contains absolutely no data regarding automatic backups. Only manual ones are listed (
backupType=Manual).Detailed Logis enabled.@ghysla13 commented on GitHub (Jun 28, 2019):
Jan -
I've received this notice regarding the SMS Backup+ app from Google/Gmail -
is this being addressed?
"Hi,
Although you don’t need to do anything, we wanted to let you know that the
following apps may no longer be able to access some data in your Google
Account, including your Gmail content. If these apps are unable to meet the
deadline to comply with our updated data policy requirements, they'll lose
access to your Account starting July 15th, 2019.
SMS Backup+
We are making this change as part of ongoing efforts to make sure your data
is protected and private.
You can always view, manage and remove apps you’ve given access to your
account by visiting your Google Account.
Thanks,
The Google Accounts team"
--
Thanks again ~
Greta
@MrUzagi commented on GitHub (Jun 28, 2019):
This is already adressed at length in #959.