Is there an intent I can use to turn on sync on my TV? My goal is to create a small apk that launches this intent, and then assign that to one of the shortcuts on my shield remote. Thanks.
This is something I am still working on. There are ways to start entertainment using Android intents (more info) but that does not work with Sync at this time. It will be fixed in a future update when this bug is fixed: Sync with Tasker does not work on Android TV - #3 by Thomas
How are you planning to send that intent when pressing a button on the remote? Maybe we can build that into Hue Essentials.
See also the following: Automatically start/stop Sync on Android TV
I think I’d simply make an app which launches the intent directly in MainActivity and maybe shows a toast (like “Hue Sync on/off”) and then calls finish(). In the Shield’s settings there is:
Remotes & Accessories → Customize Menu button → Short Press/Hold/Double Press → Open an app → Then it shows an app list and you can pick any of the installed apps.
I think for other android tv devices there are apps used to remap buttons on the remotes so the same principle more or less applies.
If you’d like to implement this directly into the app, I think you could do something like this in the manifest:
<activity android:name="MainActivity" android:label="Main"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="ActivityWhichDirectlyEnablesHueSync" android:label="ActivityWhichDirectlyEnablesHueSync"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity>
Never tried the above honestly but there are definitely apps out there that manage to have multiple entries in the android app drawer.
I agree with this request. I’d love for the ability to set a button on my TV remote to toggle Entertainment Sync on and off.
I have both the Sync HDMI box as well as Hue Essentials which take over the entertainment area depending on what I’m doing with my TV, so having a quick button to press to force the Hue Essentials app to take this over would be great.