From 90395232b0607b7da8fc1baa7c35000964427b22 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Fri, 23 May 2025 04:16:41 +0200 Subject: [PATCH] TvMainActivity: link to cx file explorer Google requires us to link to a specific file manager. We can't just open the app store. They keep rejecting the app otherwise. Annoying. Also, due to Android TV bugs, we also can't link to a prefilled search query of "file manager". Instead we must link to an actual file manager. Unfortunately, none of the open source file manager apps both support the TV interface and can act as a file chooser. So instead we pick what looks like the only decent one that doesn't have any in app purchases. Ugh. I don't like doing this. It's not an endorsement. I don't know much about who makes these. But what choice do we have? So doing this for now. Maybe we'll find some better solution or apply to be a file manager ourselves in the future. Signed-off-by: Jason A. Donenfeld --- .../java/com/wireguard/android/activity/TvMainActivity.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt b/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt index fcf35691..3084d314 100644 --- a/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt +++ b/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt @@ -214,7 +214,10 @@ class TvMainActivity : AppCompatActivity() { MaterialAlertDialogBuilder(binding.root.context).setMessage(R.string.tv_no_file_picker).setCancelable(false) .setPositiveButton(android.R.string.ok) { _, _ -> try { - startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://webstoreredirect"))) + startActivity(Intent(Intent.ACTION_VIEW).apply { + data = Uri.parse("https://play.google.com/store/apps/details?id=com.cxinventor.file.explorer") + setPackage("com.android.vending") + }) } catch (_: Throwable) { } }.show()