zoukankan      html  css  js  c++  java
  • 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。

  • 相关阅读:
    python之数据规范化(Min-Max规范化)
    python对全班成绩进行数据清洗(pandas的使用)
    python统计全班的成绩(numpy的使用)
    python爬虫之动态渲染页面抓取-(Selenium)的使用
    python之小米应用商店搜索
    python之小米应用商店爬虫
    cmds系统数据库源端大表数据更新优化
    临时表空间扩容
    性能优化概要(2)数据库时间,监控和优化工具
    cmds挖掘redolog
  • 原文地址:https://www.cnblogs.com/androidsuperman/p/4331169.html
Copyright © 2011-2022 走看看