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);

Java一行代码

相关文章:

  • 2021-06-25
  • 2022-12-23
  • 2021-09-10
  • 2021-10-24
  • 2021-06-10
  • 2022-12-23
  • 2021-06-06
猜你喜欢
  • 2021-12-15
  • 2022-01-09
  • 2021-11-11
  • 2022-12-23
  • 2022-12-23
  • 2021-10-30
  • 2021-08-14
相关资源
相似解决方案