Implement DownloadManagement app feature in nativeshell

This commit is contained in:
Niels van Velzen authored and Niels van Velzen committed 2025-05-13 21:36:49 +02:00
1 parent ee924e420e
commit aa7d42a211
2 files changed
+17 -7

No files matched your search

+12 -7
View File
@@ -1,18 +1,19 @@
const features = [
"filedownload",
"castmenuhashchange"
"clientsettings",
"displaylanguage",
"subtitleappearancesettings",
"subtitleburnsettings",
//'sharing',
"downloadmanagement",
"exit",
"externallinks",
"filedownload",
"htmlaudioautoplay",
"htmlvideoautoplay",
"externallinks",
"clientsettings",
"multiserver",
"physicalvolumecontrol",
"remotecontrol",
"castmenuhashchange"
"subtitleappearancesettings",
"subtitleburnsettings",
// 'sharing'
];
const plugins = [
@@ -67,6 +68,10 @@ window.NativeShell = {
window.NativeInterface.downloadFiles(JSON.stringify(downloadInfo));
},
openDownloadManager() {
window.NativeInterface.openDownloadManager();
},
openClientSettings() {
window.NativeInterface.openClientSettings();
},
@@ -144,6 +144,11 @@ class NativeInterface(private val context: Context) : KoinComponent {
return true
}
@JavascriptInterface
fun openDownloadManager() {
emitEvent(ActivityEvent.OpenDownloads)
}
@JavascriptInterface
fun openClientSettings() {
emitEvent(ActivityEvent.OpenSettings)