waasilzamri / scrobbledroid

Automatically exported from code.google.com/p/scrobbledroid
MIT License
0 stars 0 forks source link

Unexpected CPU usage #27

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
While listening to music I noticed that scrobble droid continuously does 
something in the background, cpu usage around 1-4%. I was under the 
impression that it only needed to log what track was played when it changes. 

Maybe this is just how the music notifications work on android and I can live 
with it. Just thought it looked a bit curious. 

Original issue reported on code.google.com by johan.ap...@gmail.com on 28 Aug 2009 at 8:14

GoogleCodeExporter commented 9 years ago
The normal way that Scrobble Droid works is that it waits for notifications 
about the
changing tracks, but sometimes that isn't completely reliable, because at the 
end of
a playlist the music app doesn't send a notification that the last song stopped.

For that reason Scrobble Droid also uses a timer and polls the music app every 
minute
to check if it is still playing. I imagine that the CPU usage you're seeing is 
from
that timer. There might be a bug that's causing it to check more often that it
should, though, so I'll have a look with a profiler next time I'm working on 
the app.

Thanks for the report.

Original comment by jjc1...@gmail.com on 28 Aug 2009 at 9:54