Q&A
Q. What interface must be implemented by an Activity to use the Anymote protocol?
A. AnymoteClientService ClientListener must be implemented. The Activity then acts as a ClientListener and detects when Anymote is connected and disconnected.
Q. Two actions that can be sent from an Activity to a TV mimic what can be done on the TV remote keyboard. What are they?
A. Sending a keystroke via SendKey mimics entering a keystroke on the remote control. It is used as follows:
anymoteSender.sendKey (Code.BTN_MOUSE, Action.DOWN);
Sending a move event mimics a mouse movement on the remote. It is used as follows:
anymoteSender.sendMoveRelative(x,y);
Q. How can a sensor on a phone like the accelerometer be used in second screen apps?
A. At a high level, anything detected by the sensor can be communicated to the TV using the Anymote protocol and commands to fling, send keystrokes, and move the mouse. The sensor detects something and the app with the sensor translates the results to something that can be sent with the Anymote protocol to communicate the result to the TV.