Skip to content
New issue

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

华为荣耀v8最新的7.0系统上的一些问题 #13

Open
HsXuTao opened this issue Apr 11, 2017 · 3 comments
Open

华为荣耀v8最新的7.0系统上的一些问题 #13

HsXuTao opened this issue Apr 11, 2017 · 3 comments

Comments

@HsXuTao
Copy link

HsXuTao commented Apr 11, 2017

华为荣耀v8最新的7.0系统上,明明应用的悬浮窗权限没有给,但是依旧能打开type为TYPE_SYSTEM_ALERT的悬浮窗。
而且您的FloatWindowManager似乎也未能跳到悬浮窗管理页面(应该说跳转的位置不够合理)。希望能看看

@HsXuTao
Copy link
Author

HsXuTao commented Apr 11, 2017

华为mates上(6.0的系统)跳转也不对,而且跳出来的界面进不去悬浮窗管理

@HsXuTao
Copy link
Author

HsXuTao commented Apr 11, 2017

经过测试,似乎直接调用emui3.1的方法可行(测试了emui5.0和emui4.1)

只不过华为的机子可能也得像魅族一样单独适配了

ps:FloatWindowManager的commonROMPermissionApply添加对华为机型的单独操作。
else if(RomUtils.checkIsHuaweiRom()){
huaweiROMPermissionApply(context);

并且将HuaweiUtils.applyPermission默认调用3.1的适配方法:
Intent intent = new Intent();
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// ComponentName comp = new ComponentName("com.huawei.systemmanager","com.huawei.permissionmanager.ui.MainActivity");//华为权限管理
// ComponentName comp = new ComponentName("com.huawei.systemmanager","com.huawei.permissionmanager.ui.SingleAppActivity");//华为权限管理,跳转到指定app的权限管理位置需要华为接口权限,未解决
ComponentName comp;
if (RomUtils.getEmuiVersion() == 3.0) {
//emui 3.0 的适配
comp = new ComponentName("com.huawei.systemmanager", "com.huawei.notificationmanager.ui.NotificationManagmentActivity");//悬浮窗管理页面
intent.setComponent(comp);
} else {
//emui 3.1和以后的适配(测试到emui5.0和emui4.1)
comp = new ComponentName("com.huawei.systemmanager", "com.huawei.systemmanager.addviewmonitor.AddViewMonitorActivity");//悬浮窗管理页面
intent.setComponent(comp);
}
context.startActivity(intent);

@zhaozepeng
Copy link
Owner

OK,等项目结束,抽时间处理一下

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants