We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
缩小窗口需额外添加权限,这里分享一个我解决的方法 /** * 6.0视频窗口运行权限 */ if (Build.VERSION.SDK_INT >= 23) { if (!Settings.canDrawOverlays(context)) { Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION); intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); context.startActivity(intent); return; } else { //TODO do something you need if (floatView != null) { // 添加悬浮窗 View 到窗口 windowManager.addView(floatView, layoutParams); } } } else { //Android6.0以下,不用动态声明权限 if (floatView != null) { // 添加悬浮窗 View 到窗口 windowManager.addView(floatView, layoutParams); } }
The text was updated successfully, but these errors were encountered:
恩 感谢分享,我这个暂时还没有添加运行时权限适配,后边会升级搞一下 😁
Sorry, something went wrong.
No branches or pull requests
缩小窗口需额外添加权限,这里分享一个我解决的方法
/**
* 6.0视频窗口运行权限
*/
if (Build.VERSION.SDK_INT >= 23) {
if (!Settings.canDrawOverlays(context)) {
Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
return;
} else {
//TODO do something you need
if (floatView != null) {
// 添加悬浮窗 View 到窗口
windowManager.addView(floatView, layoutParams);
}
}
} else {
//Android6.0以下,不用动态声明权限
if (floatView != null) {
// 添加悬浮窗 View 到窗口
windowManager.addView(floatView, layoutParams);
}
}
The text was updated successfully, but these errors were encountered: