So I\'ve just implemented a widget for my app. It gets its data from the database through my ContentProvider
. I define my own read/write-permissions in my manifest,
Most likely, it's because you are using the context of the widget, which will be that of the homescreen. Try the following line in your code:
mCursor = ListWidgetService.this.getContentResolver().query(
NotePadProvider.CONTENT_VISIBLE_URI, PROJECTION, listWhere, null,
sortOn);
Note how I replaced the mContext.
. A Service is a Context of its own, which should have the correct permission, given your manifest.