Java一行代码
1.整数格式化成0X 的形式字符串
String hour=String.format("%02d", txtWaringTime.getCurrentHour());
String minute=String.format("%02d", txtWaringTime.getCurrentMinute());
2.导出sqlLite数据库
DBHelper dbHelper = new DBHelper(getApplicationContext());
SQLiteDatabase db = dbHelper.getWritableDatabase();
String dbPathString=db.getPath();
FileUtil.copyfile(new File(db.getPath()), new File(
Environment.getExternalStorageDirectory()+ "/MNotify.db"), true);