Skip to contentSkip to conversation

fix: make wireguard compatible with android TV

PATCH In review Revath S Kumar 3 participants 4 messages Jan 22, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix: make wireguard compatible with android TV

As of now wireguard is not listed in Android TV play store due to the lack of CATEGORY_LEANBACK_LAUNCHER [1]. Even the app is not listed when we sideload into TV device[2].

[1]: https://developer.android.com/reference/android/content/Intent.html#CATEGORY_LEANBACK_LAUNCHER
[2]: https://developer.android.com/training/tv/start/start.html#tv-activity

---
 app/src/main/AndroidManifest.xml | 3 +++
 1 file changed, 3 insertions(+)
app/src/main/AndroidManifest.xml +3 -0
index 21fc6eb..9bd2940 100644
@@ -16,6 +16,8 @@
         android:label="@string/permission_label"
         android:protectionLevel="dangerous" />
 
+    <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
+
     <application
         android:name=".Application"
         android:allowBackup="false"
@@ -31,6 +33,7 @@
             <intent-filter>
                 <action android:name="android.intent.action.MAIN" />
                 <category android:name="android.intent.category.LAUNCHER" />
+                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
             </intent-filter>
 
             <intent-filter>
Signature · 6 lines
2.25.0

_______________________________________________
WireGuard mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/wireguard
#2 lore raw

It allows it to work for hardware devices that emulate or simply do not provide a real touchscreen, e.g. Android TVs. The feature requirement for a real touchscreen is default enabled and must be explicitly disabled. ~D

Quoted 4 lines · Jason A. Donenfeld

Thanks for this.

Quoted 1 line · Revath S Kumar

+ <uses-feature android:name="android.hardware.touchscreen" android:required="false"/>

Quoted 8 lines

I understand the other flag you've added, thanks to the documentation link you provided, but what's this line here do?

Jason
_______________________________________________
WireGuard mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/wireguard

_______________________________________________
WireGuard mailing list
[email protected]
https://lists.zx2c4.com/mailman/listinfo/wireguard