diff options
author | 2025-05-23 04:16:41 +0200 | |
---|---|---|
committer | 2025-05-23 04:16:41 +0200 | |
commit | 90395232b0607b7da8fc1baa7c35000964427b22 (patch) | |
tree | 02dda4af92d3ba603356a0157655e17f5d61b555 | |
parent | version: bump (diff) | |
download | wireguard-android-90395232b0607b7da8fc1baa7c35000964427b22.tar.xz wireguard-android-90395232b0607b7da8fc1baa7c35000964427b22.zip |
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 <Jason@zx2c4.com>
-rw-r--r-- | ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt | 5 |
1 files changed, 4 insertions, 1 deletions
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() |