-2

I've noticed that as of the last update Google Play Music on iOS now allows you to scrub through a track on the lock screen via MPNowPlayingInfoCenter (Presumably) as Apple Music does & the iPod app before it. I was under the assumption that this was a private API. Anyone know how this was achieved?

patrickjquinn
  • 288
  • 1
  • 15

1 Answers1

-1

If application have specific purpose (in such case it's music app) it can declare specific background mode (Project -> Capabilities -> Background modes). If you then properly configure it in code (run music player, prepare for background etc.) your application can work even if it's not in foreground. Last music app that was used then can be tracked in system UI, in this case in lock screen. Similarly applications that use bluetooth can be displayed on locked screen in form of small application icon.

See this answer for more details https://stackoverflow.com/a/10432512/6429711 .

Community
  • 1
  • 1
Adamsor
  • 730
  • 1
  • 6
  • 14
  • Well getting lock screen controls isn't the issue, thats straight forward, its the actual seek bar (Open spotify and play something and lock the device, can you scrub through the song from the lock screen?) that allows scrubbing that I was wondering about – patrickjquinn Dec 03 '16 at 02:06