{"id":180,"date":"2016-09-14T08:00:41","date_gmt":"2016-09-14T08:00:41","guid":{"rendered":"https:\/\/boochlin.com\/?p=180"},"modified":"2016-09-14T09:33:37","modified_gmt":"2016-09-14T09:33:37","slug":"android-nougat-introduction-%e4%b8%80","status":"publish","type":"post","link":"https:\/\/boochlin.com\/?p=180","title":{"rendered":"Android Nougat introduction (\u4e00)"},"content":{"rendered":"<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/image09.png\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-182\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/image09.png\" alt=\"android_n\" width=\"547\" height=\"547\" \/><\/a><\/p>\n<p>\u96d6\u7136 Android N Preview \u5f9e Google I\/O \u4e94\u6708\u5927\u6703\u5c31\u91cb\u653e\u51fa\u4f86\uff0c\u4f46\u662f\u4e00\u76f4\u627e\u4e0d\u5230\u6a5f\u5b50\u4f86\u73a9(\u55da\u547c\u6211\u7684 z3 \u4e0d\u652f\u63f4\u5347\u7d1a)\uff0c\u5c31\u4e00\u8def\u62d6\u963f\u6258\u963f\u6258\uff0c\u679c\u7136\u5230\u4e86 8\/22 \u6b63\u5f0f\u7248\u51fa\u4f86\u9084\u662f\u6c92\u6709\u6a5f\u5b50\u73a9\uff0c\u4f46\u662f\u9810\u5148 Survey Android \u65b0\u7248\u7684\u8b8a\u52d5\uff0c\u5e7e\u4e4e\u662f\u7cfb\u7d71\u5ee0\u7684\u529f\u8ab2\uff0c\u56e0\u70ba\u4f60\u6c38\u9060\u4e0d\u77e5\u9053\u63a5\u4e0b\u4f86\u6703\u4e0d\u6703\u6709\u8981\u6c42\uff0c\u8981\u8b93\u4ee5\u524d\u6216\u662f\u672a\u4f86\u7684\u624b\u6a5f\u901a\u901a\u5347\u4e0a\u53bb\u3002\u56e0\u6b64\u5718\u968a\u679c\u7136\u9084\u662f\u6d3e\u4eba(Not me)\u51fa\u4f86\u7814\u7a76\u7814\u7a76\u5566\uff0c\u7531\u65bc google \u7684\u5b98\u65b9\u66f4\u65b0\u9805\u76ee\u662f\u4e0d\u65b7\u589e\u9577\u7684\uff0c\u4e14\u4e0d\u5c11\u6771\u897f\u4e5f\u6c92\u6709\u8a73\u7d30\u7684\u5be6\u52d9\u7d93\u9a57\uff0c\u6211\u5c31\u53ea\u80fd\u770b\u5230\u54ea\u5beb\u5230\u54ea\u3002\u4ee5\u4e0b\u662f\u7c21\u55ae\u4ecb\u7d39\u3002<\/p>\n<p>\u770b\u5b8c\u7684\uff0c\u6709\u88dc\u5145\u8cc7\u6599<\/p>\n<ol>\n<li><a href=\"https:\/\/developer.android.com\/guide\/topics\/ui\/multi-window.html\">Multi-Window Support \u591a\u8996\u7a97\u652f\u63f4<\/a><\/li>\n<li id=\"notification_enhancements\"><a href=\"https:\/\/android-developers.blogspot.tw\/2016\/06\/notifications-in-android-n.html\">Notification Enhancements \u901a\u77e5\u6b04\u5f37\u5316<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/guide\/topics\/resources\/multilingual-support.html\">Multi-locale Support, More Languages\u00a0\u591a\u5730\u5340\u8a2d\u5b9a\u652f\u63f4\uff0c\u66f4\u591a\u8a9e\u8a00<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/training\/monitoring-device-state\/doze-standby.htm\">Doze on the Go\u00a0\u79fb\u52d5\u6642\u4f11\u7720<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/topic\/performance\/background-optimization.html\">Project Svelte: Background Optimizations\u00a0\u5c08\u6848 Svelte\uff1a\u80cc\u666f\u6700\u4f73\u5316<\/a><\/li>\n<li id=\"data_saver\"><a href=\"https:\/\/www.youtube.com\/watch?v=H-9xKmuwawg\">Data Saver<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/reference\/android\/service\/quicksettings\/Tile.html\">Quick Settings Tile API\u00a0\u5feb\u901f\u8a2d\u5b9a\u78da API<\/a><\/li>\n<li id=\"android_tv_recording\"><a href=\"https:\/\/developer.android.com\/training\/tv\/tif\/content-recording.html\">Android TV \u9304\u88fd<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/training\/articles\/security-config.html\">Network Security Configuration\u00a0\u7db2\u8def\u5b89\u5168\u6027\u5f37\u5316<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/training\/articles\/scoped-directory-access.html\">Scoped Directory Access\u00a0\u9650\u5b9a\u7bc4\u570d\u76ee\u9304\u5b58\u53d6<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html?hl=en\">Virtual Files \u865b\u64ec\u6a94\u6848<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/training\/articles\/direct-boot.html\">Supporting Direct Boot \u76f4\u63a5\u958b\u6a5f<\/a><\/li>\n<li><a href=\"https:\/\/www.android.com\/work\/\">Android for Work Updates<\/a><\/li>\n<li><a href=\"https:\/\/developer.android.com\/guide\/platform\/j8-jack.html?hl=en\">Java 8 Language features JAVA 8 \u652f\u63f4<\/a><\/li>\n<li>Profile-guided JIT\/AOT Compilation\u00a0\u8a2d\u5b9a\u6a94\u6307\u5f15 JIT\/AOT \u7de8\u8b6f<\/li>\n<\/ol>\n<p>\u5e95\u4e0b\u662f\u9084\u6c92\u7d30\u770b\u7684\uff08<del>\u5f85\u88dc\u5145\uff0c<\/del>\u6211\u6c7a\u5b9a\u653e\u5230\u7b2c\u4e8c\u7bc7\uff09\uff0c\u4e00\u53e5\u8a71\u7d50\u8ad6<\/p>\n<ol>\n<li><a href=\"https:\/\/developer.android.com\/ndk\/guides\/graphics\/index.html\">Vulkan API<\/a>\u00a0\uff0d\u65b0\u7684 3D \u6e32\u67d3 api<\/li>\n<li id=\"surfaceview\"><a href=\"https:\/\/developer.android.com\/reference\/android\/view\/SurfaceView.html\">SurfaceView<\/a>\u00a0\uff0d\u8acb\u5927\u5bb6\u7528 SurfaceView \u53d6\u4ee3 TextureView \uff0c\u6bd4\u8f03\u7701\u96fb<\/li>\n<li id=\"number-blocking\"><a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html?hl=en#print_svc\">Number Blocking<\/a>\uff0d\u7cfb\u7d71\u7d1a\u7684 who&#8217;s call<\/li>\n<li id=\"call_screening\"><a href=\"https:\/\/developer.android.com\/reference\/android\/telecom\/CallScreeningService.html\">Call Screening<\/a>\uff0d\u7cfb\u7d71\u7d1a\u7684 who&#8217; call<\/li>\n<li><a href=\"http:\/\/unicode.org\/emoji\/charts\/full-emoji-list.html\">New Emojis<\/a>\uff0d\u66f4\u591a Emojis<\/li>\n<li><a href=\"http:\/\/ICU4J APIs in Android\">ICU4J APIs in Android<\/a>\u00a0\uff0d\u66f4\u5c0f\u7684 size<\/li>\n<li><a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html?hl=en#webview\">WebView<\/a>\uff0dChrome + WebView, Together and\u00a0Multiprocess<\/li>\n<li><a href=\"https:\/\/developer.android.com\/guide\/topics\/graphics\/opengl.html\">OpenGL\u2122 ES 3.2 API<\/a>\uff0d\u66f4\u65b0<\/li>\n<li><a href=\"https:\/\/developer.android.com\/reference\/android\/accessibilityservice\/AccessibilityService.html\">Accessibility Enhancements<\/a>\u00a0\uff0dnope<\/li>\n<li id=\"key_attestation\"><a href=\"https:\/\/developer.android.com\/training\/articles\/security-key-attestation.html\">Key Attestation<\/a>\u00a0\uff0dnope<\/li>\n<li><a href=\"https:\/\/developer.android.com\/studio\/build\/build-variants.html#signing\">APK Signature Scheme v2<\/a>\uff0d\u6539\u5584\u9a57\u8b49\u901f\u5ea6\u4e26\u589e\u5f37\u5b8c\u6574\u6027\u4fdd\u8b49<\/li>\n<li><a href=\"http:\/\/www.androidpolice.com\/2016\/05\/19\/android-n-preview-3-introduces-a-new-shortcuts-helper-screen-for-physical-keyboards\/\">Keyboard Shortcuts Helper<\/a>\uff0d<strong>Meta\uff08alt\/command\uff09 + \/<\/strong> to trigger a <em>Keyboard Shortcuts<\/em> screen<\/li>\n<li><a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html?hl=en#custom_pointer_api\">Custom Pointer API<\/a>\uff0d\u81ea\u8a02\u6e38\u6a19\u5916\u89c0<\/li>\n<li><a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html?hl=en#sustained_performance_api\">Sustained Performance API<\/a>\uff0d\u7528\u4f86\u6e2c\u8a66 long-running apps<\/li>\n<li><a href=\"https:\/\/developers.google.com\/vr\/android\/\">Print Service Enhancements<\/a>\uff0dnope<\/li>\n<li id=\"framemetrics_api\"><a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html?hl=en#framemetrics_api\">FrameMetricsListener API<\/a>\u00a0\uff0d<span class=\"s2\"><span class=\"s2\">monitor its UI rendering performance\uff0c<\/span><\/span><span class=\"s2\">not limited to the past <\/span><span class=\"s3\">120 frames<\/span><span class=\"s2\">.<\/span><\/li>\n<\/ol>\n<p><!--more--><\/p>\n<h4><a href=\"https:\/\/developer.android.com\/guide\/topics\/ui\/multi-window.html\">Multi-Window Support \u591a\u8996\u7a97\u652f\u63f4<\/a><\/h4>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/mw-splitscreen.png\"><img decoding=\"async\" class=\"alignnone wp-image-184\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/mw-splitscreen.png\" alt=\"mw-splitscreen\" width=\"362\" height=\"178\" \/><\/a><\/p>\n<p>Android N \u65b0\u589e\u4e00\u6b21\u986f\u793a\u591a\u500b\u61c9\u7528\u7a0b\u5f0f\u7684\u652f\u63f4\u3002 <span style=\"color: #ff0000;\">\u5728\u624b\u6301\u5f0f\u88dd\u7f6e\u4e0a\uff0c\u5169\u500b\u61c9\u7528\u7a0b\u5f0f\u53ef\u4ee5\u5728\u300c\u5206\u5272\u756b\u9762\u300d\u6a21\u5f0f\u4e2d\u4e26\u6392\u6216\u4e0a\u4e0b\u6392\u5217\u3002 \u5728\u96fb\u8996\u88dd\u7f6e\u4e0a\uff0c\u61c9\u7528\u7a0b\u5f0f\u80fd\u4f7f\u7528\u300c\u5b50\u6bcd\u756b\u9762\u300d\u6a21\u5f0f\uff0c\u5728\u4f7f\u7528\u8005\u8207\u53e6\u4e00\u500b\u61c9\u7528\u7a0b\u5f0f\u4e92\u52d5\u6642\u6301\u7e8c\u64ad\u653e\u5f71\u7247<\/span>\u3002<\/p>\n<p>\u9019\u529f\u80fd\u5176\u5be6\u4e4b\u524d\u5c31\u6709\u5176\u4ed6\u5927\u5ee0\u505a\u904e\uff0c\u6211\u60f3\u4e3b\u56e0\u5176\u5be6\u5f88\u7c21\u55ae\uff0c\u5c31\u662f\u5728\u5927\u87a2\u5e55\u6a5f\u5668\u4e0a\uff0c\u9019\u6a23\u7684\u64cd\u4f5c\u53ef\u4ee5\u6709\u6548\u5229\u7528\u6240\u6709\u7684\u756b\u9762\uff0c\u662f\u500b\u975e\u5e38\u76f4\u89ba\u7684\u529f\u80fd\u3002\u4f46\u662f\u76f8\u5c0d\u7684\u5c0d\u88dd\u7f6e\u6548\u80fd\u66f4\u52a0\u8981\u6c42\uff0c\u5c24\u5176\u662f\u5c0d RAM\uff0c\u9019\u6a23\u7684\u529f\u80fd\u5be6\u5728\u5f88\u96e3\u60f3\u50cf\u5728 256 MB \u7684\u624b\u6a5f\u4e0a\u53ef\u4ee5\u4f7f\u7528\u3002<\/p>\n<p>\u81f3\u65bc\u5982\u4f55\u4f7f\u7528\uff0c\u5b98\u7db2\u662f\u9019\u6a23\u8aaa<\/p>\n<p>\u4f7f\u7528\u8005\u53ef\u4ee5\u900f\u904e\u4e0b\u5217\u65b9\u5f0f\u4f86\u5207\u63db\u591a\u8996\u7a97\u6a21\u5f0f\uff1a<\/p>\n<ul>\n<li>\u5982\u679c\u4f7f\u7528\u8005\u958b\u555f<a href=\"https:\/\/developer.android.com\/guide\/components\/recents.html?hl=zh-tw\">\u7e3d\u89bd\u756b\u9762<\/a>\u4e26\u9577\u6309\u6d3b\u52d5\u6a19\u984c\uff0c\u5c31\u53ef\u4ee5\u5c07\u8a72\u6a19\u984c\u62d6\u66f3\u5230\u756b\u9762\u9192\u76ee\u63d0\u793a\u7684\u90e8\u5206\uff0c\u5c07\u6d3b\u52d5\u653e\u5165\u591a\u8996\u7a97\u6a21\u5f0f\u3002<\/li>\n<li>\u5982\u679c\u4f7f\u7528\u8005\u9577\u6309\u300c\u7e3d\u89bd\u300d\u6309\u9215\uff0c\u88dd\u7f6e\u6703\u5c07\u76ee\u524d\u7684\u6d3b\u52d5\u653e\u5165\u591a\u8996\u7a97\u6a21\u5f0f\uff0c\u4e26\u958b\u555f\u7e3d\u89bd\u756b\u9762\uff0c\u8b93\u4f7f\u7528\u8005\u9078\u64c7\u8981\u5206\u4eab\u87a2\u5e55\u7684\u53e6\u4e00\u500b\u6d3b\u52d5\u3002<\/li>\n<\/ul>\n<p>\u4f7f\u7528\u8005\u53ef\u4ee5\u5728\u6d3b\u52d5\u5206\u4eab\u87a2\u5e55\u6642\uff0c\u5c07\u4e00\u500b\u6d3b\u52d5\u4e2d\u7684\u8cc7\u6599<a href=\"https:\/\/developer.android.com\/guide\/topics\/ui\/drag-drop.html?hl=zh-tw\">\u62d6\u653e<\/a>\u5230\u53e6\u4e00\u500b\u6d3b\u52d5\u3002 (\u4e4b\u524d\uff0c\u4f7f\u7528\u8005\u53ea\u80fd\u5728\u55ae\u4e00\u6d3b\u52d5\u5167\u62d6\u653e\u8cc7\u6599)\u3002<\/p>\n<p>ps. \u7e3d\u89bd\u756b\u9762\u5c31\u662f recent app \u9801\u9762\uff0c\u4e5f\u5c31\u662f\u5927\u5bb6\u624b\u6a5f\u6309\u4e0b\u53f3\u4e0b\u6216\u662f\u5de6\u4e0b\u7684\u65b9\u584a\u6309\u9215\u6703\u51fa\u73fe\u7684\u756b\u9762\uff0c\u8001\u5be6\u8aaa\u6211\u89ba\u5f97\u5343\u8a00\u842c\u8a9e\u6bd4\u4e0d\u4e0a\u4e00\u6bb5<a href=\"https:\/\/www.youtube.com\/watch?v=laHfmVN01FQ\">\u5f71\u7247\u6f14\u793a<\/a>\u3002<\/p>\n<p>\u770b\u5230\u9019\u908a\u6ce8\u610f\u5230\u5b98\u7db2\u63d0\u5230\u7684<\/p>\n<p>\u300eManufacturers of larger devices can choose to enable freeform mode, in which the user can freely resize each activity. If the manufacturer enables this feature, the device offers<span style=\"color: #ff0000;\"> freeform mode<\/span> in addition to split-screen mode.\u300f<\/p>\n<p>\u9019\u500b\u4e5f\u662f\u6587\u5b57\u6558\u8ff0\u4e26\u4e0d\u592a\u597d\u7406\u89e3\uff0c\u7c21\u55ae\u4f86\u8aaa\u5c31\u662f\u53ef\u4ee5\u50cf\u5e73\u5e38\u64cd\u4f5c\u96fb\u8166\uff0c\u53ef\u4ee5\u81ea\u7531\u7e2e\u653e\u8996\u7a97\uff0c\u5c24\u5176\u662f\u5728\u5411\u96fb\u8996\u9019\u7a2e\u8d85\u5927\u578b\u756b\u9762\u4e0a\uff0c\u500b\u4eba\u89ba\u5f97\u6240\u6709\u505a Android \u96fb\u8996\u68d2\u7684\u5ee0\u5546\u90fd\u8981\u597d\u597d\u6ce8\u610f\u9019\u584a\uff0c\u4e0d\u904e\u4e5f\u662f\u9700\u8981 app vendor \u53bb\u652f\u63f4\u3002<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/ap_resize.png\"><img decoding=\"async\" class=\"alignnone wp-image-185\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/ap_resize.png\" alt=\"ap_resize\" width=\"468\" height=\"351\" \/><\/a><\/p>\n<p><a href=\"https:\/\/developer.android.com\/guide\/topics\/ui\/multi-window.html\">\u958b\u767c\u65b9\u9762\u5c31\u4e0d\u591a\u8aaa\uff0c\u8981\u6ce8\u610f\u7684\u6771\u897f\u4e0d\u5c11\u3002<\/a>\u9700\u8981\u6ce8\u610f\u7684\u662f multi-window activity \u7684\u751f\u547d\u9031\u671f\u57fa\u672c\u4e0a\u8ddf\u539f\u672c\u4e00\u6a23\uff0c\u4f46\u662f\u4ed4\u7d30\u60f3\u60f3\u5c31\u77e5\u9053\u591a\u8996\u7a97\u64cd\u4f5c\u6642\u5c31\u6703\u6709\u5176\u4e2d\u4e00\u500b\u624d\u662f focus \u7684 window\uff0c\u800c\u6c92\u6709 focus \u7684 window activity \u90fd\u662f\u8655\u5728 onPause \u968e\u6bb5\uff0c\u4e26\u975e onStop \u968e\u6bb5\uff0c\u76f8\u5c0d\u5730\u62ff\u5230 focus \u7684 windows activity \u6703\u9032\u5165 onResume\u3002<\/p>\n<p>\u53e6\u5916\u5c31\u662f\u6211\u5f88\u597d\u5947 home app \u6703\u662f\u600e\u9ebc\u8655\u7406 multi-windows \uff0c\u4e4b\u5f8c\u62ff\u5230\u6a5f\u5b50\u4e00\u5b9a\u8981\u8a66\u8a66\u770b\u3002\u6b64\u5916 task queue \u7684\u8655\u7406\u4e5f\u662f\u9700\u8981\u4ed4\u7d30\u7814\u7a76\u3002ps. multi-windows mode \u4e0b\u00a0<span style=\"font-family: Calibri;\">Android N<\/span>\u662f\u53ef\u4ee5\u652f\u63f4\u5169\u500b<span style=\"font-family: Calibri;\">view (<\/span>\u5169\u500b<span style=\"font-family: Arial; font-size: small;\">Activities<\/span><span style=\"font-size: small;\">\u4e4b\u9593<\/span><span style=\"font-family: Calibri;\">)<\/span>\u4ea4\u63db\u8cc7\u8a0a<span style=\"font-family: Calibri;\">(<\/span><a href=\"https:\/\/developer.android.com\/guide\/topics\/ui\/multi-window.html\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=zh-TW&amp;q=https:\/\/developer.android.com\/guide\/topics\/ui\/multi-window.html&amp;source=gmail&amp;ust=1473907874564000&amp;usg=AFQjCNG7Qpo_Edy5sarzSJ9ggvrjrmsWtg\"><span style=\"font-family: Calibri;\"><u>multi-<wbr \/>window<\/u><\/span><\/a><span style=\"font-family: Calibri;\">);<\/span>\u5be6\u4f5c\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/view\/View.OnDragListener.html\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=zh-TW&amp;q=https:\/\/developer.android.com\/reference\/android\/view\/View.OnDragListener.html&amp;source=gmail&amp;ust=1473907874564000&amp;usg=AFQjCNH9LHOHqq1WQxvL0AhCDno7s2RTWA\"><span style=\"font-family: Consolas; font-size: small;\">View.OnDragListener<\/span><\/a><span style=\"font-family: \u65b0\u7d30\u660e\u9ad4;\">\uff0c\u50b3\u905e<\/span> <a href=\"https:\/\/developer.android.com\/reference\/android\/content\/ClipData.html\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=zh-TW&amp;q=https:\/\/developer.android.com\/reference\/android\/content\/ClipData.html&amp;source=gmail&amp;ust=1473907874564000&amp;usg=AFQjCNFyTwQ2pO2JgipkxzO0JcTasjLWtw\"><span style=\"font-family: Calibri;\"><u>ClipData<\/u><\/span><\/a><span style=\"font-family: \u65b0\u7d30\u660e\u9ad4;\">\u3002<\/span><span style=\"font-family: Calibri;\">(<\/span><a href=\"https:\/\/developer.android.com\/guide\/topics\/ui\/drag-drop.html\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=zh-TW&amp;q=https:\/\/developer.android.com\/guide\/topics\/ui\/drag-drop.html&amp;source=gmail&amp;ust=1473907874564000&amp;usg=AFQjCNFRVYwzAvwzvq0KexuHTAJ945Xjog\"><span style=\"font-family: Calibri;\"><u>Drag and Drap<\/u><\/span><\/a><span style=\"font-family: Calibri;\">)<\/span><\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/pip-active.png\">\u800c\u5728\u6b64\u9805\u76ee\u4e4b\u4e0b\u6240\u884d\u751f\u7684\u5c31\u662f<strong>\u300ePicture in picture(\u5b50\u6bcd\u756b\u9762)\u300f<\/strong>\uff0c<\/a><a href=\"https:\/\/www.youtube.com\/watch?v=TxAbht2DkyU\">\u5f71\u7247\u6f14\u793a<\/a>\u00a0\uff0c(TV only)<\/p>\n<blockquote><p>\u7576\u4f7f\u7528\u8005\u5f9e\u5f71\u7247\u8fd4\u56de\u700f\u89bd\u5176\u4ed6\u5167\u5bb9\uff0c\u60a8\u7684\u61c9\u7528\u7a0b\u5f0f\u53ef\u4ee5\u5c07\u5f71\u7247\u79fb\u5165 PIP \u6a21\u5f0f\u3002<\/p>\n<p>\u7576\u4f7f\u7528\u8005\u89c0\u770b\u5230\u5f71\u7247\u5167\u5bb9\u7684\u7d50\u5c3e\u6642\uff0c\u60a8\u7684\u61c9\u7528\u7a0b\u5f0f\u53ef\u5c07\u5f71\u7247\u5207\u63db\u5230 PIP \u6a21\u5f0f\u3002<\/p>\n<p>\u4e3b\u756b\u9762\u986f\u793a\u7cfb\u5217\u4e2d\u4e0b\u4e00\u96c6\u7684\u9810\u544a\u6216\u6458\u8981\u8cc7\u8a0a\u6642\u3002\u60a8\u7684\u61c9\u7528\u7a0b\u5f0f\u53ef\u4ee5\u70ba\u4f7f\u7528\u8005\u63d0\u4f9b\u4e00\u500b\u89c0\u8cde\u5f71\u7247\u6642\u4f47\u5217\u5176\u4ed6\u5167\u5bb9\u7684\u65b9\u5f0f\u3002 \u7576\u4e3b\u756b\u9762\u986f\u793a\u5167\u5bb9\u9078\u64c7\u6d3b\u52d5\u6642\uff0c\u5f71\u7247\u7e7c\u7e8c\u5728 PIP \u6a21\u5f0f\u4e2d\u64ad\u653e\u3002<\/p><\/blockquote>\n<p>\u958b\u767c\u4e0a\u9700\u8981\u6ce8\u610f\u7684\u57fa\u672c\u8ddf multi-windows \u662f\u4e00\u6a23\u7684\uff0c\u751f\u547d\u9031\u671f\uff0c\u901a\u5e38\u9032\u5165 onPause \u5f8c\uff0c\u5f71\u7247\u5c31\u6703\u505c\u6b62\u64ad\u653e\uff0c\u56e0\u6b64\u5fc5\u9808\u5728 onPause \u968e\u6bb5\u4f5c\u4e00\u4e9b\u8655\u7406\uff0c\u8b93\u5f71\u7247\u7e7c\u7e8c\u64ad\u653e\uff0c\u540c\u6a23\u7684\u4e5f\u5fc5\u9808\u5728 onResume \u968e\u6bb5\u4f5c\u76f8\u5c0d\u8655\u7406\u3002\u53e6\u5916\u9700\u8981\u6ce8\u610f\u7684\u5c31\u662f pip mode \u662f 240&#215;135 dp\u3002\uff08\u9019\u5f88\u660e\u986f\u662f\u70ba\u4e86 tv \u8a2d\u8a08\u7684\uff0c\u53ef\u662f\u76ee\u524d\u611f\u89ba\u5e02\u9762\u4e0a\u597d\u50cf\u9084\u6c92\u6709\u51fa\u65d7\u8266\u6b3e\u7684\u96fb\u8996\uff0c\u540c\u6642\u8655\u7406\u5b50\u6bcd\u756b\u9762\u611f\u89ba\u5f88\u5403\u8cc7\u6e90\uff09\u3002<a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/pip-active.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-187\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/pip-active.png\" alt=\"pip-active\" width=\"378\" height=\"213\" \/><\/a><\/p>\n<h4><\/h4>\n<h4 id=\"notification_enhancements\"><a href=\"https:\/\/android-developers.blogspot.tw\/2016\/06\/notifications-in-android-n.html\">Notification Enhancements \u901a\u77e5\u6b04\u5f37\u5316<\/a><\/h4>\n<p>\u9019\u90e8\u4efd\u6709\u4ee5\u4e0b\u4e94\u5927\u6539\u7248<\/p>\n<p><strong>1. Template updates<\/strong>: We&#8217;re <span style=\"color: #ff0000;\">updating notification templates to put a new emphasis on hero image and avatar.<\/span> Developers will be able to take advantage of the new templates with minimal adjustments in their code.<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/new-style.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-191\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/new-style.png\" alt=\"new-style\" width=\"640\" height=\"293\" \/><\/a><\/p>\n<p><strong>\u6a23\u677f\u66f4\u65b0<\/strong>\uff0c\u8001\u5be6\u8aaa\u6211\u89ba\u5f97\u6c92\u5565\u597d\u8aaa\uff0c\u770b\u4e0a\u9762\u5716\u6700\u5feb\u3002\u4f7f\u7528\u8005\u53ef\u4ee5\u66f4\u52a0\u7c21\u55ae\u7684\u63db\u6210\u65b0\u7248\u7684ui<\/p>\n<p><strong>2. Messaging style customization<\/strong>: You can <span style=\"color: #ff0000;\">customize more of the user interface<\/span> labels associated with your notifications using the <code>MessagingStyle\u00a0<\/code>class. You can configure the message, conversation title, and content view.<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/MessagingStyle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-188\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/MessagingStyle.png\" alt=\"messagingstyle\" width=\"400\" height=\"198\" \/><\/a><\/p>\n<p><strong>\u8a0a\u606f\u98a8\u683c\u5ba2\u88fd\u5316<\/strong>\uff0c\u5176\u5be6\u9019\u500b\u5f88\u65b9\u4fbf\uff0c\u53ef\u4ee5\u6839\u64da\u60c5\u6cc1\u5957\u5165\u4e0d\u540c\u7684 message style \uff0c\u5176\u5be6\u4ee5\u524d\u5c31\u53ef\u4ee5\u7528 \u5ba2\u88fd\u5316 notification ui \u7684\u65b9\u5f0f\u9054\u5230\uff0c\u4f46\u9019\u500b\u5f88\u660e\u986f google \u591a\u500b\u898f\u7bc4\uff0c\u8b93\u5927\u5bb6\u66f4\u597d\u505a\u4e8b\u3002<\/p>\n<p><strong>3.\u00a0<a href=\"https:\/\/www.youtube.com\/watch?v=2ZQ1D003g14\">Bundled notifications:<\/a><\/strong> The system can<span style=\"color: #ff0000;\"> group messages<\/span> together, for example by message topic, and display the group. A user can take actions, such as Dismiss or Archive, on them in place. If you\u2019ve implemented notifications for Android Wear, you\u2019ll already be familiar with this model.<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/Ian_N.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-189\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/Ian_N.png\" alt=\"ian_n\" width=\"573\" height=\"188\" \/><\/a><\/p>\n<p><strong>\u901a\u77e5\u6b78\u7fa4<\/strong>\uff0c\u9019\u500b\u7684\u4e2d\u6587\u5be6\u5728\u4e0d\u597d\u7ffb\uff0c\u770b\u4e86\u4e00\u4e0b i\/o \u5f71\u7247\u4ecb\u7d39<\/a>\uff0c\u500b\u4eba\u89ba\u5f97\u9019\u500b\u6bd4\u8f03\u7b26\u5408\u610f\u7fa9\uff0c\u904e\u53bb\u5728\u901a\u77e5\u6b04\u88e1\u5176\u5be6\u6c92\u5565\u53ef\u4ee5\u73a9\u5f97\uff0c\u56e0\u70ba\u6240\u6709\u7684\u901a\u77e5\u90fd\u662f\u7167\u6642\u9593\u6392\u5e8f\u597d\uff0c\u5f7c\u6b64\u4e4b\u9593\u90fd\u662f\u7368\u7acb\u7684\u3002\u4f46\u4e5f\u4e0d\u662f\u8aaa\u4e00\u5b9a\u4e0d\u884c\uff0c\u5982\u679c\u6709\u958b\u767c email \u7684\u4eba\u5c31\u6703\u77e5\u9053\u6709\u500b style \u53eb\u505a inbox \uff0c\u53ef\u4ee5\u4f5c\u5230\u985e\u4f3c\u7684\u4e8b\u60c5\u4f46\u662f\u8655\u7406\u5be6\u5728\u9ebb\u7169\u3002 \u73fe\u5728\u591a\u4e00\u500b setGroup() and setGroupSummary() \u5e6b\u52a9\u5404\u4f4d\u66f4\u65b9\u4fbf\u8655\u7406\u9019\u4ef6\u4e8b\u60c5\u3002\u6b64\u5916\u5728 api 24 \u4ee5\u4e0a \uff0c\u7cfb\u7d71\u6703\u81ea\u52d5\u628a4\u689d\u901a\u77e5\u4ee5\u4e0a\u6b78\u985e\u6210\u4e00\u7d44\uff0c\u5982\u679c\u6015\u88ab\u7cfb\u7d71\u5f04\u7684\u4e0d\u597d\u770b\uff0c\u8acb\u81ea\u5df1\u5148\u8655\u7406\u5427\u3002<\/p>\n<p><strong>4.\u00a0<a href=\"https:\/\/www.youtube.com\/watch?v=Zg4v9G-lku8\">Direct reply:<\/a><\/strong> For real-time communication apps, the Android system supports <span style=\"color: #ff0000;\">inline replies<\/span> so that users can quickly respond to an SMS or text message directly within the notification interface.<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/MessagingStyle.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-188\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/MessagingStyle.png\" alt=\"messagingstyle\" width=\"400\" height=\"198\" \/><\/a>\u76f4\u63a5\u56de\u61c9\uff0c\u5c31\u6211\u6240\u77e5\u4ee5\u5f80\u8981\u56de\u8986\u4fe1\u4ef6\u6216\u662f sns\uff0c notification \u6700\u591a\u80fd\u4f5c\u5230\u7684\u5c31\u662f\u5229\u7528 pendingIntent \u53bb\u958b\u555f activity \u9032\u884c\u56de\u61c9\u3002\u800c\u9019\u6b21\u591a\u4e86\u4e00\u500b\u65b0\u7684 api \u5c31\u662f RemoteInput\uff0c\u914d\u5408 message style \u53ef\u4ee5\u4f5c\u5230\u76f4\u63a5\u5728 notificaion \u4e0a\u8f38\u5165\u6587\u5b57\uff0c\u76f4\u63a5\u56de\u8986\uff0c\u800c\u4e0d\u9700\u8981\u96e2\u958b\u901a\u77e5\u6b04\u3002\u611f\u89ba\u5c31\u662f\u70ba\u4e86 Android wear \u6240\u8a2d\u8a08\u7684\uff0c\u5be6\u969b\u4e0a Android wear \u4e0a\u65e9\u5df2\u7d93\u6709\u4e86\u3002<\/p>\n<p><strong>5. Custom views<\/strong>: Two new APIs enable you to <span style=\"color: #ff0000;\">leverage system decorations<\/span>, such as notification headers and actions, when using custom views in notifications.<\/p>\n<p><strong>\u756b\u9762\u5ba2\u88fd\u5316<\/strong>\uff0c\u4e3b\u8981\u5c31\u662f\u591a\u4e86\u5169\u500b api style\uff0c\u9019\u4e00\u6a23\u6703\u9700\u8981\u642d\u914d message style \u6703\u66f4\u597d\u3002<br \/>\n<a href=\"https:\/\/developer.android.com\/reference\/android\/app\/Notification.DecoratedCustomViewStyle.html\">Notification.DecoratedCustomViewStyle:<\/a>\u00a0Notification style for custom views that are decorated by the system.<br \/>\n<a href=\"https:\/\/developer.android.com\/reference\/android\/app\/Notification.DecoratedMediaCustomViewStyle.html\">Notification.DecoratedMediaCustomViewStyle <\/a>:Notification style for media custom views that are decorated by the system.<\/p>\n<p>\u7e3d\u7d50:\u9019\u6b21\u6539\u52d5\u9817\u5927\uff0c\u4e0a\u6b21\u6709\u6bd4\u8f03\u5927\u7684\u6539\u7248\u611f\u89ba\u5c31\u662f notification service listener\u3002\u800c\u9019\u6b21\u6539\u7248\u5247\u662f\u8b93\u4f7f\u7528\u8005\u53ef\u4ee5\u6709\u66f4\u591a\u64cd\u4f5c\u5728 notification\u4e0a\u9762\uff08\u53d7\u76ca\u6700\u660e\u986f\u7684\u5c31\u662f email \u9019\u985e app (gmail)\uff09\uff0c\u5176\u5be6\u9019\u5169\u7a2e\u6539\u7248\u90fd\u662f\u70ba\u4e86\u8b93 notification \u4e0d\u518d\u50cf\u662f\u6f51\u51fa\u53bb\u7684\u6c34\u4e00\u6a23\uff0c\u5c31\u53ea\u662f\u500b\u901a\u77e5\uff0c\u800c\u662f\u63d0\u9ad8\u4f7f\u7528\u8005\uff0cactivity\u548c notification \u4e4b\u9593\u7684\u95dc\u806f\u6027\u3002ps.\u751a\u81f3\u5728\u5b98\u65b9 blog \u4e0a\u63d0\u5230 Android N \u7684 N \u5c31\u662f notification\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/guide\/topics\/resources\/multilingual-support.html\">Multi-locale Support, More Languages\u00a0\u591a\u5730\u5340\u8a2d\u5b9a\u652f\u63f4\uff0c\u66f4\u591a\u8a9e\u8a00<\/a><\/h4>\n<p>Android N \u73fe\u5728\u53ef\u8b93\u4f7f\u7528\u8005\u5728 [\u8a2d\u5b9a] \u4e2d\u9078\u53d6<span style=\"color: #ff0000;\"><strong>\u591a\u500b\u5730\u5340\u8a2d\u5b9a<\/strong><\/span>\uff0c\u4ee5\u4fbf\u4ee5\u66f4\u597d\u7684\u65b9\u5f0f<span style=\"color: #ff0000;\">\u652f\u63f4\u96d9\u8a9e\u8a00\u4f7f\u7528\u6848\u4f8b<\/span>\u3002\u61c9\u7528\u7a0b\u5f0f\u53ef\u4ee5\u4f7f\u7528\u65b0\u7684 API \u53d6\u5f97\u4f7f\u7528\u8005\u9078\u53d6\u7684\u5730\u5340\u8a2d\u5b9a\uff0c\u7136\u5f8c\u70ba\u591a\u5730\u5340\u8a2d\u5b9a\u4f7f\u7528\u8005\u63d0\u4f9b\u66f4\u7cbe\u7d30\u7684\u4f7f\u7528\u8005\u9ad4\u9a57 \u2014 \u4f8b\u5982\u4ee5\u591a\u8a9e\u8a00\u986f\u793a\u641c\u5c0b\u7d50\u679c\uff0c\u4ee5\u53ca\u4e0d\u70ba\u4f7f\u7528\u8005\u5df2\u7d93\u719f\u77e5\u8a9e\u8a00\u7684\u7db2\u9801\u63d0\u4f9b\u7ffb\u8b6f\u3002<\/p>\n<p>\u7c21\u55ae\u4f86\u8aaa\uff0c\u904e\u53bb\u4f60\u53ea\u80fd\u9078\u64c7\u4e00\u7a2e\u8a9e\u8a00\u4f5c\u70ba\u4f7f\u7528\u74b0\u5883\uff0c\u5047\u8a2d\u662f\u7e41\u9ad4\u4e2d\u6587\uff0c\u5982\u679c App \u4e26\u4e0d\u652f\u63f4\u7e41\u9ad4\u4e2d\u6587\u90a3\u5c31\u53ea\u80fd\u662f\u9810\u8a2d\u82f1\u6587\uff0c\u4f46\u73fe\u5728\u4f60\u53ef\u4ee5\u5728\u300e\u8a2d\u5b9a\u300f\u88e1\u9078\u64c7\u591a\u500b\u4f60\u6700\u7fd2\u6163\u7684\u8a9e\u8a00\u8207\u512a\u5148\u6b0a\uff0c\u5047\u8a2d\u662f\u7b2c\u4e00\u512a\u5148\u662f\u6cd5\u6587\uff08fr_cj\uff09\uff0c\u7b2c\u4e8c\u662f\u7fa9\u5927\u5229\u6587(it_ch)\uff0c\u5982\u679c App \u6c92\u6709\u652f\u63f4\u6cd5\u6587\uff0c\u90a3\u5c31\u6703\u81ea\u52d5\u627e\u7fa9\u5927\u5229\u6587\uff0c\u5982\u679c\u9084\u662f\u627e\u4e0d\u5230\uff0c\u90a3\u624d\u6703\u8df3\u5230\u82f1\u6587\u3002<\/p>\n<p>\u5c0d\u65bc\u570b\u7c4d\u4ee5\u53ca\u5340\u78bc\u7684\u5c0d\u61c9\u65b9\u5f0f\u4e5f\u6539\u8b8a\u3002\u5e95\u4e0b\u7528\u5e7e\u5f35\u5716\u8868\u793a\u66f4\u52a0\u6e05\u695a<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_n_locale_1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-201\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_n_locale_1.png\" alt=\"android_n_locale_1\" width=\"783\" height=\"154\" \/><\/a><\/p>\n<p><strong>\u7b2c\u4e00\u5f35\u5716\uff1a<\/strong>\u9019\u662f Android N \u4e4b\u524d\u7684\u4f5c\u6cd5\uff0c\u7576\u4f7f\u7528\u8005\u53ea\u8a2d\u5b9a fr_CH \uff0c\u4f46 App Resources \u53ea\u6709 en , de_DE , es_ES , fr_FR , it_IT\uff0c\u90a3\u4ed6\u7684\u6bd4\u5c0d\u904e\u7a0b\u5c31\u6703\u662f<\/p>\n<p>1. \u5148\u78ba\u8a8d fr_CH =&gt; \u6c92\u6709 \u00a0 2. \u63a5\u8005\u5c0d\u61c9\u570b\u7c4d fr =&gt; \u6c92\u6709 3. \u6700\u5f8c\u53ea\u597d\u4f7f\u7528\u9810\u8a2d en<a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_n_locale_2.png\"><br \/>\n<\/a><\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_n_locale_2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-202\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_n_locale_2.png\" alt=\"android_n_locale_2\" width=\"795\" height=\"155\" \/><\/a><\/p>\n<p><strong>\u7b2c\u4e8c\u5f35\u5716\uff1a<\/strong>\u9019\u662f Android N \u7684\u4f5c\u6cd5\uff0c\u7576\u4f7f\u7528\u8005\u53ea\u8a2d\u5b9a fr_CH \uff0c\u4f46 App Resources \u53ea\u6709 en , de_DE , es_ES , fr_FR , it_IT\uff08\u540c\u4e0a\uff09\uff0c\u90a3\u4ed6\u7684\u6bd4\u5c0d\u904e\u7a0b\u5c31\u6703\u662f<\/p>\n<p>1. \u5148\u78ba\u8a8d fr_CH =&gt; \u6c92\u6709 \u00a0 \u00a02. \u63a5\u8005\u5c0d\u61c9\u570b\u7c4d fr =&gt; \u4e5f\u6c92\u6709 \u00a0 3.\u627e\u627e\u770b\u6709\u6c92\u6709 Child \u5340\u78bc\u5c0d\u61c9\u5230\uff0c\u5c31\u662f fr_FR \u00a04. \u00a0\u5c31\u6c7a\u5b9a\u662f fr_FR<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_n_locale_3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-203\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_n_locale_3.png\" alt=\"android_n_locale_3\" width=\"827\" height=\"208\" \/><\/a><\/p>\n<p>\u7b2c\u4e09\u5f35\u5716\uff1a\u9019\u662f\u5982\u679c\u8a2d\u5b9a\u5169\u7a2e\u4ee5\u4e0a\u9810\u8a2d\u8a9e\u8a00 P1: fr_CH , P2: it_CH\uff0c\u4f46 App Resources \u53ea\u6709 en , de_DE , es_ES , it_IT\uff0c\u90a3\u4ed6\u7684\u6bd4\u5c0d\u904e\u7a0b\u5c31\u6703\u662f<\/p>\n<p>1. \u5148\u78ba\u8a8d\u7b2c\u4e00\u512a\u5148 fr_CH =&gt; \u6c92\u6709 \u00a0 \u00a02. \u63a5\u8005\u770b\u570b\u7c4d fr =&gt; \u4e5f\u6c92\u6709 \u00a0 \u00a03.\u00a0\u627e\u627e\u770b\u6709\u6c92\u6709 Child \u5340\u78bc\u5c0d\u61c9\u5230 =&gt; \u9084\u662f\u6c92\u6709 \u00a04. \u90a3\u958b\u59cb\u627e P2:it_CH \u00a0=&gt; \u4f9d\u7136\u6c92\u6709 \u00a0 5. \u627e\u570b\u7c4d it =&gt; \u5c31\u662f\u6c92\u6709 \u00a0 6. \u90a3\u627e\u627e\u6709\u6c92\u6709 Child \u5340\u78bc\u5c0d\u61c9\u5230\uff0c\u5c31\u662f it_IT \u00a0 \u00a0 \u00a07. \u5c31\u6c7a\u5b9a\u662f it_IT<\/p>\n<p>\u7e3d\u7d50\uff1a\u70ba\u4e86\u52a0\u5feb\u6279\u914d\u901f\u5ea6\uff0c\u958b\u767c\u8005\u6700\u597d\u80fd\u66f4\u52a0\u7cbe\u6e96\u7684\u7d66\u4e88\u8cc7\u6e90\u5c0d\u61c9\u3002\u5c0d\u4f7f\u7528\u8005\u4e5f\u662f\u4e00\u5927\u65b9\u4fbf\uff0c\u6709\u4eba\u5c31\u662f\u53ea\u770b\u7684\u61c2 \u4e2d\u6587\u548c\u65e5\u6587\uff0cAndroid \u6bcf\u6b21\u6c92\u4e2d\u6587\u5c31\u8df3\u5230\u82f1\u6587\uff0c\u7169\u4e0d\u7169\u963f<\/p>\n<p>&nbsp;<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/training\/monitoring-device-state\/doze-standby.htm\">Doze on the Go\u00a0\u79fb\u52d5\u6642\u4f11\u7720<\/a><\/h4>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/doze-diagram-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-204\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/doze-diagram-1.png\" alt=\"doze-diagram-1\" width=\"653\" height=\"289\" \/><\/a>Android 6.0 \u5f15\u9032\u4f11\u7720\u529f\u80fd\uff0c\u9019\u662f\u53ef\u7bc0\u7701\u96fb\u6c60\u96fb\u529b\u7684\u7cfb\u7d71\u6a21\u5f0f\uff0c\u5b83\u6703\u5728\u88dd\u7f6e\u9592\u7f6e\u6642 (\u4f8b\u5982\u653e\u5728\u684c\u5b50\u4e0a\u6216\u62bd\u5c5c\u4e2d) \u5ef6\u5f8c\u61c9\u7528\u7a0b\u5f0f\u7684 CPU \u8207\u7db2\u8def\u6d3b\u52d5\u3002<\/p>\n<p>\u73fe\u5728 Android N \u4e2d\u7684\u4f11\u7720\u529f\u80fd\u66f4\u9032\u4e00\u6b65\u9032\u5c55\uff0c\u300e<span style=\"color: #ff0000;\">\u53ef\u5728\u79fb\u52d5\u6642\u7bc0\u7701\u96fb\u6c60\u96fb\u529b\u300f<\/span>\u3002\u53ea\u8981\u87a2\u5e55\u95dc\u9589\u4e00\u6bb5\u6642\u9593\u4e14\u88dd\u7f6e\u62d4\u9664\u96fb\u6e90\u7684\u60c5\u6cc1\u4e0b\uff0c\u4f11\u7720\u529f\u80fd\u5c31\u6703\u5c07<span style=\"color: #0000ff;\">\u719f\u6089\u7684 CPU \u8207\u7db2\u8def\u9650\u5236\u7684\u5b50\u96c6\u5957\u7528\u5230\u61c9\u7528\u7a0b\u5f0f\uff08Doze applies a subset of the familiar CPU and network restrictions to apps\uff09<\/span>\u3002\u9019\u8868\u793a\u5373\u4f7f\u4f7f\u7528\u8005\u5c07\u88dd\u7f6e\u653e\u5728\u53e3\u888b\u5167\u6642\u4e5f\u53ef\u4ee5\u7bc0\u7701\u96fb\u6c60\u96fb\u529b\u3002<\/p>\n<p>\u539f\u672cAndroid M \u7684\u4f11\u7720\u60c5\u6cc1\u53ea\u6709\u4ee5\u4e0b<\/p>\n<ul>\n<li>\u88dd\u7f6e\u9592\u7f6e\uff08\u4e0d\u5305\u542b\u79fb\u52d5\uff09<\/li>\n<li>\u87a2\u5e55\u95dc\u9589<\/li>\n<li>\u88dd\u7f6e\u62d4\u9664\u96fb\u6e90<\/li>\n<\/ul>\n<p>\u90a3\u9ebc\u300e<span style=\"color: #ff0000;\">\u4f11\u7720\u529f\u80fd\u5c31\u6703\u5c07\u719f\u6089\u7684 CPU \u8207\u7db2\u8def\u9650\u5236\u7684\u5b50\u96c6<\/span>\u300f\u9019\u53e5\u662f\u5565\uff1f\u770b\u4e2d\u82f1\u6587\u90fd\u4e0d\u597d\u7406\u89e3\uff0c\u518d\u9032\u4e00\u6b65\u5c31\u662f\u5e95\u4e0b\u9019\u4e9b\u60c5\u6cc1<\/p>\n<ul>\n<li>Network access is suspended.<\/li>\n<li>The system ignores <a href=\"https:\/\/developer.android.com\/reference\/android\/os\/PowerManager.WakeLock.html\">wake locks<\/a>.<\/li>\n<li>Standard <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/AlarmManager.html\">AlarmManager<\/a><\/code> alarms (including <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/AlarmManager.html#setExact(int, long, android.app.PendingIntent)\">setExact()<\/a><\/code> and <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/AlarmManager.html#setWindow(int, long, long, android.app.PendingIntent)\">setWindow()<\/a><\/code>) are deferred to the next maintenance window.<\/li>\n<li>\n<ul>\n<li>If you need to set alarms that fire while in Doze, use <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/AlarmManager.html#setAndAllowWhileIdle(int, long, android.app.PendingIntent)\">setAndAllowWhileIdle()<\/a><\/code> or <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/AlarmManager.html#setExactAndAllowWhileIdle(int, long, android.app.PendingIntent)\">setExactAndAllowWhileIdle()<\/a><\/code>.<\/li>\n<li>Alarms set with <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/AlarmManager.html#setAlarmClock(android.app.AlarmManager.AlarmClockInfo, android.app.PendingIntent)\">setAlarmClock()<\/a><\/code> continue to fire normally \u2014 the system exits Doze shortly before those alarms fire.<\/li>\n<\/ul>\n<\/li>\n<li>The system does not perform Wi-Fi scans.<\/li>\n<li>The system does not allow <a href=\"https:\/\/developer.android.com\/reference\/android\/content\/AbstractThreadedSyncAdapter.html\">sync adapters<\/a> to run.<\/li>\n<li>The system does not allow <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/job\/JobScheduler.html\">JobScheduler<\/a><\/code> to run<\/li>\n<\/ul>\n<p>\u7e3d\u7d50\uff1a\u4e00\u53e5\u8a71\u300e<span style=\"color: #ff0000;\">\u5c31\u7b97\u662f\u79fb\u52d5\u4e2d\uff0c\u6c92\u5728\u7528\u624b\u6a5f\u6211\u4e00\u6a23\u9032\u5165\u4f11\u7720\u6a21\u5f0f<\/span>\u300f\uff0c\u9019\u88e1 google \u6709\u63d0\u4f9b\u5efa\u8b70 \u300e<a href=\"https:\/\/developer.android.com\/training\/monitoring-device-state\/doze-standby.html#using_gcm\">Using GCM to Interact with Your App While the Device is Idle<\/a>\uff08we strongly recommend that you <strong>use GCM if possible<\/strong>, rather than maintaining your own persistent network connection.\uff09\u300f\uff0c\u5c0d\u65bc GCM \u7684\u901a\u77e5\uff0cAndroid \u6703\u6709\u7cfb\u7d71\u7d1a\u7684\u5c0d\u61c9\uff0c\u76f8\u5c0d\u597d\u5f88\u591a\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/topic\/performance\/background-optimization.html\">Project Svelte: Background Optimizations\u00a0\u5c08\u6848 Svelte\uff1a\u80cc\u666f\u6700\u4f73\u5316<\/a><\/h4>\n<p>\u5c08\u6848 Svelte \u4e00\u76f4\u52aa\u529b\u5728\u751f\u614b\u7cfb\u7d71\u4e2d\u8b93\u5404\u7a2e Android \u88dd\u7f6e\u4e0a\u7cfb\u7d71\u8207\u61c9\u7528\u7a0b\u5f0f\u4f7f\u7528\u6700\u5c11\u7684 RAM\u3002\u5728 Android N \u4e2d\uff0c\u300c\u5c08\u6848 Svelte\u300d\u5c08\u6ce8\u65bc\u6700\u4f73\u5316\u61c9\u7528\u7a0b\u5f0f\u5728\u80cc\u666f\u57f7\u884c\u7684\u65b9\u5f0f\u3002<\/p>\n<p>\u4e0a\u9762\u5c31\u662f\u4e00\u6bb5\u5ee2\u8a71\uff0c\u91cd\u9ede\u5c31\u662f\u00a0Android 7.0 we<a href=\"https:\/\/developer.android.com\/reference\/android\/hardware\/Camera.html\">\u2018<\/a>re removing three commonly-used implicit broadcasts \u2014\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/net\/ConnectivityManager.html\">CONNECTIVITY_ACTION<\/a>,\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/hardware\/Camera.html\">ACTION_NEW_PICTURE<\/a>, and <a href=\"https:\/\/developer.android.com\/reference\/android\/hardware\/Camera.html\">ACTION_NEW_VIDEO<\/a>\u2014 since those can wake the background processes of multiple apps at once and strain memory and battery. If your app is receiving these, take advantage of the Android 7.0 to migrate to\u00a0<b>JobScheduler<\/b>\u00a0and related APIs instead.<\/p>\n<p>\u7e3d\u7d50:<span style=\"font-size: 20px; line-height: 1.6;\">\u300e<span style=\"color: #3366ff;\">\u5f9e Android 5.0\uff0c\u6211\u5c31\u4e00\u76f4\u62dc\u8a17\u5927\u5bb6\u5feb\u4f7f\u7528 <\/span><\/span><b style=\"font-family: inherit; font-style: inherit; line-height: 1.6;\"><span style=\"color: #3366ff;\">JobScheduler\uff0c\u53ef\u662f\u4f60\u5011\u597d\u50cf\u53c8\u4e0d\u592a\u611b\u7528\uff0c\u662f\u4e0d\u662f\u505a\u7684\u4e0d\u597d\u963f\uff1f\u90a3\u6211\u9019\u6b21\u4e0b\u5927\u62db\u4e86<\/span>\u300fgoogle \u5982\u662f\u8aaa\u3002<\/b><br \/>\n\u5176\u5be6\u5c31\u662f\u9019\u4e09\u7a2e action \u90fd\u6709\u300ethundering herd\uff08\u9a5a\u7fa4\uff09\u300f\u7684\u554f\u984c\uff0c\u6703\u9020\u6210 action \u767c\u51fa\u53bb\u7684\u90a3\u4e00\u77ac\u9593\uff0c\u4e00\u5927\u5806 service \u90fd\u9192\u4f86\uff0c\u8b93 device \u8b8a\u5f97\u8017\u96fb\uff0c\u4e14\u6d6a\u8cbb\u8cc7\u6e90\uff0c\u6240\u4ee5\u9019\u6b21\u914d\u5408\u4e0a\u4e00\u6bb5 Doze \u4f86\u6539\u5584\u9019\u554f\u984c\u3002<a href=\"https:\/\/developer.android.com\/reference\/android\/net\/ConnectivityManager.html\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=zh-TW&amp;q=https:\/\/developer.android.com\/reference\/android\/net\/ConnectivityManager.html&amp;source=gmail&amp;ust=1473907874563000&amp;usg=AFQjCNE6zgBX3LbxH0n_rZQH4YKX_-wLgQ\"><span style=\"color: #0070c0; font-family: Consolas; font-size: small;\">CONNECTIVITY_ACTION<\/span><\/a><span style=\"font-family: \u65b0\u7d30\u660e\u9ad4;\">\uff0c\u5728\u57f7\u884c\u4e2d\u7684<\/span><span style=\"font-family: Calibri;\">AP<\/span><span style=\"font-family: \u65b0\u7d30\u660e\u9ad4;\">\u9084\u662f\u53ef<wbr \/>\u4ee5\u7528<\/span><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/BroadcastReceiver.html\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=zh-TW&amp;q=https:\/\/developer.android.com\/reference\/android\/content\/BroadcastReceiver.html&amp;source=gmail&amp;ust=1473907874563000&amp;usg=AFQjCNE1SoO_mMMUTBKjdtY53hd8ySiZ8Q\"><span style=\"color: #0070c0; font-family: Consolas; font-size: small;\">BroadcastReceiver<\/span><\/a><span style=\"font-family: \u65b0\u7d30\u660e\u9ad4;\">\u5411<\/span> <a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Context.html\" target=\"_blank\" data-saferedirecturl=\"https:\/\/www.google.com\/url?hl=zh-TW&amp;q=https:\/\/developer.android.com\/reference\/android\/content\/Context.html&amp;source=gmail&amp;ust=1473907874563000&amp;usg=AFQjCNEBHBTdfxnkvN_zBr9zZ23tbNz4MQ\"><span style=\"color: #0070c0; font-family: Consolas; font-size: small;\">Context.registerReceiver()<\/span><\/a><span style=\"font-family: \u65b0\u7d30\u660e\u9ad4;\">\u8a3b\u518a\u53bb\u807d <span style=\"color: #006600; font-family: Consolas; font-size: small;\">CONNECTIVITY_CHANGE<\/span><span style=\"font-size: small;\">\u3002<\/span><\/span><\/p>\n<h4><\/h4>\n<h4 id=\"data_saver\"><a href=\"https:\/\/www.youtube.com\/watch?v=H-9xKmuwawg\">Data Saver<\/a><\/h4>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/datasaver.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-205\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/datasaver.png\" alt=\"datasaver\" width=\"337\" height=\"275\" \/><\/a><\/p>\n<ul>\n<li>Android 7.0 introduces <span style=\"color: #3366ff;\">Data Saver mode<\/span>, a new system service that helps reduce cellular data use by apps. Data Saver gives users control over how apps use cellular data and lets <span style=\"color: #ff0000;\">developers provide more efficient service<\/span> when Data Saver is on.<\/li>\n<li>When Data Saver is on, the system <span style=\"color: #ff0000;\">blocks background data usage and signals apps to use less data in the foreground wherever possible<\/span> \u2014 such as by limiting bit rate for streaming, reducing image quality, deferring optimistic precaching, and so on.<\/li>\n<li>Android N \u64f4\u5145 <code><a href=\"https:\/\/developer.android.com\/reference\/android\/net\/ConnectivityManager.html\">ConnectivityManager<\/a><\/code> \u70ba\u61c9\u7528\u7a0b\u5f0f\u63d0\u4f9b<a href=\"https:\/\/developer.android.com\/preview\/features\/data-saver.html#status\">\u64f7\u53d6\u4f7f\u7528\u8005\u7684 Data Saver \u559c\u597d\u8a2d\u5b9a<\/a>\u8207<a href=\"https:\/\/developer.android.com\/preview\/features\/data-saver.html#monitor-changes\">\u76e3\u8996\u559c\u597d\u8a2d\u5b9a\u8b8a\u66f4<\/a>\u7684\u65b9\u6cd5\u3002\u6240\u6709\u61c9\u7528\u7a0b\u5f0f\u61c9\u8a72\u6aa2\u8996\u4f7f\u7528\u8005\u662f\u5426\u5df2\u555f\u7528 Data Saver \u4e26<span style=\"color: #ff0000;\">\u52aa\u529b\u9650\u5236\u524d\u666f\u8207\u80cc\u666f\u7684\u6578\u64da\u4f7f\u7528\u91cf\uff08\u671f\u8a31\u963f\uff0c\u5e0c\u671b\u5927\u5bb6\u80fd\u52a0\u5165\u4ee5\u4e0b code\uff09<\/span>\u3002<\/li>\n<\/ul>\n<pre>ConnectivityManager connMgr = (ConnectivityManager)\r\n        getSystemService(Context.CONNECTIVITY_SERVICE);\r\n\/\/ Checks if the device is on a metered network\r\nif (connMgr.isActiveNetworkMetered()) {\r\n  \/\/ Checks user\u2019s Data Saver settings.\r\n  switch (connMgr.getRestrictBackgroundStatus()) {\r\n    case RESTRICT_BACKGROUND_STATUS_ENABLED:\r\n    \/\/ Background data usage is blocked for this app. Wherever possible,\r\n    \/\/ the app should also use less data in the foreground.\r\n\r\n    case RESTRICT_BACKGROUND_STATUS_WHITELISTED:\r\n    \/\/ The app is whitelisted. Wherever possible,\r\n    \/\/ the app should use less data in the foreground and background.\r\n\r\n    case RESTRICT_BACKGROUND_STATUS_DISABLED:\r\n    \/\/ Data Saver is disabled. Since the device is connected to a\r\n    \/\/ metered network, the app should use less data wherever possible.\r\n  }\r\n} else {\r\n  \/\/ The device is not on a metered network.\r\n  \/\/ Use data as required to perform syncs, downloads, and updates.\r\n}\r\n<\/pre>\n<p>Data saver \u5c0d\u65bc app \u7684\u8655\u7406\u6d41\u7a0b<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/datasaver_flow_chart.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-206\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/datasaver_flow_chart.png\" alt=\"datasaver_flow_chart\" width=\"578\" height=\"488\" \/><\/a><\/p>\n<p>\u7e3d\u7d50\uff1a\u770b\u5b8c<a href=\"https:\/\/www.youtube.com\/watch?v=H-9xKmuwawg\"> i\/o \u4ecb\u7d39\u5f71\u7247<\/a>\u4e4b\u5f8c\uff0c\u53c8\u662f\u4e00\u500b\u62dc\u8a17\u5404\u4f4d\u7528 JobSchedule \u7684\u7cfb\u7d71\u7d1a\u9650\u5236\uff08\u90a3\u5973\u8b1b\u8005\u8868\u60c5\u8d85\u6709\u8da3\uff09\u3002\u904e\u53bb\u5c0d\u65bc Data usage \u8a2d\u5b9a\u6700\u591a\u53ea\u6709\u91dd\u5c0d\u500b\u5225 App \u7684 cellular networks \u958b\u555f\u6216\u95dc\u9589\u3002\u5982\u679c\u6709\u597d\u5fc3\u7684 App (Google \u81ea\u5bb6 Youtube\u5982\u4e0b)\uff0c\u4e86\u4e0d\u8d77\u5728\u5e95\u4e0b\u52a0\u500b APP SETTINGS \u8b93\u4f60\u958b\u555f activity \u9032\u884c\u6d41\u91cf\u9650\u5236\u8a2d\u5b9a\u3002<a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/datasaver_m_collection.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-213\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/datasaver_m_collection.jpg\" alt=\"datasaver_m_collection\" width=\"976\" height=\"576\" \/><\/a><\/p>\n<p>\u5982\u679c\u662f\u61f6\u5f97\u505a\u7684 APP(Facebook \u5920\u5927\u5ee0\u4e86\u5427)\uff0c\u5565\u9b3c\u8a2d\u5b9a\u90fd\u6c92\u6709\u3002<\/p>\n<h4><\/h4>\n<h4><a href=\"https:\/\/developer.android.com\/reference\/android\/service\/quicksettings\/Tile.html\">Quick Settings Tile API\u00a0\u5feb\u901f\u8a2d\u5b9a\u78da API<\/a><\/h4>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/quicksettings.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-216\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/quicksettings.png\" alt=\"quicksettings\" width=\"338\" height=\"404\" \/><\/a><\/p>\n<p>\u5feb\u901f\u8a2d\u5b9a\u662f\u76f4\u63a5\u5f9e\u901a\u77e5\u6b04\u986f\u793a\u95dc\u9375\u8a2d\u5b9a\u8207\u52d5\u4f5c\u7684\u5e38\u7528\u7c21\u55ae\u65b9\u5f0f\u3002\u5728 Android N \u4e2d\uff0c\u6211\u5011<span style=\"color: #ff0000;\">\u64f4\u5145\u4e86\u5feb\u901f\u8a2d\u5b9a\u7684\u7bc4\u570d<\/span>\uff0c\u8b93\u5b83\u8b8a\u5f97\u66f4\u5be6\u7528\u3001\u66f4\u4fbf\u5229\u3002<\/p>\n<p>\u6211\u5011\u4e5f\u70ba\u984d\u5916\u7684\u5feb\u901f\u8a2d\u5b9a\u78da\u589e\u52a0\u4e86\u66f4\u591a\u7a7a\u9593\uff0c\u4f7f\u7528\u8005\u53ef\u4ee5\u900f\u904e\u5411\u5de6\u6216\u5411\u53f3\u64a5\u52d5\u5b58\u53d6\u5206\u9801\u986f\u793a\u5340\u57df\u3002\u6211\u5011\u4e5f\u8b93\u4f7f\u7528\u8005\u80fd\u5920\u63a7\u5236\u8981\u986f\u793a\u7684\u5feb\u901f\u8a2d\u5b9a\u78da\u8207\u986f\u793a\u4f4d\u7f6e \u2014 \u4f7f\u7528\u8005\u53ea\u9700\u62d6\u653e\u78da\uff0c\u5373\u53ef\u65b0\u589e\u6216\u79fb\u9664\u5b83\u5011\u3002<\/p>\n<p>\u5c0d\u65bc\u958b\u767c\u4eba\u54e1\uff0cAndroid N \u4e5f\u52a0\u5165\u4e86\u65b0\u7684 API\uff0c\u8b93\u60a8<span style=\"color: #ff0000;\">\u5b9a\u7fa9\u81ea\u5df1\u7684\u5feb\u901f\u8a2d\u5b9a\u78da<\/span>\uff0c\u4ee5\u4fbf\u4f7f\u7528\u8005\u8f15\u9b06\u5b58\u53d6\u60a8\u61c9\u7528\u7a0b\u5f0f\u4e2d\u7684\u95dc\u9375\u63a7\u5236\u9805\u8207\u52d5\u4f5c\u3002<\/p>\n<p><span style=\"color: #0000ff;\">\u5feb\u901f\u8a2d\u5b9a\u78da\u662f\u5c08\u70ba\u6025\u9700\u6216\u5e38\u7528\u7684\u63a7\u5236\u9805\u6216\u52d5\u4f5c\u800c\u4fdd\u7559\u7684\uff0c\u5b83\u4e0d\u61c9\u8a72\u505a\u70ba\u555f\u52d5\u61c9\u7528\u7a0b\u5f0f\u7684\u6377\u5f91\u3002<\/span><\/p>\n<p>\u5b9a\u7fa9\u78da\u4e4b\u5f8c\uff0c\u60a8\u5373\u53ef\u5c07\u5b83\u5011\u986f\u793a\u7d66\u4f7f\u7528\u8005\uff0c\u4f7f\u7528\u8005\u53ea\u9700\u62d6\u653e\u9019\u4e9b\u78da\uff0c\u5373\u53ef\u5c07\u5b83\u5011\u65b0\u589e\u5230\u5feb\u901f\u8a2d\u5b9a\u4e2d\u3002<\/p>\n<p>\u5982\u9700\u5efa\u7acb\u61c9\u7528\u7a0b\u5f0f\u78da\u7684\u76f8\u95dc\u8cc7\u8a0a\uff0c\u8acb\u53c3\u95b1\u53ef\u4e0b\u8f09\u4e4b <a href=\"https:\/\/developer.android.com\/reference\/android\/service\/quicksettings\/package-summary.html\">API \u53c3\u8003\u8cc7\u6599<\/a>\u4e2d\u7684<code>android.service.quicksettings.Tile<\/code>\u3002<\/p>\n<p>\u7e3d\u7d50\uff1a<a href=\"https:\/\/www.youtube.com\/watch?v=vTwJNlKXuMI\">\u76f4\u63a5\u770b\u5f71\u7247\u6700\u6e05\u695a<\/a><br \/>\n<iframe src=\"https:\/\/www.youtube.com\/embed\/vTwJNlKXuMI\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><br \/>\n\u8001\u5be6\u8aaa\u9019\u6771\u897f\u6211\u958b\u767c\u4e0a\u4e5f\u6c92\u6709\u7279\u5225\u73a9\u904e\uff0c\u4e4b\u524d\u90fd\u8981\u662f\u88dd\u7f6e\u958b\u767c\u5546\u624d\u80fd\u7528\uff0c\u73fe\u5728\u7d42\u65bc\u91cb\u653e\u51fa\u4f86\u7d66\u4e00\u822cAPP \u958b\u767c\u8005\u73a9 \uff08\u9019\u6a23\u771f\u7684\u90e8\u6703\u51fa\u73fe\u4e00\u5927\u5806\u5728 setting bar \u4e0a\u9762\u55ce\uff1f\u4e4b\u5f8c\u53ef\u4ee5\u5be6\u9a57\uff0c\u4e00\u96bb app \u5230\u5e95\u53ef\u4ee5\u653e\u5e7e\u500b tile\u4e0a\u53bb\u3002\u4e3b\u8981\u505a\u6cd5\u9808\u8981\u5be6\u4f5c TileService \u53bb\u807d change \u4e14\u6709 permission &#8220;android.permission.BIND_QUICK_SETTINGS_TILE&#8221;\uff09\u3002\uff08ps. \u6709\u6a5f\u6703\u7684\u8a71\uff0c\u8acb\u6211\u7684\u597d\u540c\u4e8b J\u5927\u4f86\u8ac7\u4e00\u4e0b\u9019\u7ae0\u7bc0\uff0c\u4f86\u8ac7\u8ac7 api 24 \u4e4b\u524d\u7684 quick settings \u958b\u767c\u8f9b\u9178\u53f2\uff0c\u807d\u4ed6\u8f49\u8ff0\u611f\u89ba google \u5c31\u662f\u5728\u505a\u4ed6\u4e4b\u524d\u7684\u4e8b\u60c5\u554a\uff09<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/\u87a2\u5e55\u5feb\u7167-2016-09-14-\u4e0a\u534811.12.46.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-218\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/\u87a2\u5e55\u5feb\u7167-2016-09-14-\u4e0a\u534811.12.46.png\" alt=\"%e8%9e%a2%e5%b9%95%e5%bf%ab%e7%85%a7-2016-09-14-%e4%b8%8a%e5%8d%8811-12-46\" width=\"625\" height=\"165\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<h4 id=\"android_tv_recording\"><a href=\"https:\/\/developer.android.com\/training\/tv\/tif\/content-recording.html\">Android TV \u9304\u88fd<\/a><\/h4>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/gp-tv-quality.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-217\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/gp-tv-quality.png\" alt=\"gp-tv-quality\" width=\"480\" height=\"179\" \/><\/a><\/p>\n<p>Android N \u900f\u904e\u65b0\u7684\u9304\u88fd API\uff0c\u65b0\u589e\u4e86\u9304\u88fd\u548c\u64ad\u653e Android TV \u8f38\u5165\u670d\u52d9\u5167\u5bb9\u7684\u529f\u80fd\u3002\u4ee5\u73fe\u6709\u7684\u6642\u9593\u4f4d\u79fb API \u70ba\u5efa\u7f6e\u57fa\u790e\uff0cTV \u8f38\u5165\u670d\u52d9\u53ef\u4ee5\u63a7\u5236\u8981\u9304\u88fd\u54ea\u500b\u983b\u9053\u7684\u8cc7\u6599\u3001\u5982\u4f55\u5132\u5b58\u5df2\u9304\u88fd\u7684\u6642\u6bb5\uff0c\u4ee5\u53ca\u7ba1\u7406\u4f7f\u7528\u8005\u8207\u9304\u88fd\u5167\u5bb9\u7684\u4e92\u52d5\u3002<\/p>\n<p>\u5982\u9700\u8a73\u7d30\u8cc7\u8a0a\uff0c\u8acb\u53c3\u95b1 <a href=\"https:\/\/developer.android.com\/preview\/features\/tv-recording-api.html\">Android TV \u9304\u88fd API<\/a>\u3002<\/p>\n<p>\u7e3d\u7d50\uff1a\u6c92\u7528\u904e\u4e5f\u6c92\u73a9\u904e\uff0c\u4f46\u611f\u89ba\u5f88\u65b9\u4fbf\u3002\u6b61\u8fce\u5927\u5bb6\u63d0\u4f9b\u770b\u6cd5\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/training\/articles\/security-config.html\">Network Security Configuration\u00a0\u7db2\u8def\u5b89\u5168\u6027\u5f37\u5316<\/a><\/h4>\n<p>\u8def\u5b89\u5168\u6027\u8a2d\u5b9a\u529f\u80fd\uff0c<span style=\"color: #ff0000;\">\u8b93\u61c9\u7528\u7a0b\u5f0f\u5728\u5b89\u5168\u7684\u5ba3\u544a\u5f0f\u8a2d\u5b9a\u6a94\u4e2d\u5373\u53ef\u81ea\u8a02\u7db2\u8def\u5b89\u5168\u6027\u8a2d\u5b9a\uff0c\u800c\u4e0d\u5fc5\u4fee\u6539\u61c9\u7528\u7a0b\u5f0f\u7684\u7a0b\u5f0f\u78bc<\/span>\u3002 \u9019\u4e9b\u8a2d\u5b9a\u53ef\u4ee5\u91dd\u5c0d\u7279\u5b9a\u7db2\u57df\u4ee5\u53ca\u91dd\u5c0d\u7279\u5b9a\u61c9\u7528\u7a0b\u5f0f\u4f86\u8a2d\u5b9a\u3002\u4e3b\u8981\u6709\u4ee5\u4e0b\u56db\u9ede\u3002<\/p>\n<p>\u9019\u4e00\u6bb5\u771f\u7684\u6bd4\u8f03\u662f\u5c6c\u65bc\u958b\u767c\u5c64\u9762\uff0c\u76ee\u524d\u9084\u662f\u6bd4\u8f03\u5c11\u78b0\u4e00\u584a\uff0c\u5e0c\u671b\u6211\u7684\u7406\u89e3\u662f\u5c0d\u5f97\uff0c\u4e5f\u6b61\u8fce\u5404\u4f4d\u6307\u6559<\/p>\n<p><b>1. Custom trust anchors:<\/b>Customize which Certificate Authorities (CA) are trusted for an app&#8217;s secure connections. For example, trusting particular self-signed certificates or restricting the set of public CAs that the app trusts.<\/p>\n<p>\u8a2d\u5b9a\u81ea\u6191\u8b49 \uff06\u00a0\u9650\u6b62\u4fe1\u4efb\u7684 CA \u7d44<br \/>\n<a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-192\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_1.png\" alt=\"android_security_1\" width=\"647\" height=\"363\" \/><\/a><\/p>\n<p>\u4fe1\u4efb\u5176\u4ed6 CA<br \/>\n<a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-193\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_2.png\" alt=\"android_security_2\" width=\"642\" height=\"262\" \/><\/a><\/p>\n<p><strong>\u81ea\u8a02\u4fe1\u4efb\u9328\u9ede:\u00a0<\/strong>\u5176\u5be6\u53ea\u770b\u4e0a\u9762\u7684 xml code \uff0c\u500b\u4eba\u5f88\u76f4\u89ba\u5f97\u5c31\u662f\u628a\u4ee5\u524d\u5c0d ssl(Secure Sockets Layer) \u7684\u8655\u7406\u7531\u7a0b\u5f0f\u78bc\u8f49\u63db\u5230 google xml \u7684\u898f\u7bc4\u5316\uff0c\u9019\u78ba\u5be6\u53ef\u4ee5\u6709\u6548\u964d\u4f4e\u958b\u767c\u8005\u7684\u82e6\u5de5\u3002\u4ee5\u524d\u7684\u73a9\u6cd5\u5c31\u662f\u5728 Android \u88e1\u4f7f\u7528 HttpUrlConnection \u4f7f\u7528 TrustManager \u53bb\u8655\u7406\u3002\u4e8b\u5be6\u4e0a\u5927\u90e8\u5206\u958b\u767c\u4e0b\u4e0d\u5c11\u958b\u767c\u8005\u662f\u4e0d\u592a\u8655\u7406\u9019\u584a\uff0c\u4e3b\u8981\u662f\u56e0\u70ba Android \u5df2\u7d93\u9810\u5148\u628a\u5408\u6cd5\u767c\u884c\u55ae\u4f4d\uff08VeriSign\uff09\u7684\u6191\u8b49\u90fd\u62c9\u9032\u4f86\u3002\u800c\u6bd4\u8f03\u7279\u6b8a\u7684\u60c5\u6cc1\u5247\u662f\u958b\u767c\u8005\u81ea\u5df1\u9700\u8981\u9023\u7dda\u5230\u81ea\u5df1\u7684 server \u4f5c\u5b58\u53d6\uff0c\u7136\u5f8c\u53c8\u4e0d\u60f3\u4f7f\u7528\u767c\u884c\u55ae\u4f4d\u767c\u884c\u7684\u6191\u8b49\uff0c\u539f\u56e0\u5176\u5be6\u883b\u7c21\u55ae\uff0c\u5c31\u662f\u9001\u53bb\u767c\u884c\u55ae\u4f4d\u4e00\u5e74\u5927\u6982\u8981\u7e73\u8cbb 100 &#8211; 500 \u7f8e\u91d1\uff0c\u4e14\u5927\u90e8\u5206 app \u6703\u5b58\u53d6\u7684 server \u90fd\u883b\u56fa\u5b9a\uff08\u80a1\u7968:\u901a\u5e38\u6703\u8981\u6c42\u4f7f\u7528\u500b\u4eba CA\uff0c\u4fe1\u4ef6:\u901a\u5e38\u6703\u81ea\u5df1 Import \u516c\u53f8\u7684 CA&#8230;.\uff09\u3002<\/p>\n<p>\u4ee5\u4e0b\u70ba\u904e\u53bb\u7684\u5beb\u6cd5\uff0c\u70ba\u4e86\u8655\u7406\u81ea\u767c\u884c\u6191\u8b49\uff0c\u4e0d\u5c11 google c\/p\uff08\u5c31\u662f\u6211\uff09 \u5de5\u7a0b\u5e2b\u5c31\u6703\u72af\u4e00\u4e9b\u932f\u8aa4\uff0c\u7b2c\u4e00\u6bb5\u7a0b\u5f0f\u78bc\u6703\u4fe1\u4efb\u6240\u6709\u7684 CA \uff0c\u9019\u6a23\u641e\u7684\u8a71\u6709 SSL \u8ddf\u6c92 SSL \u662f\u4e00\u6a23\u7684\u3002<\/p>\n<pre>import org.apache.http.conn.ssl.SSLSocketFactory;\r\npublic class MySSLSocketFactory extends SSLSocketFactory {\r\n    SSLContext sslContext = SSLContext.getInstance(\"TLS\");\r\n \r\n    public MySSLSocketFactory(KeyStore truststore) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException {\r\n        super(truststore);\r\n \r\n        TrustManager tm = new X509TrustManager() {\r\n            public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {\r\n            }\r\n \r\n            public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {\r\n            }\r\n \r\n            public X509Certificate[] getAcceptedIssuers() {\r\n                return null;\r\n            }\r\n        };\r\n \r\n        sslContext.init(null, new TrustManager[] { tm }, null);\r\n   }\r\n \r\n    @Override\r\n    public Socket createSocket(Socket socket, String host, int port, boolean autoClose) throws IOException, UnknownHostException {\r\n        return sslContext.getSocketFactory().createSocket(socket, host, port, autoClose);\r\n    }\r\n \r\n    @Override\r\n    public Socket createSocket() throws IOException {\r\n        return sslContext.getSocketFactory().createSocket();\r\n    }\r\n}\r\n<\/pre>\n<p>\u800c\u4ee5\u4e0b\u9019\u6bb5\u5247\u662f \u8cb7\u4e00\u5957\u9001\u5168\u90e8\u7684\u5178\u578b\u7bc4\u4f8b\uff0c\u7576\u6191\u8b49\u63a5\u53d7\u5176\u4e2d\u4e00\u500b\u7db2\u7ad9\u7684 server \uff0c\u90a3\u9ebc\u5176\u4ed6\u7684\u4e5f\u7d71\u7d71\u90fd\u63a5\u53d7\u4e86<\/p>\n<pre>HostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;\r\n \r\nDefaultHttpClient client = new DefaultHttpClient();\r\n \r\nSchemeRegistry registry = new SchemeRegistry();\r\nSSLSocketFactory socketFactory = SSLSocketFactory.getSocketFactory();\r\nsocketFactory.setHostnameVerifier((X509HostnameVerifier) hostnameVerifier);\r\nregistry.register(new Scheme(\"https\", socketFactory, 443));\r\nSingleClientConnManager mgr = new SingleClientConnManager(client.getParams(), registry);\r\nDefaultHttpClient httpClient = new DefaultHttpClient(mgr, client.getParams());\r\n \r\n\/\/ Set verifier     \r\nHttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);\r\n \r\n\/\/ Example send http request\r\nfinal String url = \"https:\/\/www.pchome.com\u201d\r\nHttpPost httpPost = new HttpPost(url);\r\nHttpResponse response = httpClient.execute(httpPost);\r\n \r\nHttpsURLConnection.setDefaultHostnameVerifier(hostnameVerifier);\r\n\r\nHostnameVerifier hostnameVerifier = org.apache.http.conn.ssl.SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER;\r\n<\/pre>\n<p>\u626f\u7684\u9019\u908a\u6709\u9ede\u9060\u4e86\uff0c\u4e3b\u8981\u662f\u60f3\u628a\u524d\u56e0\u5f8c\u679c\u9084\u6709\u800d\u7b28\u7684\u6545\u4e8b\u5beb\u4e00\u4e0b\u3002<span style=\"color: #3366ff;\">\u53e6\u5916\u4e0d\u77e5\u9053\u6709\u6c92\u6709\u4eba\u89ba\u5f97 raw\/my_ca \u9019\u6a23\u5beb\u6703\u6709\u554f\u984c\uff0c\u5982\u679c\u88ab\u53cd\u7d44\u8b6f\uff0c\u90a3\u9019\u500b CA \u6191\u8b49\u4e0d\u662f\u5f88\u5371\u96aa\u55ce\uff1f<del>\u6839\u64da\u5c0f\u7d44\u8a0e\u8ad6\uff0c\u611f\u89ba\u9019\u500b ca \u61c9\u8a72\u55ae\u7d14\u53ea\u662f\u500b\u516c\u9470\uff0c\u6216\u662f\u53ea\u662f\u55ae\u7d14\u70ba\u4e86\u7bc4\u4f8b\u7c21\u55ae\u5beb\u800c\u5df2\u00a0<\/del> <\/span>\uff0c\u6b61\u8fce\u6709\u9ad8\u624b\u5e6b\u5fd9\u89e3\u7b54\u3002<\/p>\n<p><b>2. Debug-only overrides:<\/b>Safely debug secure connections in an app without added risk to the installed base.<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_debug.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-194\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_debug.png\" alt=\"android_security_debug\" width=\"460\" height=\"176\" \/><\/a><\/p>\n<p>\u8a2d\u5b9a CA \u9032\u884c\u5075\u932f\uff1a<span style=\"color: #ff0000;\">\u300c\u53ea\u300d\u6709\u5728 <a style=\"color: #ff0000;\" href=\"https:\/\/developer.android.com\/guide\/topics\/manifest\/application-element.html#debug\">android:debuggable<\/a> \u70ba <code>true<\/code> \u6642\u624d\u4e88\u4ee5\u4fe1\u4efb<\/span>\u3002\u5c31\u662f\u5be6\u7528\u6e2c\u8a66\u529f\u80fd\uff0c\u53ef\u4ee5\u628a\u5728 code \u88e1\u9762\u7684 DEBUG \u642c\u51fa\u4f86\u3002\u56e0\u70ba play store\u00a0\u63a1\u53d6\u7684\u5b89\u5168\u63aa\u65bd\u662f\uff0c\u4e0d\u63a5\u53d7\u6a19\u793a\u70ba\u53ef\u5075\u932f\u7684\u61c9\u7528\u7a0b\u5f0f\uff0c\u6240\u4ee5\u9019\u7a2e\u65b9\u5f0f\u6703\u6bd4\u689d\u4ef6\u5f0f\u7a0b\u5f0f\u78bc\u5b89\u5168\u3002<\/p>\n<p><b>3. Cleartext<\/b><b> traffic opt-out:<\/b>Protect apps from accidental usage of cleartext traffic.<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_cleartext.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-195\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_cleartext.png\" alt=\"android_security_cleartext\" width=\"620\" height=\"146\" \/><\/a><\/p>\n<p><strong>\u9000\u51fa\u660e\u78bc\u6d41\u91cf<\/strong>\uff1a\u6253\u7b97<span style=\"color: #ff0000;\">\u53ea\u4f7f\u7528\u5b89\u5168\u9023\u7dda\u9023\u7dda\u81f3\u76ee\u7684\u5730\u7684\u61c9\u7528\u7a0b\u5f0f<\/span>\uff0c\u53ef\u4ee5\u91dd\u5c0d\u90a3\u4e9b\u76ee\u7684\u5730\u9000\u51fa\u652f\u63f4\u660e\u78bc (\u4f7f\u7528\u672a\u52a0\u5bc6\u7684 HTTP \u901a\u8a0a\u5354\u5b9a\uff0c\u800c\u975e HTTPS)\u3002 \u6b64\u9078\u9805\u6709\u52a9\u65bc\u907f\u514d\u61c9\u7528\u7a0b\u5f0f\u7531\u65bc\u5916\u90e8\u4f86\u6e90 (\u4f8b\u5982\uff0c\u5f8c\u7aef\u4f3a\u670d\u5668) \u63d0\u4f9b\u7684 URL \u4e2d\u767c\u751f\u8b8a\u66f4\uff0c\u800c\u9020\u6210\u610f\u5916\u56de\u5fa9\u3002 \u5982\u9700\u66f4\u591a\u8a73\u7d30\u8cc7\u6599\uff0c\u8acb\u53c3\u95b1\u00a0<code><a href=\"https:\/\/developer.android.com\/reference\/android\/security\/NetworkSecurityPolicy.html?hl=km#isCleartextTrafficPermitted()\">NetworkSecurityPolicy.isCleartextTrafficPermitted()<\/a><\/code>\u3002\u300e<\/p>\n<p><span style=\"color: #ff0000;\">This flag is honored on a best effort basis because it&#8217;s impossible to prevent all cleartext traffic from Android applications given the level of access provided to them<\/span>. For example, there&#8217;s no expectation that the <code><a href=\"https:\/\/developer.android.com\/reference\/java\/net\/Socket.html?hl=km\">Socket<\/a><\/code> API will honor this flag because it cannot determine whether its traffic is in cleartext. However, most network traffic from applications is handled by higher-level network stacks\/components which can honor this aspect of the policy.<\/p>\n<p>NOTE: <code><a href=\"https:\/\/developer.android.com\/reference\/android\/webkit\/WebView.html?hl=km\">WebView<\/a><\/code> does not honor this flag.\u300f<\/p>\n<p>\u4f8b\u5982\u4e0a\u9762\uff0c\u61c9\u7528\u7a0b\u5f0f\u60f3\u8981\u78ba\u4fdd secure.example.com \u7684\u6240\u6709\u9023\u7dda\u4e00\u5f8b\u8981\u900f\u904e HTTPS \u5b8c\u6210\uff0c\u4ee5\u4fdd\u8b77\u654f\u611f\u6d41\u91cf\u4e0d\u53d7\u60e1\u610f\u7db2\u8def\u5371\u5bb3\u3002<\/p>\n<p>\u88dc\u5145\uff1a\u5728 API level 23. \u6709\u52a0\u5165\u9019\u500b\u00a0android:usesCleartextTraffic\uff0c\u4f46\u9019\u500b\u662f\u6240\u6709\u7db2\u57df\u90fd\u88ab\u9650\u5236\u4f4f\uff0c\u9810\u8a2d\u503c\u662f true (for example, HTTP and FTP stacks, <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/DownloadManager.html\">DownloadManager<\/a><\/code>, <code><a href=\"https:\/\/developer.android.com\/reference\/android\/media\/MediaPlayer.html\">MediaPlayer<\/a><\/code>)<\/p>\n<p><b>4. Certificate pinning:<\/b>Restrict an app&#8217;s secure connection to particular certificates.<\/p>\n<p><strong><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_pin-1.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-198\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/android_security_pin-1.png\" alt=\"android_security_pin\" width=\"786\" height=\"237\" \/><\/a>\u95dc\u806f\u6191\u8b49\uff1a<\/strong><\/p>\n<p>\u61c9\u7528\u7a0b\u5f0f\u4e00\u822c\u6703\u4fe1\u4efb\u6240\u6709\u9810\u5148\u5b89\u88dd\u7684 CA\u3002\u82e5\u9019\u985e\u7684\u4efb\u4f55 CA \u610f\u5728\u767c\u884c\u8a50\u9a19\u6191\u8b49\uff0c\u61c9\u7528\u7a0b\u5f0f\u6703\u6709\u906d\u53d7 MiTM \u653b\u64ca\u7684\u98a8\u96aa\u3002 \u6709\u4e9b\u61c9\u7528\u7a0b\u5f0f\u9078\u64c7\u900f\u904e\u9650\u5236\u6240\u4fe1\u4efb\u7684 CA \u7d44\u6216\u95dc\u806f\u6191\u8b49\uff0c\u4f86\u9650\u5236\u53ef\u63a5\u53d7\u7684\u6191\u8b49\u7d44\u3002<\/p>\n<p>\u6191\u8b49\u95dc\u806f\u7684\u65b9\u6cd5\u662f\uff0c\u900f\u904e\u516c\u7528\u91d1\u9470\u7684\u96dc\u6e4a (X.509 \u6191\u8b49\u7684 SubjectPublicKeyInfo) \u4f86\u63d0\u4f9b\u4e00\u7d44\u6191\u8b49\u3002 \u53ea\u6709\u7576\u6191\u8b49\u93c8\u81f3\u5c11\u5305\u542b\u4e00\u500b\u95dc\u806f\u7684\u516c\u7528\u91d1\u9470\u6642\uff0c\u624d\u662f\u6709\u6548\u7684\u6191\u8b49\u93c8\u3002<\/p>\n<p>\u8acb\u6ce8\u610f\uff0c\u4f7f\u7528\u6191\u8b49\u95dc\u806f\u6642\uff0c\u60a8\u52d9\u5fc5\u8981\u5305\u62ec\u5099\u4efd\u91d1\u9470\uff0c\u9019\u6a23\u842c\u4e00\u5f37\u5236\u60a8\u5207\u63db\u5230\u65b0\u7684\u91d1\u9470\u6216\u8b8a\u66f4 CA (\u95dc\u806f\u5230 CA \u6191\u8b49\u6216\u8a72 CA \u7684\u4e2d\u7e7c\u8005) \u6642\uff0c\u60a8\u7684\u61c9\u7528\u7a0b\u5f0f\u9023\u7dda\u624d\u4e0d\u6703\u53d7\u5230\u5f71\u97ff\u3002 \u5426\u5247\uff0c\u60a8\u5fc5\u9808\u63a8\u51fa\u61c9\u7528\u7a0b\u5f0f\u66f4\u65b0\uff0c\u624d\u80fd\u9084\u539f\u9023\u7dda\u3002<\/p>\n<p>\u7e3d\u7d50\uff1a\u9019\u6bb5\u6211\u53ea\u6709\u5728\u958b\u767c mail \u6642\u6709\u7a0d\u5fae\u6d89\u7565\u3002\u6c92\u8fa6\u6cd5\u7d66\u51fa\u66f4\u591a\u5be6\u52d9\u4e0a\u7684\u611f\u60f3\u3002\u4f46\u770b\u5f97\u51fa\u4f86 google \u5f9e M \u958b\u59cb\u5c31\u975e\u5e38\u6ce8\u610f\uff0c\u4f46\u662f M \u6240\u5728\u610f\u7684\u5247\u662f device \u64cd\u4f5c\u4ee5\u53ca\u4f7f\u7528\u8005\u8cc7\u6599\u7684\u6b0a\u9650\u5b89\u5168\uff0c\u800c N \u5247\u662f\u66f4\u52a0\u5f37\u5316\u7db2\u8def\u5b89\u5168\u9019\u584a\u3002\u770b\u8d77\u4f86\u61c9\u8a72\u662f\u767c\u751f\u904e\u592a\u591a\u554f\u984c\u5566\u3002<\/p>\n<p>&nbsp;<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/training\/articles\/scoped-directory-access.html\">Scoped Directory Access\u00a0\u9650\u5b9a\u7bc4\u570d\u76ee\u9304\u5b58\u53d6<\/a><\/h4>\n<p>\u61c9\u7528\u7a0b\u5f0f (\u4f8b\u5982\uff0c\u76f8\u7247\u61c9\u7528\u7a0b\u5f0f) <span style=\"color: #ff0000;\">\u901a\u5e38\u53ea\u9700\u8981\u5b58\u53d6\u5916\u90e8\u5132\u5b58\u7a7a\u9593\u4e2d\u7684\u7279\u5b9a\u76ee\u9304<\/span>\uff0c\u4f8b\u5982\u00a0<code>Pictures<\/code> \u76ee\u9304\u3002 \u76ee\u524d\u7528\u4f86\u5b58\u53d6\u5916\u90e8\u5132\u5b58\u7a7a\u9593\u7684\u65b9\u5f0f\u4e26\u975e\u8a2d\u8a08\u4f86\u8f15\u9b06\u5730\u70ba\u9019\u4e9b\u985e\u578b\u7684\u61c9\u7528\u7a0b\u5f0f\u63d0\u4f9b\u5df2\u8a2d\u5b9a\u76ee\u6a19\u7684\u76ee\u9304\u5b58\u53d6\u3002 \u4f8b\u5982\uff1a<\/p>\n<ul>\n<li>\u5728\u60a8\u7684\u5ba3\u793a\u8aaa\u660e\u4e2d\u8981\u6c42 <code><a href=\"https:\/\/developer.android.com\/reference\/android\/Manifest.permission.html#READ_EXTERNAL_STORAGE\">READ_EXTERNAL_STORAGE<\/a><\/code> \u6216 <code><a href=\"https:\/\/developer.android.com\/reference\/android\/Manifest.permission.html#WRITE_EXTERNAL_STORAGE\">WRITE_EXTERNAL_STORAGE<\/a><\/code> \u53ef\u5141\u8a31\u5b58\u53d6\u5916\u90e8\u5132\u5b58\u7a7a\u9593ac\u4e0a\u7684\u6240\u6709\u516c\u7528\u76ee\u9304\uff0c\u4f46\u9019\u53ef\u80fd\u8d85\u904e\u60a8\u61c9\u7528\u7a0b\u5f0f\u6240\u9700\u7684\u5b58\u53d6\u6b0a\u3002<\/li>\n<li>\u4f7f\u7528<a href=\"https:\/\/developer.android.com\/guide\/topics\/providers\/document-provider.html\">\u5132\u5b58\u7a7a\u9593\u5b58\u53d6\u67b6\u69cb<\/a>\u901a\u5e38\u6703\u4f7f\u5f97\u60a8\u7684\u4f7f\u7528\u8005\u900f\u904e\u7cfb\u7d71 UI \u6311\u9078\u76ee\u9304\uff0c\u9019\u5728\u60a8\u7684\u61c9\u7528\u7a0b\u5f0f\u4e00\u5f8b\u5b58\u53d6\u76f8\u540c\u5916\u90e8\u76ee\u9304\u7684\u60c5\u6cc1\u4e0b\u662f\u4e0d\u5fc5\u8981\u7684\u3002<\/li>\n<\/ul>\n<p>Android N \u63d0\u4f9b\u65b0\u7684\u7c21\u5316 API\uff0c\u53ef\u7528\u4f86\u5b58\u53d6\u5e38\u7528\u5916\u90e8\u5132\u5b58\u7a7a\u9593\u76ee\u9304\u3002<\/p>\n<pre>\/\/ \u958b\u555f\u4e3b\u8981\u5171\u7528\u5132\u5b58\u7a7a\u9593\u4e2d\u7684 <code>Pictures<\/code> \u76ee\u9304\r\nStorageManager sm = (StorageManager)getSystemService(Context.STORAGE_SERVICE);\r\nStorageVolume volume = sm.getPrimaryVolume();\r\nIntent intent = volume.createAccessIntent(Environment.DIRECTORY_PICTURES);\r\nstartActivityForResult(intent, request_code);\r\n<\/pre>\n<p>\u4e26\u5411\u4f7f\u7528\u8005\u78ba\u8a8d\u6b0a\u9650<br \/>\n<a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/\u87a2\u5e55\u5feb\u7167-2016-09-12-\u4e0b\u53484.57.59.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-199\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/\u87a2\u5e55\u5feb\u7167-2016-09-12-\u4e0b\u53484.57.59.png\" alt=\"%e8%9e%a2%e5%b9%95%e5%bf%ab%e7%85%a7-2016-09-12-%e4%b8%8b%e5%8d%884-57-59\" width=\"289\" height=\"352\" \/><\/a><\/p>\n<p>\u5b58\u53d6\u5916\u90e8\u7a7a\u9593\u5247\u9700\u8981\uff0c\u53e6\u5916\u5ba3\u544a<\/p>\n<p><a href=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/\u87a2\u5e55\u5feb\u7167-2016-09-12-\u4e0b\u53485.17.16.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-200\" src=\"https:\/\/boochlin.com\/wp-content\/uploads\/2016\/09\/\u87a2\u5e55\u5feb\u7167-2016-09-12-\u4e0b\u53485.17.16.png\" alt=\"%e8%9e%a2%e5%b9%95%e5%bf%ab%e7%85%a7-2016-09-12-%e4%b8%8b%e5%8d%885-17-16\" width=\"558\" height=\"162\" \/><\/a><\/p>\n<pre>\/\/ BroadcastReceiver has already cached the MEDIA_MOUNTED\r\n\/\/ notification Intent in mediaMountedIntent\r\nStorageVolume volume = (StorageVolume)\r\n    mediaMountedIntent.getParcelableExtra(StorageVolume.EXTRA_STORAGE_VOLUME);\r\nvolume.createAccessIntent(Environment.DIRECTORY_PICTURES);\r\nstartActivityForResult(intent, request_code);\r\n<\/pre>\n<p>\u7e3d\u7d50\uff1a\u4e00\u76f4\u5230\u76ee\u524d\uff0c\u5e7e\u4e4e\u6240\u6709\u7684 app \u958b\u767c\u5c0d\u65bc store access \u6b0a\u9650\u90fd\u662f\u5168\u6709\u6216\u662f\u5168\u7121\uff0c\u9019\u5c0d\u4f7f\u7528\u8005\u6703\u5728\u7d66\u4e88\u6b0a\u9650\u611f\u5230\u6050\u614c\u3002google \u4e5f\u4e0d\u662f\u6c92\u6709\u60f3\u904e\u9019\u554f\u984c\uff0c\u5c31\u662f\u5728 kitkat \u6642\u52a0\u5165\u7684\u00a0<a href=\"https:\/\/developer.android.com\/guide\/topics\/providers\/document-provider.html\">Storage Access Framework<\/a> \u8b93\u4f7f\u7528\u8005\u81ea\u5df1\u6311\u9078\u8cc7\u6599\u593e\u7d66\u4e88\u5b58\u53d6\uff0c\u4f46\u8001\u5be6\u8aaa\u6211\u9084\u771f\u7684\u5f88\u5c11\u770b\u5230\u6703\u4f7f\u7528 SAF \u7684 app \uff0c\u4e3b\u8981\u9084\u662f\u56e0\u70ba\u4f7f\u7528\u8005\u6703\u89ba\u5f97\u592a\u9ebb\u7169\uff0c<span style=\"color: #3366ff;\">\u7e3d\u548c\u300e\u597d\u9ebb\u7169\u300f\u548c\u300e\u901a\u5929\u7684\u6b0a\u9650\u300f\u5169\u500b\u554f\u984c\uff0c \u5c31\u5e0c\u671b\u80fd\u53d6\u6d88\u5169\u5927\u8cc7\u6599\u5b58\u53d6\u6b0a\u9650\uff0c\u7136\u5f8c\u91dd\u5c0d\u56fa\u5b9a\u901a\u7528\u578b\u7684\u7cfb\u7d71\u8cc7\u6599\u593e\u505a\u51fa\u7c21\u5316\u64cd\u4f5c<\/span>\uff0c\u6539\u6210\u767c intent \u7684\u65b9\u5f0f\u53bb\u8acb\u7cfb\u7d71\u5e6b\u5fd9\u4fdd\u8b49\u8cc7\u6599\u7684\u5b58\u53d6\u7bc4\u570d\u3002ps.\u53d6\u5f97\u5c0d\u7279\u5b9a\u5916\u90e8\u76ee\u9304\u7684\u5b58\u53d6\u6b0a\u4e5f\u6703\u53d6\u5f97\u5c0d\u8a72\u76ee\u9304\u4e4b\u5b50\u76ee\u9304\u7684\u5b58\u53d6\u6b0a\u3002<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html?hl=en\">Virtual Files \u865b\u64ec\u6a94\u6848<\/a><\/h4>\n<p>In previous versions of Android, your app could use the <span style=\"color: #ff0000;\">Storage Access Framework<\/span> to allow users to select files from their cloud storage accounts, such as Google Drive. However, there was <span style=\"color: #ff0000;\">no way to represent files that did not have a direct bytecode representation<\/span>; every file was required to provide an input stream.<\/p>\n<p>Android 7.0 adds the concept of <em>virtual files<\/em> to the <span style=\"color: #ff0000;\">Storage Access Framework.<\/span> The virtual files feature allows your <code><a href=\"https:\/\/developer.android.com\/reference\/android\/provider\/DocumentsProvider.html\">DocumentsProvider<\/a><\/code> to return document URIs that can be used with an <code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html#ACTION_VIEW\">ACTION_VIEW<\/a><\/code> intent even if they don&#8217;t have a direct bytecode representation. Android 7.0 also allows you to provide alternate formats for user files, virtual or otherwise.<\/p>\n<p>To get a URI for a virtual document in your app, first you create an <code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html\">Intent<\/a><\/code> to open the file picker UI. <span style=\"color: #ff0000;\">Since an app cannot directly open a virtual file by using the<\/span> <code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/ContentResolver.html#openInputStream(android.net.Uri)\">openInputStream()<\/a><\/code> <span style=\"color: #ff0000;\">method<\/span>, your app does not receive any virtual files if you include the <code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html#CATEGORY_OPENABLE\">CATEGORY_OPENABLE<\/a><\/code> category.<\/p>\n<p>After the user has made a selection, the system calls the <code><a href=\"https:\/\/developer.android.com\/reference\/android\/app\/Activity.html#onActivityResult(int, int, android.content.Intent)\">onActivityResult()<\/a><\/code> method. Your app can retrieve the URI of the virtual file and get an input stream, as demonstrated in the code snippet below.<\/p>\n<p>\u5e2b\u723a\u4f86\u8aaa\u8aaa\u9019\u662f\u5565\uff0c\u5c31\u662f\u4ee5\u524d\u96d6\u7136\u53ef\u4ee5\u5229\u7528 Storage Access Framework \u62ff\u5230\u96f2\u7aef\u7a7a\u9593\u7684 URI\uff0c\u4f46\u662f\u56e0\u70ba\u96f2\u7aef\u6587\u4ef6\u6c92\u6709\u5728\u672c\u5730\u7aef\u7684\u76f4\u63a5 bytecode \u90a3\u5c31\u7121\u6cd5\u88ab\u986f\u793a\u51fa\u4f86\u8b93\u4f7f\u7528\u8005\u9078\u64c7\uff08\u9019\u6bb5\u8a71\u8d85\u96e3\u7406\u89e3\uff0c\u7c21\u55ae\u4f86\u8aaa\u5c31\u662f\u00a0<code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html#ACTION_VIEW\">ACTION_VIEW<\/a><\/code> intent \u6c92\u8fa6\u6cd5\u627e\u5230\u9019\u500b\u96f2\u7aef\u6587\u9593 URI \u7684\u6a94\u6848\uff09\uff0c\u90a3\u73fe\u5728\u52a0\u5165 virtual file \u7684\u6982\u5ff5\uff0c\u9019\u6771\u897f\u53ef\u4ee5\u88ab\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/provider\/DocumentsProvider.html\">DocumentsProvider<\/a>\u00a0\u627e\u5230\uff0c\u4f46\u662f\u7562\u7adf virtual file \u4e26\u4e0d\u5b58\u5728\u65bc local \uff0c\u6240\u4ee5\u5c31\u7b97\u73fe\u5728\u53ef\u4ee5\u7528\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html#ACTION_VIEW\">ACTION_VIEW<\/a>\u00a0\u627e\u5230\uff0c\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/content\/ContentResolver.html#openInputStream(android.net.Uri)\">openInputStream<\/a>\u00a0\u4f9d\u7136\u7121\u6cd5\u5b58\u53d6 byte code.\u90a3\u8981\u600e\u9ebc\u8fa6\u5462\uff0c\u6211\u7d66\u4f60 code \u4f60\u53c3\u8003\u53c3\u8003\u3002<\/p>\n<p>\u5343\u8a00\u842c\u8a9e\u4e0d\u5982\u4f86\u6bb5 code<\/p>\n<pre>\/\/ Other Activity code ...\r\n\r\n  final static private int REQUEST_CODE = 64;\r\n\r\n  \/\/ We listen to the OnActivityResult event to respond to the user's selection.\r\n  @Override\r\n  public void onActivityResult(int requestCode, int resultCode,\r\n    Intent resultData) {\r\n      try {\r\n        if (requestCode == REQUEST_CODE &amp;&amp;\r\n            resultCode == Activity.RESULT_OK) {\r\n\r\n            Uri uri = null;\r\n\r\n            if (resultData != null) {\r\n                uri = resultData.getData();\r\n\r\n                ContentResolver resolver = getContentResolver();\r\n\r\n                \/\/ Before attempting to coerce a file into a MIME type,\r\n                \/\/ check to see what alternative MIME types are available to\r\n                \/\/ coerce this file into.\r\n                String[] streamTypes =\r\n                  resolver.getStreamTypes(uri, \"*\/*\");\r\n\r\n                AssetFileDescriptor descriptor =\r\n                    resolver.openTypedAssetFileDescriptor(\r\n                        uri,\r\n                        streamTypes[0],\r\n                        null);\r\n\r\n                \/\/ Retrieve a stream to the virtual file.\r\n                InputStream inputStream = descriptor.createInputStream();\r\n            }\r\n        }\r\n      } catch (Exception ex) {\r\n        Log.e(\"EXCEPTION\", \"ERROR: \", ex);\r\n      }\r\n  }\r\n<\/pre>\n<p>\u5e95\u4e0b\u662f\u4e00\u822c\u60c5\u6cc1\uff0c\u975e virtual file<\/p>\n<pre>@Override\r\npublic void onActivityResult(int requestCode, int resultCode,\r\n        Intent resultData) {\r\n\r\n    \/\/ The ACTION_OPEN_DOCUMENT intent was sent with the request code\r\n    \/\/ READ_REQUEST_CODE. If the request code seen here doesn't match, it's the\r\n    \/\/ response to some other intent, and the code below shouldn't run at all.\r\n\r\n    if (requestCode == READ_REQUEST_CODE &amp;&amp; resultCode == Activity.RESULT_OK) {\r\n        \/\/ The document selected by the user won't be returned in the intent.\r\n        \/\/ Instead, a URI to that document will be contained in the return intent\r\n        \/\/ provided to this method as a parameter.\r\n        \/\/ Pull that URI using resultData.getData().\r\n        Uri uri = null;\r\n        if (resultData != null) {\r\n            uri = resultData.getData();\r\n            Log.i(TAG, \"Uri: \" + uri.toString());\r\n            showImage(uri);\r\n        }\r\n    }\r\n}\r\n\r\n<\/pre>\n<p>\u7e3d\u7d50\uff1a\u7121\u611f\uff0c\u56e0\u70ba\u6211\u9084\u662f\u4e0d\u592a\u7406\u89e3\u76f4\u63a5\u7684\u61c9\u7528\u9ede\u5728\u54ea\uff1f\u800c\u4e14\u4ed6\u7684\u82f1\u6587\u63cf\u8ff0\u4e0d\u592a\u597d\u61c2\uff0c\u5e0c\u671b\u6211\u6c92\u6709\u7406\u89e3\u932f\u3002\u6b61\u8fce\u5927\u5bb6\u6307\u6559\u3002<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/training\/articles\/direct-boot.html\">Supporting Direct Boot \u76f4\u63a5\u958b\u6a5f<\/a><\/h4>\n<p>\u76f4\u63a5\u958b\u6a5f\u53ef\u52a0\u901f\u88dd\u7f6e\u555f\u52d5\u6642\u9593\uff0c\u4e26\u8b93\u5df2\u8a3b\u518a\u7684\u61c9\u7528\u7a0b\u5f0f\u53ea\u80fd\u4f7f\u7528\u6709\u9650\u7684\u529f\u80fd (\u5373\u4f7f\u5728<span style=\"color: #ff0000;\">\u672a\u9810\u671f\u7684\u91cd\u65b0\u958b\u6a5f<\/span>\u4e4b\u5f8c)\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4e00\u500b\u52a0\u5bc6\u88dd\u7f6e\u5728\u4f7f\u7528\u8005\u7761\u89ba\u6642\u91cd\u65b0\u958b\u6a5f\uff0c<span style=\"color: #ff0000;\">\u5df2\u8a3b\u518a\u7684\u9b27\u9418\u3001\u8a0a\u606f\u8207\u4f86\u96fb\u73fe\u5728\u53ef\u4ee5\u6301\u7e8c\u5982\u5e38\u901a\u77e5\u4f7f\u7528\u8005\u3002\u9019\u4e5f\u8868\u793a\u5354\u52a9\u5de5\u5177\u670d\u52d9\u5728\u91cd\u65b0\u555f\u52d5\u4e4b\u5f8c\u53ef\u7acb\u5373\u4f7f\u7528\u3002<\/span><\/p>\n<p>\u70ba\u4e86\u9054\u5230\u4e0a\u8ff0\u7684\u76ee\u7684\uff0cAndroid N \u6703\u5728\u4e00\u500b\u5b89\u5168\u7684 <i>\u76f4\u63a5\u958b\u6a5f<\/i> \u6a21\u5f0f\u4e0b\u57f7\u884c\uff0c\u9019\u662f\u88dd\u7f6e<span style=\"color: #ff0000;\">\u5df2\u7d93\u958b\u555f\u96fb\u6e90\u4f46\u4f7f\u7528\u8005\u5c1a\u672a\u89e3\u9396\u88dd\u7f6e<\/span>\u7684\u671f\u9593\u3002 \u70ba\u4e86\u652f\u63f4\u9019\u7a2e\u65b9\u5f0f\uff0c\u7cfb\u7d71\u70ba\u8cc7\u6599\u63d0\u4f9b\u5169\u500b\u5132\u5b58\u4f4d\u7f6e\uff1a<\/p>\n<ul>\n<li><i>\u8a8d\u8b49\u52a0\u5bc6\u7684\u5132\u5b58\u7a7a\u9593<\/i>\uff1a\u9019\u662f\u9810\u8a2d\u7684\u5132\u5b58\u4f4d\u7f6e\uff0c\u53ea\u6709\u5728\u4f7f\u7528\u8005\u89e3\u9396\u88dd\u7f6e\u4e4b\u5f8c\u624d\u80fd\u4f7f\u7528\u3002<\/li>\n<li><i>\u88dd\u7f6e\u52a0\u5bc6\u7684\u5132\u5b58\u7a7a\u9593<\/i>\uff1a\u9019\u662f\u300c\u76f4\u63a5\u958b\u6a5f\u300d\u6a21\u5f0f\u671f\u9593\u8207\u4f7f\u7528\u8005\u89e3\u9396\u88dd\u7f6e\u4e4b\u5f8c\u90fd\u53ef\u4ee5\u4f7f\u7528\u7684\u5132\u5b58\u4f4d\u7f6e\u3002<\/li>\n<\/ul>\n<p>\u9019\u500b\u90e8\u5206\u6211\u8a8d\u70ba\u61c9\u8a72\u548c <a href=\"http:\/\/file-based encryption (FBE)\">file-based encryption (FBE)<\/a>\u00a0\u4e00\u8d77\u770b\uff0c\u5728 Android N \u4e4b\u524d\u5168\u90e8\u90fd\u662f full-disk encryption \uff0c\u800c\u9019\u4e00\u7248\u6539\u6210 FBE \uff0c\u9019\u76f4\u63a5\u53d7\u76ca\u90e8\u5206\u5c31\u662f\u76f4\u63a5\u958b\u6a5f\u3002<\/p>\n<p>\u300eFile-based encryption enables a new feature introduced in Android 7.0 called <a href=\"https:\/\/developer.android.com\/preview\/features\/direct-boot.html\">Direct Boot<\/a>. Direct Boot allows encrypted devices to boot straight to the lock screen. Previously, on encrypted devices using <a href=\"https:\/\/source.android.com\/security\/encryption\/full-disk.html\">full disk encryption<\/a> (FDE), users needed to provided credentials before any data could be accessed, preventing the phone from performing all but the most basic of operations\u3002\u300f<\/p>\n<p>\u7531\u65bc\u53ef\u4ee5\u5728\u5169\u7a2e\u7a7a\u9593\u4e0a\u9032\u884c\u5207\u63db\uff0c\u90a3\u5c0d\u65bc\u958b\u767c\u8005\u4f86\u8aaa\u9700\u8981\u6ce8\u610f\u7684\u662f \u5207\u63db\u9ede\u4ee5\u53ca\u5169\u908a\u8cc7\u6599\u6574\u5408\u3002\u5148\u8a3b\u518a broadcastReceiver<\/p>\n<pre>android.intent.action.ACTION_LOCKED_BOOT_COMPLETED\r\n<\/pre>\n<p><span class=\"s2\">Getting Notified of User Unlock<\/span><\/p>\n<ul>\n<ul>\n<li class=\"li2\"><span class=\"s2\">If your app has foreground processes that need immediate notification, listen for the\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html#ACTION_USER_UNLOCKED\"><span class=\"s4\">ACTION_USER_UNLOCKED<\/span><\/a>\u00a0message.<\/span><\/li>\n<li class=\"li2\"><span class=\"s2\">If your app only uses background processes that can act on a delayed notification, listen for the\u00a0<a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html#ACTION_BOOT_COMPLETED\"><span class=\"s4\">ACTION_BOOT_COMPLETED<\/span><\/a>\u00a0message.<\/span><\/li>\n<\/ul>\n<\/ul>\n<p><span class=\"s2\">Migrating Existing Data<\/span><\/p>\n<p class=\"p5\"><span class=\"s2\">Use\u00a0Context.moveSharedPreferencesFrom()\u00a0and\u00a0Context.moveDatabaseFrom()\u00a0to migrate preference and database data between credential encrypted storage and device encrypted storage.<\/span><\/p>\n<pre>Context directBootContext = appContext.createDeviceProtectedStorageContext();\r\n\/\/ Access appDataFilename that lives in device encrypted storage\r\nFileInputStream inStream = directBootContext.openFileInput(appDataFilename);\r\n\/\/ Use inStream to read content...\r\n<\/pre>\n<p>\u7e3d\u7d50\uff1a\u6211\u600e\u9ebc\u89ba\u5f97 mtk \u6709\u500b\u95dc\u6a5f\u9b27\u9418\uff0c\u90a3\u5230\u5e95\u600e\u9ebc\u5f04\u7684\u3002\u9019\u6b21 Android N \u5728\u7cfb\u7d71\u5c64\u9762\u7684\u5b89\u5168\u6027\u771f\u7684\u5f37\u5316\u4e0d\u5c11\u3002<\/p>\n<h4><a href=\"https:\/\/www.android.com\/work\/\">Android for Work Updates<\/a><\/h4>\n<p>\u4f86\u6bb5\u5ee3\u544a\u8a5e\u300eAndroid for Work \u662f\u5354\u52a9\u4f01\u696d\u4f7f\u7528 Android \u7684\u65b9\u6848\uff0c\u5305\u62ec Android \u7684\u7522\u54c1\u529f\u80fd\u3001Google Play for Work \u53ca\u5176\u4ed6\u751f\u7522\u529b\u5de5\u5177\u3002Android for Work \u4e3b\u8981\u900f\u904e API \u767c\u4f48\uff0c\u53ef\u8b93\u4f01\u696d\u884c\u52d5\u7ba1\u7406\u670d\u52d9 (EMM) \u4f9b\u61c9\u5546\u548c\u4f01\u696d\u61c9\u7528\u7a0b\u5f0f\u958b\u767c\u5546\u70ba\u5ba2\u6236\u54e1\u5de5\u63d0\u4f9b\u5b89\u5168\u3001\u6709\u6548\u7387\u800c\u591a\u5143\u5316\u7684\u884c\u52d5\u74b0\u5883\u3002<\/p>\n<ul>\n<li><strong><span style=\"font-size: 16px; line-height: 1.6;\">Work profile security challenge<\/span><\/strong><\/li>\n<li>\u8a2d\u5b9a\u6a94\u64c1\u6709\u8005\u53ef\u4ee5\u70ba\u4ee5\u5de5\u4f5c\u8a2d\u5b9a\u6a94\u57f7\u884c\u4e4b<span style=\"color: #ff0000;\">\u61c9\u7528\u7a0b\u5f0f\u6307\u5b9a\u500b\u5225\u7684\u5b89\u5168\u6027\u67e5\u554f<\/span>\u3002\u7576\u4f7f\u7528\u8005\u5617\u8a66\u958b\u555f\u4efb\u4f55\u5de5\u4f5c\u61c9\u7528\u7a0b\u5f0f\u6642\u6703\u986f\u793a\u5de5\u4f5c\u67e5\u554f\u3002\u6210\u529f\u5b8c\u6210\u5b89\u5168\u6027\u67e5\u554f\u53ef\u5c07\u5de5\u4f5c\u8a2d\u5b9a\u6a94\u89e3\u9396\u4e26\u5728\u5fc5\u8981\u6642\u5c07\u5b83\u89e3\u5bc6\u3002<\/li>\n<li><strong><span class=\"s2\">Toggle Work Mode<\/span><\/strong><\/li>\n<li>\u5728\u5177\u6709\u5de5\u4f5c\u8a2d\u5b9a\u6a94\u7684\u88dd\u7f6e\u4e0a\uff0c<span style=\"color: #ff0000;\">\u4f7f\u7528\u8005\u53ef\u4ee5\u5207\u63db\u5de5\u4f5c\u6a21\u5f0f\u3002\u7576\u5de5\u4f5c\u6a21\u5f0f\u95dc\u9589\u6642\uff0c\u53d7\u7ba1\u7406\u7684\u4f7f\u7528\u8005\u6703\u66ab\u6642\u95dc\u6a5f\uff0c\u56e0\u6b64\u800c\u505c\u7528\u5de5\u4f5c\u8a2d\u5b9a\u6a94\u61c9\u7528\u7a0b\u5f0f\u3001\u80cc\u666f\u540c\u6b65\u8207\u901a\u77e5<\/span>\u3002\u9019\u4e5f\u5305\u62ec\u8a2d\u5b9a\u6a94\u64c1\u6709\u8005\u61c9\u7528\u7a0b\u5f0f\u3002\u7576\u5de5\u4f5c\u6a21\u5f0f\u95dc\u9589\u6642\uff0c\u7cfb\u7d71\u6703\u986f\u793a\u6301\u7e8c\u7684\u72c0\u614b\u5716\u793a\uff0c\u63d0\u9192\u4f7f\u7528\u8005\u4ed6\u5011\u7121\u6cd5\u555f\u52d5\u5de5\u4f5c\u61c9\u7528\u7a0b\u5f0f\u3002\u555f\u52d5\u5668\u6703\u6307\u51fa\u5de5\u4f5c\u61c9\u7528\u7a0b\u5f0f\u548c\u5c0f\u5de5\u5177\u7121\u6cd5\u5b58\u53d6\u3002<\/li>\n<li><strong><span class=\"s2\">Always-On VPN<\/span><\/strong><\/li>\n<li class=\"li3\">\u88dd\u7f6e\u64c1\u6709\u8005\u548c\u8a2d\u5b9a\u6a94\u64c1\u6709\u8005\u53ef<span style=\"color: #ff0000;\">\u78ba\u4fdd\u5de5\u4f5c\u61c9\u7528\u7a0b\u5f0f\u4e00\u5f8b\u900f\u904e\u6307\u5b9a\u7684 VPN \u9023\u7dda<\/span>\u3002\u7cfb\u7d71\u6703\u81ea\u52d5\u5728\u88dd\u7f6e\u958b\u6a5f\u6642\u555f\u52d5\u8a72 VPN\u3002\u65b0\u7684 <code>DevicePolicyManager<\/code> \u65b9\u6cd5\u662f <code>setAlwaysOnVpnPackage()<\/code> \u8207 <code>getAlwaysOnVpnPackage()<\/code>\u3002\u56e0\u70ba\u7cfb\u7d71\u7121\u9700\u900f\u904e\u61c9\u7528\u7a0b\u5f0f\u4e92\u52d5\u5373\u53ef\u76f4\u63a5\u9023\u7d50 VPN \u670d\u52d9\uff0c\u6240\u4ee5 VPN \u7528\u6236\u7aef\u9700\u8981\u70ba\u300c\u4e00\u5f8b\u958b\u555f\u7684 VPN\u300d\u8655\u7406\u65b0\u7684\u9032\u5165\u9ede\u3002\u6b63\u5982\u4ee5\u5f80\uff0c\u900f\u904e\u7b26\u5408\u52d5\u4f5c<code>android.net.VpnService<\/code> \u7684\u610f\u5716\u7be9\u9078\u5668\u5411\u7cfb\u7d71\u6307\u660e\u670d\u52d9\u3002\u4f7f\u7528\u8005\u4e5f\u53ef\u4ee5\u4f7f\u7528 [\u8a2d\u5b9a] &gt; [\u66f4\u591a] &gt; [VPN] \u624b\u52d5\u8a2d\u5b9a\u300c\u4e00\u5f8b\u958b\u555f\u7684 VPN\u300d\u7528\u6236\u7aef\uff0c\u9019\u4e9b\u7528\u6236\u7aef\u5728\u4e3b\u8981\u4f7f\u7528\u8005\u4e2d\u5be6\u4f5c <code>VPNService<\/code> \u65b9\u6cd5\u3002<\/li>\n<li><strong style=\"font-size: 16px; line-height: 1.6;\">Customized provisioning<\/strong><\/li>\n<li>An application can customize the profile owner and device owner provisioning flows with corporate colors and logos.\u00a0<code>DevicePolicyManager.EXTRA_PROVISIONING_MAIN_COLOR<\/code> customizes flow color. <code>DevicePolicyManager.EXTRA_PROVISIONING_LOGO_URI<\/code>customizes the flow with a corporate logo.<\/li>\n<li>\u4f7f\u7528\u8005\u53ef\u4ee5\u81ea\u5df1\u5b9a\u7fa9\u9a57\u8b49\u6d41\u7a0b\u7684\u4e3b\u8981\u984f\u8272\uff0c\u6216\u662f\u653e\u7f6e\u516c\u53f8 logo \u3002\u3002<\/li>\n<\/ul>\n<p>\u7e3d\u7d50\uff1a\u9019\u500b\u6211\u771f\u7684\u9023\u73a9\u90fd\u6c92\u73a9\u904e\uff0c\u66f4\u5225\u8aaa\u958b\u767c\u3002\u611f\u89ba always-on vpn \u9084\u883b\u5be6\u7528\u7684\u3002google \u771f\u7684\u8d8a\u4f86\u8d8a\u91cd\u8996 BYOD\uff0c\u9664\u4e86\u5340\u5206\u5de5\u4f5c\u8207\u500b\u4eba\uff0c\u5b89\u5168\u6027\u66f4\u662f\u4e00\u5927\u91cd\u9ede\u3002\u6211\u5728\u770b api \u6642\u767c\u73fe\u53ef\u4ee5\u76f4\u63a5\u8b80\u53d6\u516c\u53f8\u7684 calendar, email user contact\u3002\u611f\u89ba\u5f88\u597d\u7528\u554a\u3002<\/p>\n<h4><a href=\"https:\/\/developer.android.com\/guide\/platform\/j8-jack.html?hl=en\">Java 8 Language features JAVA 8 \u652f\u63f4<\/a><\/h4>\n<p class=\"p1\"><span class=\"s1\">Android does not currently support all Java 8 language features. However, the following features are now available when developing apps targeting the Android N Preview:<\/span><\/p>\n<p class=\"p1\">\u9808\u4f7f\u7528 Android Studio 2.1 (\u9810\u89bd\u7248) \u8207 Android N Preview SDK\uff0c\u5176\u4e2d\u5305\u62ec\u5fc5\u8981\u7684 Jack tool chain \u8207\u9069\u7528\u65bc Gradle \u7684\u5df2\u66f4\u65b0 Android \u5916\u639b\u7a0b\u5f0f\u3002<\/p>\n<ul>\n<ul>\n<li class=\"li3\"><span class=\"s2\"><a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/IandI\/defaultmethods.html\"><span class=\"s3\">Default and static interface methods<\/span><\/a><\/span><\/li>\n<li class=\"li4\"><span class=\"s4\"><a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/javaOO\/lambdaexpressions.html\"><span class=\"s5\">Lambda expressions<\/span><\/a><\/span><span class=\"s1\">\u00a0(also available on API level 23 and lower)<\/span><\/li>\n<li class=\"li3\"><span class=\"s6\"><a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/annotations\/repeating.html\"><span class=\"s3\">Repeatable annotations<\/span><\/a><\/span><\/li>\n<li class=\"li4\"><span class=\"s4\"><a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/javaOO\/methodreferences.html\"><span class=\"s5\">Method References<\/span><\/a><\/span><span class=\"s1\">\u00a0(also available on API level 23 and lower)<\/span><\/li>\n<li class=\"li5\"><span class=\"s4\"><a href=\"https:\/\/docs.oracle.com\/javase\/tutorial\/java\/annotations\/type_annotations.html\"><span class=\"s5\">Type Annotations<\/span><\/a><\/span><span class=\"s1\">\u00a0(also available on API level 23 and lower)<\/span><\/li>\n<\/ul>\n<\/ul>\n<p>\u7e3d\u7d50\uff1a\u5343\u547c\u842c\u559a\u59cb\u51fa\u4f86\uff0c\u7b2c\u4e8c\u9805\u7684\u00a0Lambda \u9019\u6771\u897f\u5f9e\u597d\u4e45\u4e4b\u524d\u5c31\u4e0d\u5c11\u4eba\u5f88\u60f3\u62c9\u9032 Android\uff0c\u9084\u5f04\u500b\u00a0Retrolambda \u4f86\u5690\u9bae\uff0c\u4e0d\u904e\u6211\u500b\u4eba\u7528\u7684\u4e0d\u592a\u7fd2\u6163\u554a\u3002\u6b64\u5916\uff0c\u90fd\u5df2\u7d93\u63d0\u5230 Java 8 \uff0c\u90a3\u600e\u9ebc\u53ef\u4ee5\u4e0d\u63d0 <a href=\"https:\/\/source.android.com\/source\/jack.html\">Jack (Java Android Compiler Kit ) <\/a>and Jill (Jack Intermediate Library Linker)\uff0c\u4f46\u76ee\u524d\u770b\u8d77\u4f86\u6548\u80fd\u5dee\u7570\u4e0d\u5927\uff0c\u6700\u76f4\u63a5\u53d7\u76ca\u5c31\u662f<span style=\"color: #ff0000;\">\u6c92\u6709 \u300e65k method limit\u300f<\/span> \u554f\u984c\u3002<\/p>\n<ul>\n<li>Legacy javac toolchain:<br \/>\n<b>javac<\/b> (<code>.java<\/code> \u2192 <code>.class<\/code>) \u2192 <b>dx<\/b> (<code>.class<\/code> \u2192 <code>.dex<\/code>)<\/li>\n<li>New Jack toolchain:<br \/>\n<b>Jack<\/b> (<code>.java<\/code> \u2192 <code>.jack<\/code> \u2192 <code>.dex<\/code>)<\/li>\n<\/ul>\n<p>\u7136\u5f8c\u9019\u88e1\u6709\u500b\u5927\u795e\u5beb\u5f97\u975e\u5e38\u597d\uff0c<a href=\"http:\/\/taobaofed.org\/blog\/2016\/05\/05\/new-compiler-for-android\/\">Android \u65b0\u4e00\u4ee3\u7f16\u8bd1 toolchain Jack &amp; Jill \u7b80\u4ecb<\/a><\/p>\n<h4><\/h4>\n<h4>Profile-guided JIT\/AOT Compilation\u00a0\u8a2d\u5b9a\u6a94\u6307\u5f15 JIT\/AOT \u7de8\u8b6f<\/h4>\n<p>\u5728 Android N \u4e2d\uff0c\u6211\u5011\u65b0\u589e\u4e86 Just in Time (JIT) \u7de8\u8b6f\u5668\u642d\u914d\u7a0b\u5f0f\u78bc\u5206\u6790\u5de5\u5177\u5230 ART\uff0c\u8b93 Android \u61c9\u7528\u7a0b\u5f0f\u5728\u57f7\u884c\u6642\u80fd\u5920\u6301\u7e8c\u6539\u5584\u5176\u6548\u80fd\u3002JIT \u7de8\u8b6f\u5668\u88dc\u5145\u4e86 ART \u76ee\u524d\u7684 Ahead of Time (AOT) \u7de8\u8b6f\u5668\uff0c\u5354\u52a9\u6539\u5584\u57f7\u884c\u968e\u6bb5\u6548\u80fd\u3001\u7bc0\u7701\u5132\u5b58\u7a7a\u9593\u4ee5\u53ca\u52a0\u901f\u61c9\u7528\u7a0b\u5f0f\u66f4\u65b0\u548c\u7cfb\u7d71\u66f4\u65b0\u3002<\/p>\n<p>\u8a2d\u5b9a\u6a94\u6307\u5f15\u7de8\u8b6f\u8b93 ART \u6839\u64da\u6bcf\u500b\u61c9\u7528\u7a0b\u5f0f\u7684\u5be6\u969b\u7528\u60c5\u5f62\u8207\u88dd\u7f6e\u4e0a\u7684\u60c5\u6cc1\u4f86\u7ba1\u7406\u5176 AOT\/JIT \u7de8\u8b6f\u3002\u4f8b\u5982\uff0c<span style=\"color: #ff0000;\">ART \u6703\u7dad\u8b77\u6bcf\u500b\u61c9\u7528\u7a0b\u5f0f\u5e38\u7528\u65b9\u6cd5\u7684\u8a2d\u5b9a\u6a94\uff0c\u800c\u4e14\u53ef\u4ee5\u9810\u5148\u7de8\u8b6f\u548c\u5feb\u53d6\u90a3\u4e9b\u65b9\u6cd5\u4ee5\u7372\u5f97\u6700\u4f73\u6548\u80fd\u3002\u5b83\u4e0d\u6703\u7de8\u8b6f\u61c9\u7528\u7a0b\u5f0f\u7684\u5176\u4ed6\u90e8\u5206\uff0c\u76f4\u5230\u5be6\u969b\u8981\u4f7f\u7528\u9019\u4e9b\u90e8\u5206\u6642\u624d\u6703\u7de8\u8b6f\u3002<\/span><\/p>\n<p>\u9664\u4e86\u6539\u5584\u61c9\u7528\u7a0b\u5f0f\u95dc\u9375\u90e8\u5206\u7684\u6548\u80fd\u4ee5\u5916\uff0c\u8a2d\u5b9a\u6a94\u6307\u5f15\u7de8\u8b6f\u9084\u6709\u52a9\u65bc\u964d\u4f4e\u61c9\u7528\u7a0b\u5f0f\u7684\u6574\u9ad4 RAM \u4f7f\u7528\u91cf\uff0c\u5305\u62ec\u95dc\u806f\u7684\u4e8c\u9032\u4f4d\u6a94\u6848\u3002\u6b64\u529f\u80fd<span style=\"color: #ff0000;\">\u5c0d\u65bc\u4f4e\u8a18\u61b6\u9ad4\u88dd\u7f6e\u7279\u5225\u91cd\u8981\u3002<\/span><\/p>\n<p>ART \u900f\u904e\u5c0d\u88dd\u7f6e\u96fb\u6c60\u7522\u751f\u6700\u5c0f\u5f71\u97ff\u7684\u65b9\u5f0f\u4f86\u7ba1\u7406\u8a2d\u5b9a\u6a94\u6307\u5f15\u7de8\u8b6f\u3002\u5b83<span style=\"color: #ff0000;\">\u53ea\u6703\u5728\u88dd\u7f6e\u9592\u7f6e\u548c\u5145\u96fb\u6642\u9810\u5148\u7de8\u8b6f<\/span>\uff0c\u9019\u7a2e\u9810\u5148\u5de5\u4f5c\u7684\u65b9\u5f0f\u53ef\u4ee5\u7bc0\u7701\u6642\u9593\u548c\u96fb\u6c60\u96fb\u529b\u3002<\/p>\n<p>\u7e3d\u7d50\uff1aAndroid M \u7684\u6642\u5019\uff0c\u53ea\u6709\u5728 apk \u5b89\u88dd\u6642\u624d\u6703\u7de8\u8b6f\u3002\u9019\u500b\u8aaa\u4f86\u615a\u6127\uff0c\u655d\u53f8\u66fe\u7d93\u51fa\u904e\u4e00\u96bb\u8d85\u4f4e\u968e\u624b\u6a5f\uff08512mb \u9084\u662f 256 mb\uff09\uff0c\u7cfb\u7d71\u66f4\u65b0\u6162\u5230\u4ee5\u70ba\u7576\u6a5f\uff0c\u4f46\u662f\u7b49\u500b\uff12\uff10\u5206\u9418\uff0c\u9084\u662f\u6210\u529f\u4e86\uff0c\u4f46\u662f\u597d\u6232\u9084\u5728\u5f8c\u982d\uff0c\u5c45\u7136\u4e0d\u80fd\u5b89\u88dd facebook app , \u9019\u9084\u80fd\u8ce3\u55ce\uff1f\u5c31\u662f\u56e0\u70ba\u5b89\u88dd\u6642\u7de8\u8b6f\u6d88\u8017\u5927\u91cf RAM \uff0c\u4f46\u662f\u624b\u6a5f\u592a\u721b\u4e86\uff0c\u5c31\u7576\u6a5f\u4e86\uff0c\u5c31\u7576\u6a5f\u4e86\uff0c\u5c31\u7576\u6a5f\u4e86\u3002\u6211\u60f3\u53ef\u80fd\u5c31\u662f\u4e0a\u9762\u9019\u4e9b\u554f\u984c\uff0c\u6240\u4ee5\u9084\u662f\u9000\u56de\u90e8\u5206\u5148\u7de8\u8b6f\u9019\u6a23\u6298\u8877\u7684\u65b9\u5f0f\u3002<\/p>\n<p>&nbsp;<\/p>\n<p>\u7b2c\u4e00\u7bc7\u5c31\u5230\u6b64\u70ba\u6b62\uff0c\u5269\u4e0b\u7684\u6703\u5728\u7b2c\u4e8c\u7bc7\u88dc\u5b8c(\u5e0c\u671b)\uff0c\u5982\u679c\u6709\u4efb\u4f55\u554f\u984c\u6216\u662f\u6211\u5beb\u932f\u7684\u90e8\u5206\uff0c\u6b61\u8fce\u5e95\u4e0b\u56de\u61c9\u3002\u6709\u8208\u8da3\u4e14\u6709\u6a5f\u5b50\u7684\u4eba\u53ef\u4ee5\u5229\u7528 <a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0-samples.html\">Google Sample<\/a>\u9032\u884c\u6e2c\u8a66\u3002<\/p>\n<p>reference:<br \/>\n<a href=\"https:\/\/developer.android.com\/about\/versions\/nougat\/android-7.0.html\" target=\"_blank\">\u5b98\u65b9<\/a><br \/>\n<a href=\"https:\/\/www.youtube.com\/channel\/UCVHFbqXqoYvEWM1Ddxl0QDg\" target=\"_blank\">\u5b98\u65b9\u5f71\u7247<\/a><br \/>\nFB \u4e0a\u7684 <a id=\"js_9\" class=\"profileLink\" href=\"https:\/\/www.facebook.com\/scottt.tw\" data-hovercard=\"\/ajax\/hovercard\/user.php?id=100001862062430&amp;extragetparams=%7B%22directed_target_id%22%3A962678097145029%7D\">Scott Tsai<\/a>\u00a0\u7684<a href=\"https:\/\/www.facebook.com\/groups\/system.software2016\/permalink\/1097245500354954\/\">\u611f\u60f3<\/a><br \/>\n<a href=\"http:\/\/www.oschina.net\/translate\/android-security-implementation-of-self-signed-ssl\" target=\"_blank\">\u4e3a\u4f60\u7684\u5b89\u5353\u5e94\u7528\u5b9e\u73b0\u81ea\u7b7e\u540d\u7684 SSL \u8bc1\u4e66<\/a><br \/>\n<a href=\"https:\/\/gank.io\/post\/56e0b83c67765963436fcb94\" target=\"_blank\">\u4ece\u5f00\u53d1\u8005\u89d2\u5ea6\u89e3\u6790 Android N \u65b0\u7279\u6027\uff01<\/a><br \/>\nAndroid M\u65b0\u7279\u6027Doze and App Standby\u6a21\u5f0f\u8be6\u89e3 &#8211; \u4e0d\u80fd\u8f49\u8f09<br \/>\n<a href=\"https:\/\/my.oschina.net\/lorcan\/blog\/539208\" target=\"_blank\">Android 6.0\u7535\u6e90\u7ba1\u7406\u65b9\u5f0f<\/a><br \/>\n<a href=\"https:\/\/read01.com\/RM3RQ0.html\" target=\"_blank\">Android N\u7684\u4e94\u9805\u5168\u65b0\u529f\u80fd\uff08\u52a0\u4e0a\u5206\u5c4f\uff09<\/a><br \/>\n<a href=\"http:\/\/gold.xitu.io\/entry\/57a36a052e958a00668971df\" target=\"_blank\">Android Nougat(7.0) \u4e0b\u62c9\u901a\u77e5\u680f\u521b\u5efa\u81ea\u5b9a\u4e49\u5feb\u6377\u8bbe\u7f6e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u96d6\u7136 Android N Preview \u5f9e Google I\/O \u4e94\u6708\u5927\u6703\u5c31\u91cb\u653e\u51fa\u4f86\uff0c\u4f46\u662f\u4e00\u76f4\u627e\u4e0d\u5230\u6a5f\u5b50\u4f86\u73a9(\u55da\u547c\u6211\u7684 z3 \u4e0d\u652f\u63f4\u5347\u7d1a)\uff0c\u5c31\u4e00\u8def\u62d6\u963f\u6258\u963f\u6258\uff0c\u679c\u7136\u5230\u4e86 8\/22 \u6b63\u5f0f\u7248\u51fa\u4f86\u9084\u662f\u6c92\u6709\u6a5f&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[50,14],"tags":[60],"_links":{"self":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/180"}],"collection":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=180"}],"version-history":[{"count":1,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":219,"href":"https:\/\/boochlin.com\/index.php?rest_route=\/wp\/v2\/posts\/180\/revisions\/219"}],"wp:attachment":[{"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/boochlin.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}