Search Unity

LockScreen Play/Pause audio control event callback

Discussion in 'iOS and tvOS' started by malyna, Feb 13, 2015.

  1. malyna

    malyna

    Joined:
    Jul 9, 2010
    Posts:
    105
    Hi,
    I want to respond to Play/Pause button on LockScreen to control my music playing in the background.

    I know it must be done in xcode project via:
    "beginReceivingRemoteControlEvents" and "(void) remoteControlReceivedWithEvent: (UIEvent *) receivedEvent"

    Music is already playing after clicking home button but i cant get the callback method to work.
    I read there is some trick with sublassing UnityAppController but i cant get it to work :/.

    If someone can help me with that it would be great.
     
  2. malyna

    malyna

    Joined:
    Jul 9, 2010
    Posts:
    105
  3. BigGameCompany

    BigGameCompany

    Joined:
    Sep 29, 2016
    Posts:
    112