Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can mobile web apps run in the background? (iOS & Android)

Can mobile web apps run in the background? I'm mostly interest in iOS & Android.

Thanks!

like image 680
fancy Avatar asked Dec 03 '22 07:12

fancy


1 Answers

Since this is a situation that changes almost daily, I'll post an updated answer. This applies to the recent releases of these browsers but may change tomorrow!

My music app is HTML5 and needs to run in the background. The support for that varies depending on mobile browser.

  • Safari on iOS: will continue to play one or two songs in the background
  • Native browser on Android: will play one song then stops
  • Firefox on Android: will stop when screen locks or browser loses focus or song ends
  • Dolphin on Android: plays in background but eventually stops
  • Opera on Android: Excellent background support! Javascript continues to run and music continues to play even when screen is off or Opera is sent to the background. Opera even puts a play/pause toggle into the notification page. Yay.

Here is a related SO question.

like image 122
moodboom Avatar answered Dec 05 '22 20:12

moodboom