Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

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:
    107