-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature proposal:Provide BackgroundDownloader in Windows App SDK #4426
Comments
Just to ask, is BITS not viable for you? |
Compared to bits, we found that delivery optimization supports p2p, and the minimum supported version of delivery optimization is the same as the minimum supported version of Windowsappsdk, and is widely used for Windows updates and store app downloads. |
I did some tests and I could use BackgroundDownloader in an unpackaged Desktop app with CreateAppContainerProfile as explained in MSDN (https://learn.microsoft.com/en-us/windows/win32/secauthz/appcontainer-for-legacy-applications-) |
That all depends on where you are trying to download it to. When you are running in an AppContainer, you don't have write access to the majority of your user profile. The profile is running as low integrity after all. The only guaranteed writable location you have is actually the AppContainer profile for the application. |
Yes, I tried to download to KnownFolders.PicturesLibrary (like the MSDN sample), although I added the ACL (FileSystemRights.FullControl), but useless apparently |
Yeah, the security principle you want is all application packages. It is badly named because it comes from the Windows 8 days where packages and app containers were not separable. For the HRESULT, the seven (8007) indicates that it is a Windows API error code. From the System Error Codes documentation, error 1160 (0x490) is indeed ERROR_NOT_FOUND. But that doesn't actually mean much here. |
BITS didn't work when trimming was enabled last time I tried. |
trimming? |
yes. BITS doesn't work when the property PublishTrimmed is set to true. Also, when using HttpClient to save a file in a controlled folder I get an exception and I'm unable to do so until I approve my app in windows security. Doesn't happen with BITS, so I guess anyone could save files to those folders if they want to without asking permission 😬 |
Based on the description you provided, and based on my own use of BITS, provide a feasible solution. |
Thank you! edit: this is ridiculous. provide BackgroundDownloader in Windows App SDK |
Describe the bug
Please provide BackgroundDownloader in Windows App SDK
In the Windows UWP namespace, there is an API called BackgroundDownloader that can download files in the background, however, this API can only run in the container, which is limited in desktop applications and difficult to call. I hope the Windows App SDK team will seriously consider redesigning a BackgroundDownloader API for downloading files in the Windows App SDK. This API breaks through the limitations of UWP BackgroundDownloader and can download files smoothly. When downloading files, you can call the newly added delivery optimization interface of Windows 10 1809.
在 Windows UWP 命名空间中,有一个 API 叫 BackgroundDownloader 可以在后台下载文件,然而,这个 API 只能在容器中运行,这在桌面应用中存在限制,很难调用。希望 Windows App SDK 团队能认真考虑一下,重新设计一个在 Windows App SDK 下载文件的 BackgroundDownloader API,该 API 突破 UWP BackgroundDownloader 的限制,可以顺利下载文件,下载文件时,可以调用 Windows 10 1809 新添加的传递优化接口。
UWP BackgroundDownloader API:https://learn.microsoft.com/zh-cn/uwp/api/windows.networking.backgroundtransfer.backgrounddownloader?view=winrt-22621
Desktop app use BackgroundDownloader API problem:microsoft/microsoft-ui-xaml#6952
Delivery optimization API : https://learn.microsoft.com/zh-cn/windows/win32/api/_delivery_optimization/
Steps to reproduce the bug
See describe
Expected behavior
Provide Microsoft.Windows.Networking.Backgroundtransfer namespace and BackgroundDownloader class API
Screenshots
None
NuGet package version
Windows App SDK 1.5.3: 1.5.240428000
Packaging type
Packaged (MSIX)
Windows version
Windows 11 version 22H2 (22621, 2022 Update)
IDE
Visual Studio 2022
Additional context
None
The text was updated successfully, but these errors were encountered: