当前位置: 首页 > 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.zqtcl.cn/news/386731/

相关文章:

  • 上海创意网站建设电子商务毕业设计网站建设
  • 如何让网站打不开 解析wordpress pdf检索
  • 网站建设大作业感想台州企业网站模板建站
  • 淄博网站的优化上海营销网站建站公司
  • 长春网站建设硕成传媒长春电商网站建设哪家好
  • 舟山建设管理网站手表交易网站
  • 如何电话推销客户做网站沉浸式展厅搭建商
  • 重庆网站建设开发e福州官方网站
  • 网站怎么可以被收录广州网站建设全包
  • 网站备案期间如何采购需求网站建设
  • 东莞seo网站优化运营南通网站排名外包
  • 新能源网站建设唐山专业网站建设公司
  • 石基网站建设临沂网站优化哪家好
  • 用node.js可以做网站吗上海做网站 公司有哪些
  • 淄博网站建设详细策划一个域名解析多个网站
  • 无锡网站建设首选捷搜网站优化大赛
  • 部门网站建设多少钱百度关键词挖掘查询工具
  • 做游戏直播那个网站asp做网站教程
  • 网站建设小程序开发情侣头像制作素材图片
  • spoc课程网站建设专业彩票网站建设
  • 创建网站需要注意什么忻州市城乡建设管理局网站
  • 万江做网站wordpress 动静
  • 北京自助模板建站遂宁企业网络推广方案
  • 湖南建设科技节能协会网站武夷山景区网站建设特点
  • 那些网站建设的好百度搜索风云排行榜
  • 网站开发 模板 c沈阳市建设工程质量检测中心网站
  • 企业网站设计专业好吗做钓鱼网站要具备什么
  • 广西备案工信部网站用asp.net做后台网站
  • 静态网站漏洞wordpress 外卖
  • 暗网做网站温州做网络推广的公司