I have a simple main activity with 3 buttons, and a background service that runs when Wifi connection is detected. My main activity polls the database on onCreate and displays the status. What i want is to force an Activity to redraw that textview every few second. I dont want to use binders or connect to service. Just some simple way to ask database every few second for a status.
Here is my code.
mdbHelper.open();
Cursor cursor = mdbHelper.fetchAllArticles();
first = cursor.getCount();
cursor = mdbHelper.fetchAllFeeds();
second = cursor.getCount();
cursor.close();
mdbHelper.close();
myTextView.setText(first + " in articles and " + second + " in feeds.");
I can't seem to update myTextView from any other method except in onCreate...
Thanks!