I am writing an app that continuously scans for all access points that are in range and saves log to a text file. The scanning should start when user clicks the "Start" button and run until "Stop" button is clicked even if user switched to other app.
As I understand, this functionality can be achieved using the background task but I keep getting exception telling "Not enough quota is available to process this command. (Exception from HRESULT: 0x80070718)", when trying to register a background task.
Any ideas, what might be wrong?
Full code: https://www.dropbox.com/sh/1v9mbr3xhgr3283/AACDbB7skZUI7Z5fiu0HT8r4a?dl=0