2019独角兽企业重金招聘Python工程师标准>>>

2015.03.13更新

恩 前几天看到android 5.1 出来了,Screen pinning这一部分有改动,具体改了什么还没看到。

这个暂时相对冷门的功能,如果你能看到这篇文章说明你还是有点了解的。

屏幕固定是android 5.0 上的新功能 其Api介绍如下:

我说一点比较重要的吧,就是开了屏幕固定以后,通知栏和状态栏会隐藏,home键和recent键会失效(单独按会失效),然后还不准启动其他activity。

就是说 你只能在这个应用内部干事情。比如你吧手机借给别人的时候就可以用这个功能 。

至于这个“尚不完善”的功能的消极作用会在文末讲一点。

-------------------------------Apis-------------------------------------------

Screen pinning

Android 5.0 introduces a new screen pinning API that lets you temporarily restrict users from leaving your task or being interrupted by notifications. This could be used, for example, if you are developing an education app to support high stakes assessment requirements on Android, or a single-purpose or kiosk application. Once your app activates screen pinning, users cannot see notifications, access other apps, or return to the home screen, until your app exits the mode.

There are two ways to activate screen pinning:

  • Manually: Users can enable screen pinning in Settings > Security > Screen Pinning, and select the tasks they want to pin by touching the green pin icon in the recents screen.

  • Programmatically: To activate screen pinning programmatically, call startLockTask() from your app. If the requesting app is not a device owner, the user is prompted for confirmation. A device owner app can call the setLockTaskPackages() method to enable apps to be pinnable without the user confirmation step.

When task locking is active, the following behavior happens:

  1. When you're on the pinned screen, touch and hold Overview  and Back  at the same time.

  2. Release both buttons and the screen will be unpinned.

  1. Make sure that screen pinning is enabled on your device.

  2. Open an app and go to the screen you want to pin.

  3. Touch Overview  on your device.

  4. Swipe up to reveal the pin icon  on the bottom right corner of your selected screen.

  5. Touch the pin icon .

  6. If you want the lock screen to appear after an app is unpinned, check the box next to "Ask for unlock pattern before unpinning."

  7. Touch Start.

  1. Open your device's Settings menu .

  2. Under "Personal," touch Security.

  3. Under "Advanced," touch Screen pinning.

  4. Move the switch on or off.

转载于:https://my.oschina.net/weichou/blog/509751

Android 5.0 Screen pinning 屏幕固定功能相关推荐

  1. Android 开启关闭屏幕固定功能

    说明:屏幕固定是android自带的功能,在需要固定显示app,不允许切换其他app的时候使用. 业务需求:程序升级过程中,禁止退出后台界面. android版本:android 11 Android ...

  2. Android多媒体二:Android 5.0新增的屏幕捕捉

    Android多媒体二:Android 5.0新增的屏幕捕捉 Android 5.0新增了MediaProjectionManager管理器,该管理器可以非常方便地实现屏幕捕捉功能. 使用MediaP ...

  3. Android 6.0系统新特性及功能说明

    本文通过翻译官方文档和google开发者大会资料收集得出,转载请注明出处. Android 6.0系统新特性及功能说明... 1 1       优化用户体验:... 1 1.1        应用权 ...

  4. 图文详解谷歌Android 7.0的20个新功能

    导语:谷歌已正式对外发布Android 7.0 Nougat(牛轧糖)操作系统,它将会率先登陆Nexus设备,之后才会陆续登陆其他的智能手机.Android 7.0中包含一系列的新功能和改进,它们将会 ...

  5. android9多了什么功能,Android 9.0 都增加了什么功能?

    Android 每年的新版本都会有一些新的功能出现,虽然有些已经是国产手机用过的,但从系统层面支持的话,可以得到更好的体验,也可以间接地减少系统资源的浪费和电量的消耗,我们来看看这次的Android ...

  6. wifi直连 android,Android 4.0 WiFiDirect (WiFi直连)功能

    该楼层疑似违规已被系统折叠 隐藏此楼查看此楼 Android 4.0引入了一项很重要的技术就是 WiFiDirect (WiFi直连) ,它可以让WiFi设备无需热点即可实现两个WiFi设备的P2P数 ...

  7. Android 9.0 “Pistachio Ice Cream”新功能和特性

    热文导读 | 点击标题阅读 一份年薪30万的Android面试宝典,附答案 吊炸天!74款APP完整源码! 一个 IT 青年北漂四年的感悟 来自:开源中国 内容整理自 快科技:http://news. ...

  8. android 6.0 点亮屏幕,android6.0 otg连接设备 点亮屏幕(案例)

    现在我们otg连接设备的时候有点亮屏幕的需求. 解决方法我们可以在识别设备的时候,去调用PowerManager的wakeup唤醒(点亮)设备. void InputReader::processEv ...

  9. Android P (2)---Android 9.0 “Pistachio Ice Cream”新功能和特性

    据有关消息报道,下一版本安卓(9.0)的初步代号已经确定为"Pistachio Ice Cream"(开心果冰淇淋),并将带来极大的功能变化. 当然了按照Google的惯例,如此长 ...

最新文章

  1. PyTorch 笔记(19)— Tensor 用 GPU 加速
  2. php foreach嵌套foreach,php中foreach怎么嵌套foreach PHP中foreach函数用法?
  3. 如何查看华为EMUI系统APK源码?
  4. 分析及解决SQLServer的死锁问题
  5. Linux企业运维人员最常用192个命令汇总
  6. int类型的实参与int*类型的形参不兼容_谁告诉的你们Python是强类型语言!站出来,保证不打你!...
  7. Vue 里 几个重要的指令
  8. iOS8开发~UI布局(二)storyboard中autolayout和size class的使用详解
  9. CesiumJS 2022^ 原理[2] 渲染架构之三维物体 - 创建并执行指令
  10. Vue源码之 Vue的生命周期
  11. 经过两个月的面试,我给你整理了这些面试考点(Java版)
  12. Linux中 Vi的使用
  13. TCP三次握手连接和TCP四次挥手及大量TIME_WAIT解决方法:
  14. 开源FTP 服务器 FileZilla Server
  15. HTML页面基本结构代码,网页基本代码结构
  16. USB总线-Linux内核USB3.0设备控制器驱动框架分析(四)
  17. Macromedia Flash 8 Video Encoder安装
  18. 史上最全的Java进阶书籍推荐
  19. codeblocks不支持16位,与64位不兼容这个问题
  20. 造轮子之后台管理模板

热门文章

  1. [Jquery Plugin]Jquery Tabs 插件简介-更友好地组织你的页面 (转)
  2. ES6新特性_ES6生成器函数实例_第二个实例---JavaScript_ECMAScript_ES6-ES11新特性工作笔记023
  3. TensorFlow工作笔记001---Centos7.3下安装TensorFlow最新版本,基于python2.7.5的,没有编译TensorFlow的源码
  4. stylegan2-pytorch 自己训练的model 出错
  5. 样本不均衡的解决方法
  6. 9W人脸清洗的问题--20170208
  7. 换了一种管用pip安装方法,还有管用的python版hdf5(包名为h5py)安装方法
  8. GPU GPGPU
  9. C++ 连接Mongo数据库实现增删改差
  10. 随想录(objc的编译)