简体   繁体   English

下载文件并在下载应用程序或cordova应用程序的通知中显示

[英]Download a file and show it in downloads app or in notification in a cordova app

How do i make a file appear in the downloads app or in notification. 如何使文件出现在下载应用程序或通知中。 Whenever a user clicks on the download in the app i want the file to get downloaded and show up in the default downloads app. 每当用户单击应用程序中的下载时,我都希望文件被下载并显示在默认下载应用程序中。

I could use the file transfer option of Cordova but it doesn't show up in the downloads app. 我可以使用Cordova的文件传输选项,但不会在下载应用程序中显示。

You need to use cordova InAppBrowser(cordova-plugin-inappbrowser). 您需要使用cordova InAppBrowser(cordova-plugin-inappbrowser)。

window.open('http://www.myurl.com/file.pdf', '_system');

This will open the link in a system app. 这将在系统应用程序中打开链接。 Which in most cases solves the problem. 在大多数情况下,这可以解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Cordova将文件从App下载到设备 - Cordova Download File From App to Device 仅当应用程序未在Cordova android中运行时显示推送通知 - show push notification only when app is not running in cordova android 在Chrome应用中下载Chrome.downloads.download - Chrome.downloads.download in Chrome App 当应用程序在Cordova中运行时,推送通知未显示 - Push notification not showing when app is in running in cordova 使用PhoneGap / Cordova的Web应用程序的状态栏通知 - Status bar notification for web app with PhoneGap / Cordova 使用 XHR2 请求而不是cordova-file-transfer 将二进制数据下载到应用程序沙箱中 - Download binary data into the app sandbox using XHR2 request instead of cordova-file-transfer 如何在javascript中单击按钮在cordova移动应用程序中创建和下载csv文件 - How to create and download csv file in cordova mobile app with button click in javascript 显示Cordova应用程序的许多ID的加载 - Show many id's onload of cordova app 如何使用Quickblox在Cordova应用程序中实现推送通知支持? - How to implement push notification support in Cordova app using Quickblox? Device.uuid插件通知未显示Cordova iOS应用 - Device.uuid plugins notification not displaying cordova iOS app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM