面试------Android 版本之前的差异(常见,欢迎补充)。

不管你技术如何,只要背点这个,能忽悠倒一片。。

1、WebView JS漏洞 ,Android4.2之前 ,解决办法,不用addJavascriptInterface,webchrome的onJsPrompt Android4.2之后 @JavascriptInterface

2、Service OnstartCommand Android 2.0 之后 取代 Onstart // This is the old onStart method that will be called on the pre-2.0 // platform. On 2.0 or later we override onStartCommand() so this // method will not be called. OnstartCommand 的 返回值也可以背住。

3、相册 4.4 DocumentsContract 通过添加权限 可以实现shortcut。打印功能,NFC 不用sim卡

4、5.0 锁屏 互动 service 需要一个 explicit Intent 不要给service声明intentfilter; 自定义权限不再支持。Android 5的锁屏小工具不支持;继续支持在主屏幕小部件

5、6.0 蓝牙wifi The WifiInfo.getMacAddress() and the BluetoothAdapter.getAddress() methods now return a constant value of 02:00:00:00:00:00 To access    the hardware identifiers of nearby external devices via Bluetooth and Wi-Fi scans, your app must now have the ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission

             通知 This release removes the Notification.setLatestEventInfo() method. Use the Notification.Builder class instead to construct notifications. To update a notification repeatedly, reuse the Notification.Builder instance. Call the build() method to get updated Notification instances. The adb shell dumpsys notification command no longer prints out your notification text. Use the adb shell dumpsys notification --noredact command instead to print out the text in a notification object. Browser Bookmark Changes

  6.0sdk 取消httpclient相关类。

转载于:https://www.cnblogs.com/CaptainLin/p/5134743.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值