Issue
I'm currently working on a personal project that allow me to view the days news at a quick glance, I use the package NewsApi and everything is going great for now, except that I use a free account and am therefore limited to 100 requests per day, I'm curious as to if I can limit my API calls by only making one a day, and not making another call till I open the app again.
PS: I've had a look at the package Cron but it seems it'll make the calls even if i don't open the app
Solution
When you first start the app, request the news and then store them maybe in a file or using shared preferences.
Also store the DateTime when you last fetched the news.
Then only fetch the new news when DateTime.now() is the next day relative to the stored time.
Then update the stored news and time with the new one.
Answered By - MindStudio Answer Checked By - Dawn Plyler (WPSolving Volunteer)