The Anymote-for-Java library implements the Google TV Pairing and Anymote protocols in pure Java.
Google open sourced the implementations of their software to allow mobile devices to communicate with Google TV devices. The Google TV Pairing Protocol is used to pair sessions between mobile devices and Google TV. The Anymote Protocol is a messaging protocol that applications on a remote device use to communicate with Google TV. Anymote supports commands that are like those of a physical remote control.
If you want to write an app that communicates with Google TV devices you can either use the source code of the Google TV Remote app or you can use the Anymote Library. Both of these are based on Android.
The Anymote-for-Java library has the following advantages:
- Not dependent on Android. Any 1.6 JRE on any platform will work.
- Paired devices are remembered. The Google Anymote library requires the pairing PIN to be entered for each session.
- The user interface is externalized and replaceable. The Google Anymote library has the Android user interface embedded.
Anymote-for-Java is based on the Google Anymote Library code, but all Android dependencies have been replaced with pure Java logic. Platform-specific logic like creating files or getting the network configuration is isolated in the Platform class.
Anymote allows you to send Android intents to Google TV devices as a URI. The URI needs to be in the android.content.Intent string format. Look at the Example class for a list of intent strings to launch popular Google TV apps.
Run com.entertailion.java.anymote.test.Example to see the library in action with the default command-line interface.
Watch this YouTube video to see the library in action on a Raspberry PI.
The Android-Anymote app provides an Android user interface for the Anymote-for-Java library.
The GTV-for-Tasker project provides a plugin for the Tasker app.
Possible uses:
- Second screen apps for TV
- Home automation
- Custom user interface for desktop computers
- Test harness to test Google TV apps
References:
- Google TV Pairing Protocol
- Anymote Protocol
- Building Second-screen Applications for Google TV
- The ultimate Google TV remote: Able Remote