• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: iOS7 Control Center Documentation ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: iOS7 Control Center Documentation ?


  • Subject: Re: iOS7 Control Center Documentation ?
  • From: Beinan Li <email@hidden>
  • Date: Wed, 30 Oct 2013 11:11:26 -0400

Sorry to get back to this old issue.
We tested blocking iOS7 control centre music remote-control by intercepting remote control events, but control centre seems to have bypassed ALL music control events including UIEventSubtypeRemoteControlPause and UIEventSubtypeRemoteControlPlay, and UIEventSubtypeRemoteControlTogglePlayPause.

The same blocking code still works perfectly with iOS6 devices.

Is it that control centre has its own protocol for remote control or that the way to intercept remote-control events has changed in iOS7? Here is what we do:
1. Added a method in our appDelegate:
     - (BOOL)canBecomeFirstResponder {
return YES;
     }

2. Call this in applicationDidBecomeActive:

  [[UIApplication sharedApplication] beginReceivingRemoteControlEvents];
  // Set itself as the first responder
  [self becomeFirstResponder];

3. Call this in applicationWillResignActive

  // Turn off remote control event delivery
  [[UIApplication sharedApplication] endReceivingRemoteControlEvents];
    // Resign as first responder
  [self resignFirstResponder];

4. Finally added 

- (void)remoteControlReceivedWithEvent:(UIEvent *)receivedEvent {
    if (receivedEvent.type == UIEventTypeRemoteControl) {
        switch (receivedEvent.subtype) {
            case UIEventSubtypeRemoteControlTogglePlayPause:
NSLog(@"Received: UIEventSubtypeRemoteControlTogglePlayPause\n");
                break;
            case UIEventSubtypeRemoteControlPreviousTrack:
NSLog(@"Received: UIEventSubtypeRemoteControlPreviousTrack\n");
                break;
            case UIEventSubtypeRemoteControlNextTrack:
NSLog(@"Received: UIEventSubtypeRemoteControlNextTrack\n");
                break;
case UIEventSubtypeRemoteControlPlay:
NSLog(@"Received: UIEventSubtypeRemoteControlPlay\n");
                break;

case UIEventSubtypeRemoteControlPause:
NSLog(@"Received: UIEventSubtypeRemoteControlPause\n");
                break;

case UIEventSubtypeRemoteControlStop:
NSLog(@"Received: UIEventSubtypeRemoteControlStop\n");
                break;
            default:
NSLog(@"Received: Some remove control events\n");
                break;
        }
    }
}

Any pointer will be appreciated.




On Thu, Oct 17, 2013 at 11:24 AM, Beinan Li <email@hidden> wrote:
Ah, that would make sense.
Thanks for the tip!


On Thu, Oct 17, 2013 at 2:45 AM, Giacomo Tufano <email@hidden> wrote:
That’s because in iOS7 there is no UIEventSubtypeRemoteControlTogglePlayPause anymore, but different events are sent for play and pause (UIEventSubtypeRemoteControlPause and UIEventSubtypeRemoteControlPlay, to be precise).
I fixed the problem you have in my apps simply by checking for the right event(s) in -remoteControlReceivedWithEvent:, no other changes were needed.

Il giorno 17/ott/2013, alle ore 04:45, Beinan Li <email@hidden> ha scritto:

The method used to work on iOS6 with the ear-bud remote control and the springboard.
I can go back to try again. But our QA found that they didn't work for the Control Center on a device running iOS7.


On Wed, Oct 16, 2013 at 9:20 PM, Hunter Hillegas <email@hidden> wrote:
I believe you’re looking for this on UIApplication:

Registering for Remote Control Events

  • – beginReceivingRemoteControlEvents
  • – endReceivingRemoteControlEvents

On Oct 16, 2013, at 6:12 PM, Beinan Li <email@hidden> wrote:

Thanks for the response Hunter.
I want to intercept the music player control messages from the Control Center.

Thanks,
Beinan


On Wed, Oct 16, 2013 at 7:37 PM, Hunter Hillegas <email@hidden> wrote:
I’m not sure there is any as Control Center is not customizable by developers.

What sort of questions did you have?

On Oct 16, 2013, at 4:00 PM, Beinan Li <email@hidden> wrote:

> I can't seem to find any documentation regarding the iOS7 control center.
> What should be my keywords if "Control Center and "ControlCenter" didn't
> turn up anything in Xcode5 documentation.





 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: iOS7 Control Center Documentation ?
      • From: Beinan Li <email@hidden>
References: 
 >iOS7 Control Center Documentation ? (From: Beinan Li <email@hidden>)
 >Re: iOS7 Control Center Documentation ? (From: Hunter Hillegas <email@hidden>)
 >Re: iOS7 Control Center Documentation ? (From: Beinan Li <email@hidden>)
 >Re: iOS7 Control Center Documentation ? (From: Hunter Hillegas <email@hidden>)
 >Re: iOS7 Control Center Documentation ? (From: Beinan Li <email@hidden>)
 >Re: iOS7 Control Center Documentation ? (From: Giacomo Tufano <email@hidden>)
 >Re: iOS7 Control Center Documentation ? (From: Beinan Li <email@hidden>)

  • Prev by Date: Xcode Server: Force load of distribution profile?
  • Next by Date: Re: iOS7 Control Center Documentation ?
  • Previous by thread: Re: iOS7 Control Center Documentation ?
  • Next by thread: Re: iOS7 Control Center Documentation ?
  • Index(es):
    • Date
    • Thread