mirror of
https://github.com/ushahidi/SMSSync.git
synced 2026-04-26 00:05:57 +03:00
[GH-ISSUE #155] Task checking not starting up after reboot #120
Labels
No labels
Bug report
Code improvement
Concern
Feature request
Feature request
Good first issue to work on
In progress
Needs info
Question
Ready
Translation
User Experience
User Experience
Website
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/SMSSync#120
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 @martin-lukac on GitHub (Apr 22, 2014).
Original GitHub issue: https://github.com/ushahidi/SMSSync/issues/155
On my no brand 2.3.5 android phone task checking does not check in at the configured frequency after I reboot the phone. smssync is running and everything looks correct, but my server is not being contacted.
This exists in master and develop branches.
I think the problem is that with my phones/sims the network takes a little longer to initialize so the check in BootReceiver.java 'isConnected' fails and task checking never starts up:
https://github.com/ushahidi/SMSSync/blob/master/smssync/src/main/java/org/addhen/smssync/receivers/BootReceiver.java#L63
I've verified that removing the isConnected check seems to fix the problem on my phones. Having it fail the first few times it might try to check with the server does not seem like an issue to me.
If you think this behaviour should be changed, can you do a fix up release to the android market? I built and signed my own version but it would be nice to have an official one.
@KamilKalfas commented on GitHub (May 9, 2014):
@eyedol i've was looking into this issue and honestly i couldn't find a good reason why we should check connection to restart those services. I've checked and there failures of request are properly logged so error handling part will notice connection issue. Anyway since onReceive of this receiver is launched only once after rebooting there could be more situation like this with some devices or in places where is lack of internet connection or GSM internet connection. Have you any thoughts about this ?
@martin-lukac commented on GitHub (May 9, 2014):
I agree that there is no good reason to check connection when starting up.
If you think the connectivity check is necessary, can a timer be set to check occasional again in the boot receiver?
It may also be beneficial to have other activities/services that run do the check to make sure things have started up correctly. The reason is another problem I forgot to mention and I could file it as another issue. With our apps we ran across a phone that would automatically install apps over a certain size on the SD card. On this phone, the bootreceive broadcast is run before the sd card is mounted. So anything we had in the boot receiver did not get started. Another approach to this is to try force the install location through the manifest which seems to work for us.
@eyedol commented on GitHub (May 10, 2014):
The reason being you don't want to initiate a sync when there is no data connection. It wasn't an issue before so I guess perhaps it has to do with the device SMSSync is running. If this is proving an issue on other devices, makes sense to remove the connection check then.
And I agree with you both, we can safely remove the check.
@martin-lukac mind sending a PR for your fixes?
@KamilKalfas commented on GitHub (May 13, 2014):
Since @martin-lukac looks busy, i've made pull request for this #169 .
@martin-lukac commented on GitHub (May 13, 2014):
Opps! I was too slow, I was going to sent a patch today but you beat me to it. Thanks!
@KamilKalfas commented on GitHub (May 16, 2014):
@eyedol please close this since you've merged PR #169