多线程对数据库进行操作会出现 database is locked.....
解决办法是采取单例模式获得DatabaseHelper
private static DatabaseHelper instance = null;然后不关闭数据库,这样就不会出现 database is locked了
public static DatabaseHelper getInstance(Context context) {
if (instance == null) {
instance = new DatabaseHelper(context);
}
return instance;
}