I have a widget which I am trying to use to display information from my app\'s local database inside of a listview.
I\'m using the RemoteViewsService.RemoteViewsFact
Put this in your onDataSetChanged() method:
Thread thread = new Thread() {
public void run() {
query();
}
};
thread.start();
try {
thread.join();
} catch (InterruptedException e) {
}
Fetch data from the database inside query() method. I do not know why fetching data in a separate thread helps get around this problem, but it works! I got this from one of the Android examples.