当前位置: 首页 > news >正文

商城网站建设怎么建设成都网站制作系统

商城网站建设怎么建设,成都网站制作系统,长沙建网站需要多少钱,nodejs php wordpress目录Android防录屏和截屏关于WindowManager.LayoutParams.FLAG_SECURE关于Display.FLAG_SECUREiOS防录屏和截屏监听截屏录屏监听需求与安全总是对立的#xff0c;有新的需求#xff0c;就有新的接口开放#xff0c;但随之而来的就是利用新接口或者新接口的使用者#xff08… 目录Android防录屏和截屏关于WindowManager.LayoutParams.FLAG_SECURE关于Display.FLAG_SECUREiOS防录屏和截屏监听截屏录屏监听需求与安全总是对立的有新的需求就有新的接口开放但随之而来的就是利用新接口或者新接口的使用者app使用者不按预期出牌。 简单说我们打出了一把刀有人用来切菜有人用来砍柴有人却用来行凶… 大概是这个意思互联网软件行业特别多尤其是破解、攻击。 言归正传今天来探讨一下android和ios的防录屏。录屏接口的开放ios和android开放都比较迟早期系统都是没有的功能但随着用户的需求陆续都开放了录屏的接口。随之而来的就是应用安全-防录屏。典型的应用是金融、银行类的APP。 Android防录屏和截屏 Android比较容易只需要在 Activity 的onCreate() 方法中添加一行代码 getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);一般情况下哪些activity不希望被截屏添加上述代码当然多的话肯定是做一个BaseActivityBaseActivity中加这行代码就可以。当这样的activity在前台时用户启动截屏或录屏系统会提示安全而不能截屏或录屏。从源头就断掉了录屏和截屏。 关于WindowManager.LayoutParams.FLAG_SECURE /** Window flag: treat the content of the window as secure, preventing * it from appearing in screenshots or from being viewed on non-secure * displays. * * See {link android.view.Display#FLAG_SECURE} for more details about * secure surfaces and secure displays. */ public static final int FLAG_SECURE 0x00002000; 关于Display.FLAG_SECURE ** * Display flag: Indicates that the display has a secure video output and * supports compositing secure surfaces. * * If this flag is set then the display device has a secure video output * and is capable of showing secure surfaces. It may also be capable of * showing {link #FLAG_SUPPORTS_PROTECTED_BUFFERS protected buffers}. * * If this flag is not set then the display device may not have a secure video * output; the user may see a blank region on the screen instead of * the contents of secure surfaces or protected buffers. * * Secure surfaces are used to prevent content rendered into those surfaces * by applications from appearing in screenshots or from being viewed * on non-secure displays. Protected buffers are used by secure video decoders * for a similar purpose. * * An application creates a window with a secure surface by specifying the * {link WindowManager.LayoutParams#FLAG_SECURE} window flag. * Likewise, an application creates a {link SurfaceView} with a secure surface * by calling {link SurfaceView#setSecure} before attaching the secure view to * its containing window. * * An application can use the absence of this flag as a hint that it should not create * secure surfaces or protected buffers on this display because the content may * not be visible. For example, if the flag is not set then the application may * choose not to show content on this display, show an informative error message, * select an alternate content stream or adopt a different strategy for decoding * content that does not rely on secure surfaces or protected buffers. * * * see #getFlags */ public static final int FLAG_SECURE 1 1; iOS防录屏和截屏 ios 主要是以监听状态。 监听截屏 UIApplication中仅有用户截屏后的通知应用中只会收到已经截屏的通知并没办法干预(iOS8之后失效)。 // This notification is posted after the user takes a screenshot (for example by pressing both the home and lock screen buttons) UIKIT_EXTERN NSNotificationName const UIApplicationUserDidTakeScreenshotNotification NS_AVAILABLE_IOS(7_0);监听到之后进行处理 -(void)viewDidAppear:(BOOL)animated{[super viewDidAppear:animated];[[NSNotificationCenter defaultCenter]addObserver:self selector:selector(screenshots) name:UIApplicationUserDidTakeScreenshotNotification object:nil]; }-(void)screenshots {UIAlertView *alert [[UIAlertView alloc] initWithTitle:nil message:[安全提醒]内含个人资金账户。不要截图录制或分享给他人以保障资金账户安全。 delegate:nil cancelButtonTitle:nil otherButtonTitles:确定, nil];[alert show];-(void)dealloc {[[NSNotificationCenter defaultCenter] removeObserver:self name:UIApplicationUserDidTakeScreenshotNotification object:nil]; }录屏监听 iOS 11 SDK 中新增了UIScreen的API用以告知应用当前屏幕正在录屏。当UIScreen.isCaptured 为true时表示当前屏幕正在被录制、镜像或被Airplay 发送。 当录屏状态发生变化时UIKit会发送UIScreenCapturedDidChange的notification。 基于此我们可以在应用中接收此通知来对用户的录屏行为做相应的处理 -(void)viewWillAppear:(BOOL)animated{[super viewWillAppear:animated];//检查当前设备是否处于录屏状态这里应该是需要定时器来获取否则只有加载的时候才会判断UIScreen * sc [UIScreen mainScreen];if (available(iOS 11.0, *)) {if (sc.isCaptured) {NSLog(录屏中);[self screenshots];}} else {}if (available(iOS 11.0, *)) { //注册通知监测当前设备录屏状态发生变化[[NSNotificationCenter defaultCenter]addObserver:self selector:selector(screenshots) name:UIScreenCapturedDidChangeNotification object:nil];} else {} }-(void) screenshots {UIAlertView *alert [[UIAlertView alloc] initWithTitle:nil message:正在录屏请注意帐号密码安全问题 delegate:nil cancelButtonTitle:nil otherButtonTitles:确定, nil];[alert show]; }-(void)dealloc {if (available(iOS 11.0, *)) {[[NSNotificationCenter defaultCenter] removeObserver:self name:UIScreenCapturedDidChangeNotification object:nil];} else {} }部分引用 https://www.jianshu.com/p/a94969ddd1dc
http://www.pierceye.com/news/386731/

相关文章:

  • 班级网站 建设模板做任务佣金网站源码
  • 网站的关键词库广州建网站培训
  • 好的网页设计网站网站排名提升工具
  • 个人网站需要那些企查查入口网页版
  • 怎么用自己主机做网站、淮南网站推广
  • 丰台网站制作网站域名.xin
  • 省建设厅网站6工作室网页模板
  • 怎么制作免费网站教程视频wordpress 准迁
  • html5新增标签seo网址超级外链工具
  • 自己做的网站访问不了建站如何挣钱
  • 网盘做网站做网站推广员工
  • 河北正规网站建设比较网页制作平台哪家好
  • 2017网站seo如何做wordpress设置登录背景
  • 网站的模块怎么做网站建设的技术支持包括
  • 青岛网站设计哪家好游戏小程序开发定制
  • 建设网站西丽提升网站建设品质
  • 大良营销网站建设方案广东东莞划定多个高风险区
  • 毕业设计做网站用什么品牌网站建设新闻
  • c 网站开发用的人多吗做it行业招标网站有哪些
  • 招聘做牙技工的网站用html框架做网站
  • 本地wordpress站点上传央企网站群建设
  • 广州免费自助建站开发wordpress公园
  • 淘宝客建网站简单网站建设优化推广
  • 长沙做网站找哪家好毕业设计开题报告网站开发
  • 可以写代码的网站有哪些问题吗网页设计与网站建设期末考试试卷
  • 美工做网站怎么收费网站设计规范
  • 建网站需要注意的问题企业整合营销
  • 2018网站开发的革新wordpress 更新数据库
  • 做现金贷的网站有哪些如何自己建立一个网站
  • 网站制作公司前十名wordpress保存的字体大小