Android 5.1 API
5.1 Android ( LOLLIPOP_MR1 ) is an update to Lollipop version provides many new features for users and application developers. This article aims to introduce the most noteworthy of which the new API.
Update the target API level
To start developing Android 5.1 application, use the SDK Manager Download Android 5.1 SDK Platform and system image. Then set your application development projects, in order to use "22"
the targetSdkVersion
. Android 5.1 installed on your system images and application testing, and then publish updates apply this change.
You can join condition in the code, in your execution minSdkVersion
before the inspection system does not support the API API level implementations provide support while using Android 5.1 API is still the old version. To learn more about how to maintain backward compatibility, please read support different platform version .
Multi SIM card support
Android 5.1 adds support for the use of multiple cellular operators SIM cards simultaneously. With this feature, the user can activate and having two or more additional device on the SIM card SIM slot.
You can SubscriptionManager
get information about the currently activated SIM classes, including whether the device is considered to roam on the current network. Who want to reduce or turn off data access application developers in terms of data access for the cost-sensitive device users, this information is very useful. By requesting READ_PHONE_STATE
permissions and SubscriptionManager
object settings SubscriptionManager.OnSubscriptionsChangedListener
change status, remind your attention to application of the device is currently connected to the network.
HTTP classes deprecated
Android 5.1 deprecated org.apache.http
classes and android.net.http.AndroidHttpClient
class. These classes will no longer be retained, you should use any application code will be migrated to the API as soon as URLConnection
classes.
Operator Services
Android 5.1 supports communications service providers to create applications operators can perform configuration tasks on Android devices. Using these API, an application operators to develop a safe, flexible and publish these tasks through Google Play. Applications that use these functions must obtain a signed certificate, the certificate Universal Integrated Circuit Card (UICC) and equipment of this certificate matches.
Operator services API has been added to the TelephonyManager
class, SmsManager
the class and the new CarrierMessagingService
class. Applications can call hasCarrierPrivileges()
the method, check whether you can access the API. You can call the API but can not access these applications will receive SecurityException
.