String databaseFilename = DATABASE_PATH + "/" + DATABASE_NAME
File dir = new File(DATABASE_PATH)
if (!dir.exists())
dir.mkdir()
if (!(new File(databaseFilename)).exists()) {
InputStream is = context.getResources().openRawResource(R.raw.jobexam)
FileOutputStream fos = new FileOutputStream(databaseFilename)
byte[] buffer = new byte[8192]
int count = 0
while ((count = is.read(buffer)) >0) {
fos.write(buffer, 0, count)
}
fos.close()
is.close()
}
db = SQLiteDatabase.openOrCreateDatabase(databaseFilename, null)
service里的变量变化了,可以发一个消息给主UI,消息里面带上数据,主UI再做出相应的动作。强烈指责“杭翠波”,把我之前
回答别人的问题
的答案据为己有,然后贴在这
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)