AT&T U-verse® Enabled How to Override Remote Control Keys

AT&T U-verse® Enabled
How to Override Remote Control Keys
Publication Date: November 1st, 2013
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
Legal Disclaimer
This document and the information contained herein (collectively, the "Information") is provided to you (both the individual receiving
this document and any legal entity on behalf of which such individual is acting) ("You" and "Your") by AT&T, on behalf of itself and
its affiliates ("AT&T") for informational purposes only. AT&T is providing the Information to You because AT&T believes the
Information may be useful to You. The Information is provided to You solely on the basis that You will be responsible for making
Your own assessments of the Information and are advised to verify all representations, statements and information before using or
relying upon any of the Information. Although AT&T has exercised reasonable care in providing the Information to You, AT&T does
not warrant the accuracy of the Information and is not responsible for any damages arising from Your use of or reliance upon the
Information. You further understand and agree that AT&T in no way represents, and You in no way rely on a belief, that AT&T is
providing the Information in accordance with any standard or service (routine, customary or otherwise) related to the consulting,
services, hardware or software industries.
AT&T DOES NOT WARRANT THAT THE INFORMATION IS ERROR-FREE. AT&T IS PROVIDING THE INFORMATION TO YOU
"AS IS" AND "WITH ALL FAULTS." AT&T DOES NOT WARRANT, BY VIRTUE OF THIS DOCUMENT, OR BY ANY COURSE OF
PERFORMANCE, COURSE OF DEALING, USAGE OF TRADE OR ANY COLLATERAL DOCUMENT HEREUNDER OR
OTHERWISE, AND HEREBY EXPRESSLY DISCLAIMS, ANY REPRESENTATION OR WARRANTY OF ANY KIND WITH
RESPECT TO THE INFORMATION, INCLUDING, WITHOUT LIMITATION, ANY REPRESENTATION OR WARRANTY OF
DESIGN, PERFORMANCE, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, OR
ANY REPRESENTATION OR WARRANTY THAT THE INFORMATION IS APPLICABLE TO OR INTEROPERABLE WITH ANY
SYSTEM, DATA, HARDWARE OR SOFTWARE OF ANY KIND. AT&T DISCLAIMS AND IN NO EVENT SHALL BE LIABLE FOR
ANY LOSSES OR DAMAGES OF ANY KIND, WHETHER DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, PUNITIVE,
SPECIAL OR EXEMPLARY, INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF BUSINESS PROFITS, BUSINESS
INTERRUPTION, LOSS OF BUSINESS INFORMATION, LOSS OF GOODWILL, COVER, TORTIOUS CONDUCT OR OTHER
PECUNIARY LOSS, ARISING OUT OF OR IN ANY WAY RELATED TO THE PROVISION, NON-PROVISION, USE OR NON-USE
OF THE INFORMATION, EVEN IF AT&T HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH LOSSES OR DAMAGES.
IOS is a trademark or registered trademark of Cisco in the U.S. and other countries.
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
i
Table of Contents
Contents
1
Introduction .......................................................................................................................................... 1
1.1
Additional Resources .................................................................................................................... 1
2
Overview ............................................................................................................................................... 2
3
Example ................................................................................................................................................. 4
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
ii
Table of Tables
Table 2-1: RemoteKey and onKey Values ..................................................................................................... 3
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
iii
Table of Examples
Example 3-1: Bind Play Button to uveActionAVPlay Command Using onKey .............................................. 4
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
iv
1 Introduction
This document is intended for developers who are using the AT&T U-verse
Enabled SDK to create U-verse Enabled apps. This document contains an
overview of how to override Remote Control Keys to send commands to the TV
UI API app running on a screen connected to the U-verse receiver. This provides
a mechanism for the user to interact with uvePages using either the U-verse
remote control or by sending the command using a
uveRemoteControlButtonCommand. This will allow you in your app to bind
actions to the remote control keys that will be triggered on receipt of the
command.
1.1 Additional Resources
In addition to this document, you may find the following documents helpful when
developing U-verse Enabled iOS apps.

How to Write Your First AT&T U-verse Enabled iOS App

How to Setup a U-verse Enabled Project in Xcode
In addition, you can find more technical information on the AT&T Developer
Program web site. See Develop AT&T U-verse ® Enabled Apps and select the
development platform that you are interested in.
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
Page 1 of 4
2 Overview
The onKey property of uvePage is a feature that allows you to override the Uverse Remote Keys to allow your users to control navigation and interact with
your app using the U-verse regular remote control. It is important to define a
good strategy for the assignment of which keys you should use for your actions.
A good set of general keys to use for your app are the app keys, app1 to app6. If
you are using other keys, try to match the functionality of the key in your app as
close to the user’s perception of the key as possible. For example if you are
using the directional keys, use them for navigation.
The onKey property can be set to an NSDictionary where the remote key is the
key of each element in the dictionary and the action you wish to associate with
this key.
If you wish to add another key/action combination to this dictionary, you will need
to include all the key/action combinations for the page in the dictionary.
The key of the pair takes an NSString value of the key that you wish to bind to.
The mapping to the enum values of RemoteKey are included in the following
table.
Remote Key Value
onKey Value
Remote Key
Value
onKey Value
RK_asterisk
*
RK_back
back
RK_pound
#
RK_enter
enter
RK_zero
0
RK_clear
clear
RK_one
1
RK_exit
exit
RK_two
2
RK_favorites
favorites
RK_three
3
RK_info
info
RK_four
4
RK_menu
menu
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
Page 2 of 4
Remote Key Value
onKey Value
Remote Key
Value
onKey Value
RK_five
5
RK_options
options
RK_six
6
RK_recordedtv
recordedtv
RK_seven
7
RK_guide
guide
RK_eight
8
RK_help
help
RK_nine
9
RK_recent
recent
RK_app1
app1
RK_search
search
RK_app2
app2
RK_teletext
teletext
RK_app3
app3
RK_vod
void
RK_app4
app4
RK_ffwd
ffwd
RK_app5
app5
RK_rwd
rwd
RK_app6
app6
RK_pause
pause
RK_blue
blue
RK_play
play
RK_green
green
RK_playpause
playpause
RK_red
red
RK_power
power
RK_yellow
yellow
RK_poweron
poweron
RK_channelup
channelup
RK_stop
stop
RK_channeldown
channeldown
RK_record
record
RK_up
up
RK_skipback
skipback
RK_down
down
RK_skipfwd
skipfwd
RK_left
left
RK_poweroff
poweroff
RK_right
right
RK_backspace
backspace
RK_select
select
Table 2-1: RemoteKey and onKey Values
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
Page 3 of 4
3 Example
The following code snippet is an example of how to use the onKey to bind the
play button to an uveActionAVPlay command. First, this example creates a
uveVideo container and adds it to the screen. Next, the example creates the
action to bind to the key and, finally, the onKey property of the uvePage is set to
bind the key to the action.
onKey Property
1
2
3
4
5
| uveVideo *video = [[uveVideo alloc] initVideoWithName:@"video"
tuneURL:[NSURL URLWithString:@"demo.wmv"] frame:CGRectMake(0, 0,
640, 480)];
| [page addGadget:video];
| uveActionAVPlay *playAction = [[uveActionAVPlay alloc]
initActionWithName:@"playAction" nameOfTargetControl:@"video"
playSpeed:kForward1];
| [page addAction:playAction];
| page.onKey = @{@"play" : playAction };
Example 3-1: Bind Play Button to uveActionAVPlay Command Using onKey
© 2013 AT&T Intellectual Property. All rights reserved. AT&T and the AT&T logo are trademarks of AT&T Intellectual Property.
Page 4 of 4