开发者

Help - android databases

I have an application which downloads contacts periodically (using a service and asyn task), but at the same time I read the contacts which were already downloaded.

My problem is, when I'm downloading the contacts, I try to read the database, the application crashes.

Could someone explain 开发者_开发问答to me how I can read and write to the database simultaneously.

Any help would be much appreciated.


Why dont you try getReadableDatabase() of database helper only for reading and getWritableDatabase() of the same for sake of writing. may be this would do the trick.

I hope you have implmented onUpdate method correctly, this could result in some serious currupt data.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜