I am not sure about the exact reason but I feel it was because of mishandling of partial wakelock. Like your app, I had a service which remained active all time and for that I had to hold on to the wakelock. The phone did not restart if I commented out my wakelock code. Interesting thing is it never restarted untill I tried to change call forward setting or use car navigator app (thankfully, this was observed when we tested the app for any kind of conflicts) .Then I realised that I should not hold on to the wakelock for long, to avoid conflicts. When I went the AlarmManager way all conflicts vanished. Are you holding on to wakelock? If you are, you may try commenting out that part and keep your app active until download is complete so that you don't loose network connection. Just perform few tests with the wakelock thing hopefully you should get the answer. You may have to split your file download into batches so that you can release the wakelock.
On Jun 3, 3:28 pm, Nathan <[email protected]> wrote: > On Jun 3, 12:47 pm, nikhil <[email protected]> wrote: > > > Nathan, > > > I had similar issue long time back when I had implemented the service > > architecture. I had observed few things: > > > 1. My phone (Nexus One) used to restart (with my service running in > > background) when I tried to change the call forward setting or I tried > > to use the google car navigator app. > > 2. The phone did not restart if it was plugged into a computer. (May > > be related to network connectivity.) > > > I tried all kind of stuff the only way I was able to get my app > > working was by referring to Mark Murphy's wakefulintentservice > > structure which uses the alarm manager. > > Thanks. > > Did you find out why the restart was triggered? Or did you simply > managed to avoid it? Was it because of many notifications, or just the > fact that it was running for long time, or that Android tried to kill > it? > > The alarm manager isn't appropriate for this task, at least I don't > think so, because it is not a service that wakes up periodically and > does some work. > > It has a defined list of files to download and then finishes, but it > is actively working all that time. > > Nathan -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

