Skip to content

Commit 9039523

Browse files
committed
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 <[email protected]>
1 parent b996989 commit 9039523

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ class TvMainActivity : AppCompatActivity() {
214214
MaterialAlertDialogBuilder(binding.root.context).setMessage(R.string.tv_no_file_picker).setCancelable(false)
215215
.setPositiveButton(android.R.string.ok) { _, _ ->
216216
try {
217-
startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("market://webstoreredirect")))
217+
startActivity(Intent(Intent.ACTION_VIEW).apply {
218+
data = Uri.parse("https://play.google.com/store/apps/details?id=com.cxinventor.file.explorer")
219+
setPackage("com.android.vending")
220+
})
218221
} catch (_: Throwable) {
219222
}
220223
}.show()

0 commit comments

Comments
 (0)