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.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。
android 5.1 API简介的更多相关文章
- GitHub Android Librarys Top 100 简介
GitHub Android Librarys Top 100 简介 本项目主要对目前 GitHub 上排名前 100 的 Android 开源库进行简单的介绍, 至于排名完全是根据GitHub搜索J ...
- Monkey脚本API简介
一.API简介 LaunchActivity(pkg_name, cl_name):启动应用的Activity.参数:包名和启动的Activity. Tap(x, y, tapDuration): 模 ...
- Android 5.0 API新增和改进
开始开发 要构建 Android 5.0 版应用,您必须先下载 Android SDK,然后使用 SDK 管理器下载 Android 5.0 SDK 平台和系统映像. 更新您的目标 API 级别 要进 ...
- <Android开源库 ~ 1> GitHub Android Libraries Top 100 简介
转载自GitHub Android Libraries Top 100 简介 本项目主要对目前 GitHub 上排名前 100 的 Android 开源库进行简单的介绍, 至于排名完全是根据 GitH ...
- android hook 框架 libinject2 简介、编译、运行
Android so注入-libinject2 简介.编译.运行 Android so注入-libinject2 如何实现so注入 Android so注入-Libinject 如何实现so注入 A ...
- 百度地图API简介
百度地图API简介 在此申明不是我写的,用的是别人的,仅限自己学习 百度地图移动版API(Android)是一套基于Android设备的应用程序接口,通过该接口,可以轻松的访问百度服务和数据,构建功能 ...
- Android休眠唤醒机制简介(二)
本文转载自:http://blog.csdn.net/zhaoxiaoqiang10_/article/details/24408911 Android休眠唤醒机制简介(二)************* ...
- 如何获取用户的地理位置-浏览器地理位置(Geolocation)API 简介
如何获取用户的地理位置-浏览器地理位置(Geolocation)API 简介 一.总结 一句话总结:Geolocation API(地理位置应用程序接口)提供了一个可以准确知道浏览器用户当前位置的方法 ...
- Web Api 简介
ASP.NET Web API 简介 ASP.NET MVC 4 包含了 ASP.NET Web API, 这是一个创建可以连接包括浏览器.移动设备等多种客户端的 Http 服务的新框架, ASP. ...
随机推荐
- UILabel 的属性设置
.设置字体样式(加粗) label.font = [UIFont boldSystemFontOfSize:30]; 6.设置字体类型 label.font = [UIFont fontWithNam ...
- 酷比魔方 iwork10 旗舰版
平板电脑自带的win10的一键恢复不是一般的慢,简直慢出个性了,历经5个小时...必须是个有耐心的人才敢一键恢复,不然强制关机就变砖了...
- C#代码实现把网页文件保存为mht文件
MHT叫“web单一文件”.顾名思义,就是把网页中包含得图片,CSS文件以及HTML文件全部放到一个MHT文件里面.而且浏览器可以直接读取得. 由于项目需要,需实现把指定的网页文件保存为mht文件.于 ...
- BJFU 1397 致我们终将逝去的爱情
LIS 由于要记录轨迹,所以不能用O(nlogn)优化,直接dp加father记录每个节点的转移. #include<cstdio> #include<algorithm> ...
- KVM 命令行启动第一台虚拟机
KVM创建第一台虚拟机 1 创建一个镜像 [root@kvm ~]# qemu-img create -f raw /opt/CentOS6.-x86_64.raw 5G Formatting [ro ...
- 为Android系统内置Java应用程序测试Application Frameworks层的硬件服务
我们在Android系统增加硬件服务的目的是为了让应用层的APP能够通过Java接口来访问硬件服务.那么, APP如何通过Java接口来访问Application Frameworks层提供的硬件服务 ...
- Chapter 1 First Sight——35
The final bell rang at last. I walked slowly to the office to return my paperwork. 最后下课铃响了.我走到了办公室上讲 ...
- JVM调优总结-调优方法
JVM调优工具 Jconsole,jProfile,VisualVM Jconsole : jdk自带,功能简单,但是可以在系统有一定负荷的情况下使用.对垃圾回收算法有很详细的跟踪 JProfiler ...
- SharePoint 2013 APP 开发示例 (二)获取用户信息
SharePoint 2013 APP 开发示例 (二)获取用户信息 这个示例里,我们将演示如何获取用户信息: 1. 打开 Visual Studio 2012. 2. 创建一个新的 SharePo ...
- Go-new和make
new返回指向struct的指针,new仅分配内存,而不对对象的值进行初始化 make返回到strcut的对象,而不是指针,只能创建map,slice,channel对象 make([]string, ...