Syncing notification

1 view
Skip to first unread message

Mark Otway

unread,
Jul 27, 2009, 12:29:20 AM7/27/09
to Newsrob Group

Hi Mariano,

Was thinking this morning it would be useful to have a notification in the status bar to show that newsrob's syncing is in progress. I have a lot of feeds marked for offline reading, so a sync can slow the phone while it downloads the 50+ articles, and it'd be nice to have a visual cue as to why the device is laggy.

Should be less of an issue in donut, as I gather Google are working on better prioritization of the gui threads (relative to background/sync jobs) so the device will stay more responsive while it syncs in the background...

Mark

Jonno Norton

unread,
Jul 27, 2009, 1:11:56 AM7/27/09
to new...@googlegroups.com

Didn't newsrob used to have this feature? I liked it too, for the same reason.

-Jonno
Sent from my G1

Mariano Kamp

unread,
Jul 27, 2009, 3:27:44 AM7/27/09
to new...@googlegroups.com
Hi,

  there is no easy solution. The Android OS might kill a service (here the NewsRob sync service) at any time. That is not a problem, but the service is not notified about it about to be killed.

  Now, at the begin of a sync I set a notification and at the end of a sync I remove the notification. The problem is when the sync is killed in between. As my service is just killed without prior warning I can't remove the notification and so the notification stays around. 

  And this happens much more frequently than you would expect. When your phone gets under memory pressure, it starts killing processes. Did you ever wonder why you had new articles, but they weren't downloaded yet even though the sync service is not running anymore?  That's why. The service got killed, but will resume its work when it is scheduled the next time or you hit refresh.

  I am trying to figure out what the best way is to deal with it, but recently Dianne Hackborn, an Android Dev from Google answered [1], and this didn't give me any confidence that I will be able to solve this one quickly.

  If you can live with this issue that the notification might hang around until the next sync, even though it is "finished" already, you can add the following line to a file called "newsrob.debug" that need to be placed in the sdcard's root:

enableSyncInProgressNotification=1

  You can follow along the mentioned discussion if you're interested. I will reply to her answer soonish.

Cheers,
Mariano

Reply all
Reply to author
Forward
0 new messages