GTV-for-Tasker implements a plugin for the popular Tasker app. GTV-for-Tasker allows you to send key codes to Google TV devices like pressing the buttons on a physical remote control. It also allows you to send text data, open web sites and launch apps.
The GTV-for-Tasker plugin is available in the Google Play Store as a free app.
The GTV-for-Tasker can be used with the following apps:
It is important to put delays between key codes sent to Google TV devices. These devices cannot handle a stream of incoming commands in rapid succession. It is recommend to use at least 500ms between commands to the same device and at least 2 seconds when switching between devices. It will require some experimentation to determine what the exact values need to be for your devices.
How to create a Google TV task in Tasker:
- Click on the Tasks tab
- Click on the '+' button
- Enter a name for the new task
- Click on the '+' button to add a new action
- Select the 'Plugin' category
- Select the 'GTV Tasker' action
- Click on the 'Edit' button to to edit the action configuration
- Wait for the Google TV devices to be discovered
- When the progress indicator stops, select a Google TV device from the list
- If it is a Google TV device that hasn't been paired before, your will be prompted to enter the PIN that is displayed on the Google TV device
- Once the device is paired, select a type of action to be sent to the Google TV device (key code, URL, text data or invoke an app)
- Click on the checkmark button to save the configuration
- Click on the checkmark for the 'GTV Tasker' action
- Add other tasks (remember to add 'Task/Wait' actions between each GTV actions)
- Click on the checkmark button to save the new task
How to program a NFC tag to run a Google TV task using NFC Task Launcher:
- Create a task in Tasker (as described above)
- Enable external access to tasks using 'Menu/Preferences/Misc/Allow External Access' in Tasker
- In NFC Task Launcher, click on the '+' icon to create a new task
- Enter a tag name
- Click on 'Add actions'
- Select 'Tasker' and then 'Tasker Task' from the list of actions
- Click on the 'Next' button
- Click on the search icon and select the Tasker task you created
- Click on the 'OK' button
- Click on 'SAVE & WRITE'
- Place the NFC tag against back of phone to write the task.
- A dialog will be displayed once the task is written to the NFC tag.
Example key codes:
- KEYCODE HOME: Toggle the display of the GTV home screen
- KEYCODE LIVE: Display live TV
- KEYCODE DPAD LEFT: Navigate left
- KEYCODE DPAD RIGHT: Navigate right
- KEYCODE DPAD UP: Navigate up
- KEYCODE DPAD DOWN: Navigate down
- KEYCODE DPAD CENTER: Select or OK
- KEYCODE TV POWER: Toggle the power of your TV
Send text data: Use the Data type to send text data to GTV. One possible use would be to do a search. Send a KEYCODE SEARCH and then send the text data as the search term.
Load web sites:
- The full URL needs to be specified. The URL needs to start with 'http://' or 'https://'.
- The web site will be launched in the GTV Chrome browser.
Apps are launched using Android intents.
The intent needs to be entered in its string format:
where X is the Android app package name and Y is the app main launcher activity. For example, the app package name and app activity for Netflix is "com.google.tv.netflix" and "com.google.tv.netflix.NetflixActivity" respectively.
The GTV-for-Tasker plugin will create the intent string in the correct format using the provided app package name and app activity.
There are some issues to be aware of:
- The developers of each app can change the app main launcher activity in future updates. The Tasker action would then have the incorrect data and won't launch the app anymore.
- The 'same' app doesn't have the same package information on different Google TV devices. For example, the Settings app on the Vizio Co-Start is different from the Settings apps on other GTV devices.
- Their are apps that are only available on particular GTV devices. For example, the media players/DLNA players on the various GTV devices are unique to those devices.
- The only reliable way to launch an app is to determine at run-time what the package information is on each GTV device (that is how Able Remote works). But then you would need an app running on GTV to determine that information.
- Netflix: "com.google.tv.netflix/com.google.tv.netflix.NetflixActivity"
- Chrome: "com.google.tv.chrome/com.google.tv.chrome.HubActivity"
- Google Play Music: "com.google.android.music/com.android.music.activitymanagement.TopLevelActivity"
- Twitter: "com.twitter.android.tv/com.twitter.android.LoginActivity"
- Pandora: "com.pandora.android.gtv/com.pandora.android.Main"
- The GTV-for-Tasker code is based on the Locale Toast Setting plugin source code.
- The GTV-for-Tasker project includes the jar file for the Anymote-for-Java library in its lib directory. Developers should check out that project and export a jar file for the latest version of the code. When you export the Anymote-for-Java project as a jar file, do not include its lib directory since this project already includes those jar files.
- The code also relies on an Android library project that is part of the Locale Toast Settings plugin developed by two forty four a.m.. Extract the zip file and import the 'locale-api' project into Eclipse which will be referenced by the GTV-for-Tasker project.