简易的悬浮窗控制台输出控件
repositories {
flatDir {
dirs 'libs'
}
}
implementation "net.danlew:android.joda:2.10.2"
implementation(name:'consolelog-release',ext:'aar')
startService(new Intent(MainActivity.this, LoggingService.class));
if(!Settings.canDrawOverlays(this)){
Toast.makeText(this, "当前无权限,请授权", Toast.LENGTH_SHORT).show();
startActivityForResult(new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getPackageName())), 0);
}
ConsoleLogger.i(TAG,"T:"+mname+" this is infomation!"+ DateTimeUtil.dateToStr(new Date()));
ConsoleLogger.e(TAG,"T:"+mname+" this is error!"+ DateTimeUtil.dateToStr(new Date()));
ConsoleLogger.d(TAG,"T:"+mname+" this is debug!"+DateTimeUtil.dateToStr(new Date()));
ConsoleLogger.v(TAG,"T:"+mname+" This is VERBOSE!"+DateTimeUtil.dateToStr(new Date()));
ConsoleLogger.w(TAG,"T:"+mname+" this is warn!"+DateTimeUtil.dateToStr(new Date()));
ConsoleLogger.wtf(TAG,"T:"+mname+" this is WTF!"+DateTimeUtil.dateToStr(new Date()));
ConsoleLogger.println("123123");
ConsoleLogger.e(TAG,new Throwable());