My program need to check online if something has been added to a database by someone.
A simple
checkifdatahasbeenadded();
does the trick.
I need to check these every second or so, but I'm not sure how to do this.
I can link this to a button,
public void onButtonClicked(View view) {
checkifdatahasbeenadded();
};
but this isn't a good idea, because then only if the button is pressed the check is done.
I simply need to check the data every second.
The data is then used to update the listview in screen.
What's the best way to do this ?
Thanks