您的位置:首页 > 移动开发 > Android开发

Android6.0改动之其他改变

2016-06-07 01:15 375 查看
1、Android6.0发布的版本介绍了一些新的对于空闲设备和app的电池优化机制。这些特性影响了之前版本的app.
Doze模式,打瞌睡模式;如果用户对使用的手机长时间不操作锁屏,设备就会进入Doze模式。在该模式下,系统进入休眠,设备会周期性的短暂执行一些操作来保证app数据同步。系统会忽略wake locks。系统在该模式下使用闹钟应该用setAndAllowWhileIdle() or setExactAndAllowWhileIdle();系统会停止wifi扫描,
App的待机,当用户长时间没有玩这个app的时候,系统会禁用网络连接,暂停同步。
所以对于需要实时消息的app要格外注意,应该使用
Using GCM to Interact with Your App While the Device is Idle
2、Android6.0移除了Apache Http client。
3.Notifications,移除了Notification.setLatestEventInfo(),使用Notification.Builder 构建。
4、AudioManager类中一些方法的改动,setStreamSolo()过时,使用requestAudioFocus();setStreamMute() 过时,使用adjustStreamVolume()
5.Android Keystore provider不再支持DSA
6.Wifi和网络等等
7.指纹识别, FingerprintManager,Voice交互Voice Actions
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: