How can I update or call an API call every x time? I've have tried it with an timer and also with a PollingTimer class. Nothing is working fine. The app is crashing when the Api has new data.
Asked
Active
Viewed 91 times
0
-
When asking a question, always include relevant code - show the code you tried And when an error happens, show the text of the error message, and which line of code causes the error. https://stackoverflow.com/help/how-to-ask – ToolmakerSteve Jul 15 '22 at 22:23
-
1“Nothing is working” and “app is crashing” are useless descriptions of your problem. Post the relevant code, describe what specifically is not working, give details of the exception causing the crash. – Jason Jul 16 '22 at 00:38
-
If you put the network request in the main thread, it will block the UI. So you can try to use the background tasks to call the api. You can check the [similar case](https://stackoverflow.com/questions/34923444/does-xamarin-forms-support-periodic-background-tasks). – Liyun Zhang - MSFT Jul 19 '22 at 01:44