Android 5.1 Introduction:
Http://developer.android.com/about/versions/android-5.1.html?utm_campaign=lollipop-51-315&utm_source=dac &utm_medium=blog
The 5.1 targetSdkVersion
is "22"
Look at the NEW:
1
Multiple SIM Card Support
Android 5.1 adds support for using the than one cellular carrier SIM card at a time. This feature lets users activate, and use additional SIMs on devices, that has both 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 is roaming on the current network. This information was useful for developers who want to throttle their apps ' data access down or off for device users who AR E sensitive to data access charges. Your app can alerted to changes in a device's current network connection by requesting The  read_phone_state
permission and setting Subscriptionmanager.onsubscriptionschangedlistener
on The  subscriptionmanager
Object.
Support for multiple SIM cards
You can activate the SIM card information by accessing the SubscriptionManager class, including whether the device is on the current network. You can effectively control network access for your app.
You can set up mates by setting READ_PHONE_STATE
SubscriptionManager.OnSubscriptionsChangedListener来对网络连接进行有效控制。
-----------------------------------------------------------------------------------
Deprecated HTTP Classes
The Org.apache.http classes and the Androidhttpclient class has been deprecated in Android 5.1. These classes is no longer being maintained and you should migrate any app code using these APIs to the URLConnection CLA SSEs as soon as possible.
HttpClient in Android 5.1 is not recommended, will not be discarded, strongly recommend the use of HttpURLConnection
----------------------------------------------------------------------------------
Carrier Services
Android 5.1 provides support for telecommunication service providers to create apps that can perform carrier provisioning Tasks on Android device. These APIs provide a secure and flexible A-carrier-developed apps to perform these tasks and is distributed through Google Play. Apps, use these functions must is signed by a certificate that matches the certificate in the device ' s Universal integ Rated Circuit Card (UICC).
The carrier service APIs has been added to the class, the TelephonyManager
SmsManager
class, and the new CarrierMessagingService
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 provides applications created for telecom service providers to enable carrier configuration task support on Android. These APIs provide a secure and flexible way for carriers to develop applications to perform these tasks and distribute them in the Google market. Applications that use these features must be signed by certificates that match the certificate on the device's universal Integrated circuit card (UICC).
The Carrier service API is added to the Telephonymanager class, and the class and class Newcarriermessagingservice Smsmanager. Applications can access these API checks by calling the Hascarrierprivileges () method. The application calls these APIs without receiving SecurityException.
Introduction to Android 5.1 API