Hello, Welcome to Micorosoft Q&A,
Can someone help me implement that in my Xamarin Form app ? I tried to follow instructions, but I missed someting because it does not recognize the restricited capability in my manifest when I try to deploy locally my app.
The document Run in the background indefinitely is suit for your scenario, for running background tasks indefinitely, you need enable restricited capability
I will share the complete manifest content that make restricited capability available, please refer the following content to edit your own manifest.
double click manifest-> press F7 edit with xml-> add the rescap namespace under the package attribute then specific it in the IgnorableNamespaces attribute.
<Package ... xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities" IgnorableNamespaces="uap mp rescap"> ... <Capabilities> <rescap:Capability Name="extendedBackgroundTaskTime"/> </Capabilities> </Package>
Some of the longer-running tasks also have a check to ensure that the background task is not sitting idle or using memory. In the Windows Creators Update (version 1703), the extendedBackgroundTaskTime restricted capability was introduced to remove these limits.
Please make sure your app's target min version large than 1703.
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.