Why use service for background music in android -


why should service used playing background music in android? why not create media player object loop player play music?

thanks!

keyword background. if tie media player object activity, don't have guarantee object around if activity goes background. gc destroy when resources become low.
therefore using service safer. , services designed running in background unlike activities.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -