android 5.1 API简介

简介: android 5.1介绍: http://developer.android.com/about/versions/android-5.1.html?utm_campaign=lollipop-51-315&utm_source=dac&utm_medium=blog 5.

android 5.1介绍:

http://developer.android.com/about/versions/android-5.1.html?utm_campaign=lollipop-51-315&utm_source=dac&utm_medium=blog

5.1的targetSdkVersion 为 "22"

 

看下新特新:

1

Multiple SIM Card Support

Android 5.1 adds support for using more than one cellular carrier SIM card at a time. This feature lets users activate and use additional SIMs on devices that have two or more SIM card slots.

You can access information about the currently active SIM through the SubscriptionManager class, including whether or not the device is considered to be roaming on the current network. This information is useful for developers who want to throttle their apps' data access down or off for device users who are sensitive to data access charges. Your app can be alerted to changes in a device's current network connection by requesting the READ_PHONE_STATE permission and settingSubscriptionManager.OnSubscriptionsChangedListener on the SubscriptionManager object.

多个SIM卡的支持

你可以通过访问subscriptionmanager类激活SIM卡的信息,包括该设备是否是在当前的网络。可以有效控制应用的网络访问。

可以通过设置READ_PHONE_STATE配合SubscriptionManager.OnSubscriptionsChangedListener来对网络连接进行有效控制。

 

-----------------------------------------------------------------------------------

Deprecated HTTP Classes

The org.apache.http classes and the AndroidHttpClient class have been deprecated in Android 5.1. These classes are no longer being maintained and you should migrate any app code using these APIs to the URLConnection classes as soon as possible.

 

httpclient 在android 5.1不建议使用,不就将会被废弃,强力建议使用HttpUrlConnection

----------------------------------------------------------------------------------

Carrier Services

Android 5.1 provides support for telecommunication service providers to create apps that can perform carrier provisioning tasks on an Android device. These APIs provide a secure and flexible way for carrier-developed apps to perform these tasks and be distributed through Google Play. Apps that use these functions must be signed by a certificate that matches the certificate in the device's Universal Integrated Circuit Card (UICC).

The carrier service APIs have been added to the TelephonyManager class, the SmsManager class, and the newCarrierMessagingService class. Apps can check for access to these APIs by calling the hasCarrierPrivileges() method. Apps that call these APIs without access receive a SecurityException.

 

Android 5.1提供了对电信服务提供商创建的应用程序,可以在Android上实现载波配置任务支持。这些API提供了一个安全和灵活的方式为载体开发的应用程序来执行这些任务和分布在google市场。应用程序使用这些功能必须由证书匹配的证书在设备的通用集成电路卡(UICC)签署。

承运人服务API被添加到telephonymanager类,该类和类newcarriermessagingservice smsmanager。应用程序可以通过调用hascarrierprivileges()方法访问这些API检查。应用程序调用这些API没有收到SecurityException。

 

相关文章
|
8月前
|
定位技术 API 开发工具
Android 按照步骤接入百度地图API,定位显示不了解决办法
Android 按照步骤接入百度地图API,定位显示不了解决办法
229 0
|
4月前
|
缓存 算法 Java
Linux内核新特性年终大盘点-安卓杀后台现象减少的背后功臣MGLRU算法简介
MGLRU是一种新型内存管理算法,它的出现是为了弥补传统LRU(Least Recently Used)和LFU(Least Frequently Used)算法在缓存替换选择上的不足,LRU和LFU的共同缺点就是在做内存页面替换时,只考虑内存页面在最近一段时间内被访问的次数和最后一次的访问时间,但是一个页面的最近访问次数少或者最近一次的访问时间较早,可能仅仅是因为这个内存页面新近才被创建,属于刚刚完成初始化的年代代页面,它的频繁访问往往会出现在初始化之后的一段时间里,那么这时候就把这种年轻代的页面迁移出去
|
1月前
|
分布式计算 API 数据处理
Flink【基础知识 01】(简介+核心架构+分层API+集群架构+应用场景+特点优势)(一篇即可大概了解flink)
【2月更文挑战第15天】Flink【基础知识 01】(简介+核心架构+分层API+集群架构+应用场景+特点优势)(一篇即可大概了解flink)
60 1
|
6月前
|
SQL 人工智能 Java
Android 命令行工具简介
Android SDK 中包含了开发应用所需的多个软件包。本页列出了可供使用的最重要的命令行工具(按提供这些工具的软件包整理)。
|
6月前
|
SQL 人工智能 移动开发
Android etc1tool之png图片转换pkm 和 zipalign简介
etc1tool 是一种命令行实用程序,可用于将 PNG 图片编码为 ETC1 压缩标准格式(PKM),并将 ETC1 压缩图片解码回 PNG。
|
3月前
|
JavaScript 前端开发 IDE
Vue3【为什么选择Vue框架、Vue简介 、Vue API 风格 、Vue开发前的准备 、Vue项目目录结构 、模板语法、属性绑定 、 】(一)-全面详解(学习总结---从入门到深化)
Vue3【为什么选择Vue框架、Vue简介 、Vue API 风格 、Vue开发前的准备 、Vue项目目录结构 、模板语法、属性绑定 、 】(一)-全面详解(学习总结---从入门到深化)
50 1
|
8月前
|
Java Linux API
#1,Android 体系结构 2000字简介 入门Android(Studio)开发
#1,Android 体系结构 2000字简介 入门Android(Studio)开发
|
4月前
|
Linux 网络安全 开发工具
Android APP入门之Android的简介以及Android Studio开发环境的搭建和测试(2022最新 图文解释 简单易懂)
Android APP入门之Android的简介以及Android Studio开发环境的搭建和测试(2022最新 图文解释 简单易懂)
63 0
|
4月前
|
Java 测试技术 持续交付
百度搜索:蓝易云【NetMock简介:简化 Java,Android和Kotlin多平台中的HTTP请求测试?】
使用NetMock,您可以在单元测试、集成测试和端到端测试中轻松地模拟和验证HTTP请求和响应,而无需实际发送请求到外部服务。这样可以提高测试的可靠性和可控性,并加快测试执行的速度。无论是在开发过程中还是在持续集成环境中,NetMock都可以帮助您更轻松地进行HTTP请求测试,提高代码质量和稳定性。
41 1
|
6月前
|
XML Java 开发工具
Android apkanalyzer简介
Android apkanalyzer简介