UWPQuickCharts | Simple charting library for UWP | Data Visualization library
kandi X-RAY | UWPQuickCharts Summary
kandi X-RAY | UWPQuickCharts Summary
Simple charting library for UWP
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of UWPQuickCharts
UWPQuickCharts Key Features
UWPQuickCharts Examples and Code Snippets
Community Discussions
Trending Discussions on UWPQuickCharts
QUESTION
I have a UWP Application which reads live Bluetooth data from a Bluetooth Low Energy (BLE) device, plots it using QuickCharts, and logs it to a csv file.
Currently every 250ms a Timer is triggered, which logs the data and updates the graph (this last operation is scheduled on the UI Thread).
I had a problem by which the application went into suspended state whenever it was minimized or covered by another app, so I decided to enable the restricted capabilities in the App maifest and declared an ExtendedExecutionForegroundSession
(as explained here). This solved the issue, and the data is logged following the timer even when the app is minimized.
However, this caused the following effect: Whenever the App is minimized (not covered by another, but minimized), the memory usage explodes, and grows at around 100MB/min. My hypothesis is that although the app is in an active state, and the UI Tasks are scheduled, they are not able to run when the App is minimized. When I again maximize the App, the memory usage quickly drops and the graph updates quickly until it catches up. My question is the following:
- Is it possible to run scheduled UI Tasks when the App is minimized?
- If not, is it possible to detect when the App is minimized in order to not launch those tasks in that case? (but keeping the logging, which does work now through the Extended Session).
I am thankful for any insight, and apologize for my inexperience with UWP.
...ANSWER
Answered 2020-Mar-16 at 00:18Is it possible to run scheduled UI Tasks when the App is minimized?
When the application is minimized, the application enters the Suspend state. This is not done immediately, but the application is suspended after being minimized for a period of time.
In the suspend state, the current application state is retained until the next time the application is resumed or closed, during which the UI scheduled work cannot be performed
If not, is it possible to detect when the App is minimized in order to not launch those tasks in that case?
Currently UWP does not provide an API to check whether the window is minimized, but the Suspend
event will be triggered after minimizing, So we can handle the App.OnSuspending
, you can turn off the functions when the event is triggered.
Specific content can view this document
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install UWPQuickCharts
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page