[GH-ISSUE #2] Mark restored messages as read #1

Closed
opened 2026-02-26 00:35:59 +03:00 by kerem · 13 comments
Owner

Originally created by @erikwt on GitHub (Mar 14, 2010).
Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/2

When restoring messages, they appear as unread messages in the SMS application.

Originally created by @erikwt on GitHub (Mar 14, 2010). Original GitHub issue: https://github.com/jberkel/sms-backup-plus/issues/2 When restoring messages, they appear as unread messages in the SMS application.
kerem closed this issue 2026-02-26 00:36:00 +03:00
Author
Owner

@jberkel commented on GitHub (Mar 14, 2010):

do they all consistently appear as unread? which phone/version of android are you using?

<!-- gh-comment-id:158646 --> @jberkel commented on GitHub (Mar 14, 2010): do they all consistently appear as unread? which phone/version of android are you using?
Author
Owner

@erikwt commented on GitHub (Mar 29, 2010):

All restored messages were marked unread. I compiled your source myself on target 'android 2.1' and ran it on a custom 2.1 rom (Villain) on my HTC Hero.

<!-- gh-comment-id:172128 --> @erikwt commented on GitHub (Mar 29, 2010): All restored messages were marked unread. I compiled your source myself on target 'android 2.1' and ran it on a custom 2.1 rom (Villain) on my HTC Hero.
Author
Owner

@jberkel commented on GitHub (Mar 29, 2010):

could you post the x-smssync headers of one of your backed up emails here? i've only tested with 1.6 so far.

<!-- gh-comment-id:172135 --> @jberkel commented on GitHub (Mar 29, 2010): could you post the x-smssync headers of one of your backed up emails here? i've only tested with 1.6 so far.
Author
Owner

@erikwt commented on GitHub (Mar 29, 2010):

X-smssync-id: 2866
X-smssync-address: +**********
X-smssync-type: 1
X-smssync-date: 1269865905000
X-smssync-thread: 1
X-smssync-read: 1
X-smssync-status: -1
X-smssync-protocol: 0
X-smssync-service_center: +**********
X-smssync-backup_time: 29 Mar 2010 12:32:28 GMT

<!-- gh-comment-id:172255 --> @erikwt commented on GitHub (Mar 29, 2010): X-smssync-id: 2866 X-smssync-address: +********** X-smssync-type: 1 X-smssync-date: 1269865905000 X-smssync-thread: 1 X-smssync-read: 1 X-smssync-status: -1 X-smssync-protocol: 0 X-smssync-service_center: +********** X-smssync-backup_time: 29 Mar 2010 12:32:28 GMT
Author
Owner

@jberkel commented on GitHub (Mar 29, 2010):

looks like the sms gets serialized properly (smssync-read: 1). there's probably some db trigger setting all new messages to unread on 2.1. i'll try it in an emulator.

<!-- gh-comment-id:172542 --> @jberkel commented on GitHub (Mar 29, 2010): looks like the sms gets serialized properly (smssync-read: 1). there's probably some db trigger setting all new messages to unread on 2.1. i'll try it in an emulator.
Author
Owner

@jberkel commented on GitHub (Mar 29, 2010):

sorry can't reproduce. you might need to wait until the end of the restore, the threading data will get updated then. if you want to some further debugging, you could pull the sms db off your phone and inspect it manually:

$ adb pull /data/data/com.android.providers.telephony/databases/mmssms.db .
$ sqlite3 mmssms.db
sqlite> select * from sms where read = 0;
<!-- gh-comment-id:172627 --> @jberkel commented on GitHub (Mar 29, 2010): sorry can't reproduce. you might need to wait until the end of the restore, the threading data will get updated then. if you want to some further debugging, you could pull the sms db off your phone and inspect it manually: ``` $ adb pull /data/data/com.android.providers.telephony/databases/mmssms.db . $ sqlite3 mmssms.db sqlite> select * from sms where read = 0; ```
Author
Owner

@ntziolis commented on GitHub (May 5, 2010):

Had a very similar issue, but for me NOT ALL restored sms were marked as unread, just about 70 out of 360.

I added one of the headers:

X-smssync-id: 298
X-smssync-address: +
X-smssync-type: 1
X-smssync-date: 1270805793000
X-smssync-thread: 40
X-smssync-read: 0
X-smssync-status: -1
X-smssync-protocol: 0
X-smssync-service_center: +
X-smssync-backup_time: 9 Apr 2010 09:37:27 GMT

I checked a couple of the 70 messages and they all had the header:
X-smssync-read: 0

My guess is that the messages were backed up before I could read them. Maybe on restore they should always been set to read, or when pressing restore you should be asked if all restored messages should be set to read or if the value in the header should be taken.

My Setup:
HTC Hero, Android 2.1, Villain 5.5 Custom ROM

<!-- gh-comment-id:230218 --> @ntziolis commented on GitHub (May 5, 2010): Had a very similar issue, but for me <strong>NOT ALL</strong> restored sms were marked as unread, just about 70 out of 360. I added one of the headers: X-smssync-id: 298 X-smssync-address: + X-smssync-type: 1 X-smssync-date: 1270805793000 X-smssync-thread: 40 <strong>X-smssync-read: 0</strong> X-smssync-status: -1 X-smssync-protocol: 0 X-smssync-service_center: + X-smssync-backup_time: 9 Apr 2010 09:37:27 GMT I checked a couple of the 70 messages and they all had the header: X-smssync-read: 0 My guess is that the messages were backed up before I could read them. Maybe on restore they should always been set to read, or when pressing restore you should be asked if all restored messages should be set to read or if the value in the header should be taken. My Setup: HTC Hero, Android 2.1, Villain 5.5 Custom ROM
Author
Owner

@jberkel commented on GitHub (May 5, 2010):

ah of course, was this with automatic backup enabled? good idea to make it an option on restore, i'm going to implement that.

<!-- gh-comment-id:230219 --> @jberkel commented on GitHub (May 5, 2010): ah of course, was this with automatic backup enabled? good idea to make it an option on restore, i'm going to implement that.
Author
Owner

@ntziolis commented on GitHub (May 5, 2010):

yes indeed, automatic backup was enabled.

Nice to hear that its going to be in the next version. Any clues why the restore is not in the main trunk by now? At least as experimental feature?

<!-- gh-comment-id:230221 --> @ntziolis commented on GitHub (May 5, 2010): yes indeed, automatic backup was enabled. Nice to hear that its going to be in the next version. Any clues why the restore is not in the main trunk by now? At least as experimental feature?
Author
Owner

@jberkel commented on GitHub (May 5, 2010):

I sent the original author several emails, asking whether he planned to merge my changes back in, but haven't heard back from him since. There have been no commits on the main project since end of january, maybe he's lost interest. My plan is to do some more cleanups and then release a new version with restoring to the market. I'd like to avoid having to fork the project but i don't see any other option at the moment.

<!-- gh-comment-id:230231 --> @jberkel commented on GitHub (May 5, 2010): I sent the original author several emails, asking whether he planned to merge my changes back in, but haven't heard back from him since. There have been no commits on the main project since end of january, maybe he's lost interest. My plan is to do some more cleanups and then release a new version with restoring to the market. I'd like to avoid having to fork the project but i don't see any other option at the moment.
Author
Owner

@ntziolis commented on GitHub (May 5, 2010):

Well all you can do is try. Thx for your contributions so far. Looking forward to the new version.

<!-- gh-comment-id:230245 --> @ntziolis commented on GitHub (May 5, 2010): Well all you can do is try. Thx for your contributions so far. Looking forward to the new version.
Author
Owner

@jberkel commented on GitHub (Jul 6, 2010):

Optionally mark all messages as read on restore.

Closed by 0f581921d6cca58348ef4d19b034f7807fc22cad.

<!-- gh-comment-id:301981 --> @jberkel commented on GitHub (Jul 6, 2010): Optionally mark all messages as read on restore. Closed by 0f581921d6cca58348ef4d19b034f7807fc22cad.
Author
Owner

@jberkel commented on GitHub (Jul 6, 2010):

could you try install version 1.1.2 from http://github.com/jberkel/android-sms/downloads and see if that helps? there's now a checkbox to mark restored messages as read, in advanced settings.

<!-- gh-comment-id:302110 --> @jberkel commented on GitHub (Jul 6, 2010): could you try install version 1.1.2 from http://github.com/jberkel/android-sms/downloads and see if that helps? there's now a checkbox to mark restored messages as read, in advanced settings.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/sms-backup-plus-jberkel#1
No description provided.