码迷,mamicode.com
首页 > 移动开发 > 详细

android 5.1 API简介

时间:2015-03-11 23:19:51      阅读:283      评论:0      收藏:0      [点我收藏+]

标签:

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简介

标签:

原文地址:http://www.cnblogs.com/androidsuperman/p/4331169.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!