Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

When I do a hot reboot, everything is killed and restarted, but I never ever experienced any interruption in music playback. How?

System: Samsung Galaxy S (ICS)
Music Players: Stock music player, PlayerPro, Rocket Music Player

share|improve this question
1  
What phone, rom and music player is that? I just tried this with Poweramp on ICS and it stopped. –  Richard Borcsik Jul 11 '12 at 6:45
    
@Richard I didn't thought that could be useful. Anyway, I've updated the answer. –  Sachin Shekhar Jul 11 '12 at 14:57
add comment

1 Answer

up vote 9 down vote accepted

The typical implementation of a "hot reboot" does not actually shut down the OS and restart it (see What does Hot Boot mean? for related discussion). In essence, it's killing the UI and other foreground processes, then restarting the UI components, making it somewhat analogous to restarting the X server on a *nix machine.

The music player spawns a background service that actually handles playback, and services simply aren't interrupted in the hot reboot process. Using the *nix analogy again, restarting your X server typically doesn't kill your daemons, but it will stop any currently running X applications. It's a similar principle on every hot reboot implementation I've seen.

Now I should probably also qualify this with a disclaimer that this is based on my understanding of one such implementation of the "hot reboot" feature. There may be others that do it differently, but since this is not a standard/native feature and it's generally not documented anywhere you'd likely have to reach out to the developer of your particular app or ROM for more information. Heck, this may even vary depending on the music player you're using - the above is just my analysis based on the limited information I've found available on the subject.

share|improve this answer
    
Can you cite a source or experimental evidence for the claim that services are not interrupted (ie, same pid after as before)? I'd expect all android services - pretty much anything that using dalvik classes - to die; but purely native daemons to keep running. –  Chris Stratton Jul 11 '12 at 3:19
1  
@ChrisStratton: No, but I've also never seen a description of "hot reboot" that is more detailed than "restarts the graphical shell". It's not a native feature, so it's not documented anywhere. This may even vary depending on the hot reboot app/feature being used. –  eldarerathis Jul 11 '12 at 13:22
1  
My suspicion is that 'hot reboot' is the equivalent of typing 'stop ; start' at the adb shell prompt. When I tried this, music playback from the default player stopped. However, I think it is possible to hand an mp3 file to the native mediaserver process, which did not die, and maybe in some implementations that, almost as a "bug" just keeps playing. –  Chris Stratton Jul 11 '12 at 14:03
    
@ChrisStratton: That's actually a good point, too, which I didn't really think of initially. It may be dependent on both the specific 'hot reboot' implementation and the specific music player being used (or at least how it interacts with the mediaserver process and so forth). –  eldarerathis Jul 11 '12 at 14:12
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.