天天看點

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

看下新特新:

1

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.

多個SIM卡的支援

你可以通過通路subscriptionmanager類激活SIM卡的資訊,包括該裝置是否是在目前的網絡。可以有效控制應用的網絡通路。

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

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

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

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).

Android 5.1提供了對電信服務提供商建立的應用程式,可以在Android上實作載波配置任務支援。這些API提供了一個安全和靈活的方式為載體開發的應用程式來執行這些任務和分布在google市場。應用程式使用這些功能必須由證書比對的證書在裝置的通用內建電路卡(UICC)簽署。

承運人服務API被添加到telephonymanager類,該類和類newcarriermessagingservice smsmanager。應用程式可以通過調用hascarrierprivileges()方法通路這些API檢查。應用程式調用這些API沒有收到SecurityException。

繼續閱讀