{"id":1598,"date":"2016-06-02T15:13:21","date_gmt":"2016-06-02T07:13:21","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=1598"},"modified":"2026-08-18T12:58:50","modified_gmt":"2026-08-18T04:58:50","slug":"%e5%9c%a8android-6-0-%e8%ae%be%e5%a4%87%e4%b8%8a%e5%8a%a8%e6%80%81%e8%8e%b7%e5%8f%96%e6%9d%83%e9%99%90","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=1598","title":{"rendered":"\u5728Android 6.0 \u8bbe\u5907\u4e0a\u52a8\u6001\u83b7\u53d6\u6743\u9650"},"content":{"rendered":"<section id=\"wenyan\" style=\"font-family: system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', Roboto, sans-serif; line-height: 1.75; font-size: 16px; color: #000000; caret-color: #000000;\" data-provider=\"WenYan\">\n<blockquote style=\"margin: 20px 0px; display: block; font-size: 0.9em; overflow: auto; border-left: 3px solid #ef7060; color: #6a737d; padding: 10px 10px 10px 20px; background: #fff9f9;\">\n<p style=\"margin: 1em 0px;\">Android 6.0\uff08API 23\uff09\u8d77\uff0c\u5371\u9669\u6743\u9650\u6539\u6210<strong>\u8fd0\u884c\u65f6\u6388\u6743<\/strong>\uff1a\u5b89\u88c5\u65f6\u4e0d\u518d\u4e00\u63fd\u5b50\u901a\u8fc7\uff0c\u771f\u6b63\u7528\u5230\u7535\u8bdd\u3001\u77ed\u4fe1\u3001\u76f8\u673a\u65f6\u624d\u5f39\u7a97\u3002\u672c\u7bc7\u7528\u62e8\u53f7\uff08<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">CALL_PHONE<\/code>\uff09\u8d70\u4e00\u904d\u68c0\u67e5\u3001\u7533\u8bf7\u548c\u56de\u8c03\u3002<\/p>\n<\/blockquote>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e00\u3001\u5148\u5199\u51fa\u62e8\u53f7<\/span><\/h2>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/201407311445259040063.jpg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-2826\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2020\/04\/201407311445259040063.jpg\" alt=\"20140731144525904006\" width=\"383\" height=\"268\"><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u62e8\u53f7\u672c\u8eab\u8fd8\u662f\u4e00\u4e2a Intent\u3002\u6ce8\u610f\u662f <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">ACTION_CALL<\/code>\uff08\u76f4\u63a5\u62e8\u51fa\uff09\uff0c\u4e0d\u662f\u6253\u5f00\u62e8\u53f7\u76d8\u7684 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">ACTION_DIAL<\/code>\uff1a<\/p>\n<section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><\/section>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">private void callDirectly(String mobile){\n        Intent intent = new Intent();\n        intent.setAction(\"android.intent.action.CALL\");\n        intent.setData(Uri.parse(\"tel:\" + mobile));\n        mContext.startActivity(intent);\n    }<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">Manifest \u91cc\u4ecd\u8981\u58f0\u660e\u6743\u9650\uff0c\u8fd0\u884c\u65f6\u7533\u8bf7\u5e76\u4e0d\u80fd\u4ee3\u66ff\u8fd9\u4e00\u884c\uff1a<\/p>\n<section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><\/section>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">&lt;uses-permission android:name=\"android.permission.CALL_PHONE\" \/&gt;<\/code><\/pre>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e8c\u3001\u4e3a\u4ec0\u4e48\u5728 6.0 \u4e0a\u4f1a\u5d29\u6e83<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">Android 6.0 \u4e4b\u524d\uff0c\u4e0a\u9762\u4ee3\u7801\u6ca1\u95ee\u9898\u3002\u82e5\u8bbe\u5907\u5df2\u662f 6.0\uff0c\u4e14 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">targetSdkVersion<\/code> \u8bbe\u4e3a 23\uff0c\u4e00\u70b9\u62e8\u53f7\u5c31\u4f1a\u5d29\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u628a <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">targetSdkVersion<\/code> \u964d\u5230 23 \u4ee5\u4e0b\uff0c\u7a0b\u5e8f\u4e0d\u4f1a\u5d29\uff0c\u4f46\u5728 6.0 \u8bbe\u5907\u4e0a\u4f9d\u65e7\u62e8\u4e0d\u4e86\u7535\u8bdd\u3002\u6743\u9650\u673a\u5236\u662f Android M \u624d\u52a0\u5165\u7684\uff1a\u4ece M \u5f00\u59cb\uff0c\u58f0\u660e\u8fc7\u7684\u6743\u9650\u8981\u5728\u8fd0\u884c\u65f6\u52a8\u6001\u6388\u4e88\u3002\u8981\u517c\u5bb9 6.0\uff0c\u5fc5\u987b\u5728\u4ee3\u7801\u91cc\u68c0\u67e5\u5e76\u7533\u8bf7\uff0c\u800c\u4e0d\u662f\u53ea\u6539 target\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u52a8\u6001\u5206\u914d\u7ec6\u8282\u53ef\u770b\u539f\u6587 <a href=\"http:\/\/gudong.name\/%E6%8A%80%E6%9C%AF\/2015\/11\/10\/android_m_permission.html#permission\">\u6743\u9650\u52a8\u6001\u5206\u914d<\/a>\uff1b\u53ea\u60f3\u770b\u505a\u6cd5\u53ef\u8df3\u5230 <a href=\"http:\/\/gudong.name\/%E6%8A%80%E6%9C%AF\/2015\/11\/10\/android_m_permission.html#answer\">\u89e3\u51b3\u65b9\u6848<\/a>\u3002<\/p>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e09\u3001\u5b89\u88c5\u65f6\u6388\u6743 vs \u8fd0\u884c\u65f6\u6388\u6743<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">6.0 \u4e4b\u524d\uff0c\u5b89\u88c5\u754c\u9762\u4f1a\u5217\u51fa\u5e94\u7528\u7d22\u8981\u7684\u5168\u90e8\u6743\u9650\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" title=\"permission\" src=\"http:\/\/gudong.name\/assets\/android_m_install.jpg\" alt=\"permission\"><\/p>\n<p style=\"margin: 1em 0px;\">\u4e0a\u56fe\u5206\u522b\u662f Nexus 6 \u548c\u5c0f\u7c73\u5728\u5b89\u88c5\u65f6\u7684\u754c\u9762\u3002\u70b9\u300c\u63a5\u53d7 \/ \u5b89\u88c5\u300d\u5c31\u7b49\u4e8e\u4e00\u6b21\u6388\u6743\u5168\u90e8\u58f0\u660e\u6743\u9650\u3002\u5f88\u5c11\u6709\u4eba\u4f1a\u56e0\u4e3a\u67d0\u4e00\u6761\u654f\u611f\u6743\u9650\u800c\u653e\u5f03\u5b89\u88c5\u2014\u2014\u90a3\u65f6\u7528\u6237\u8fd8\u6ca1\u771f\u6b63\u53bb\u8bfb\u901a\u8bdd\u8bb0\u5f55\u6216\u77ed\u4fe1\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u66f4\u5408\u7406\u7684\u65f6\u673a\u662f\uff1a\u5e94\u7528\u9a6c\u4e0a\u8981\u8bfb\u77ed\u4fe1\u65f6\uff0c\u7cfb\u7edf\u5f39\u51fa\u63d0\u793a\uff0c\u7528\u6237\u7ed3\u5408\u5f53\u524d\u573a\u666f\u51b3\u5b9a\u7ed9\u4e0d\u7ed9\u3002\u4e0d\u7ed9\u4f1a\u600e\u6837\u3001\u7ed9\u4e86\u4f1a\u600e\u6837\uff0c\u90fd\u7531\u7528\u6237\u4e3b\u52a8\u5224\u65ad\u3002\u8fd9\u6bd4\u5b89\u88c5\u65f6\u90a3\u4e00\u52fe\u66f4\u5c0a\u91cd\u9690\u79c1\u3002<\/p>\n<p style=\"margin: 1em 0px;\">MIUI \u5f88\u65e9\u5c31\u505a\u4e86\u8fd0\u884c\u65f6\u6388\u6743\uff0c\u6bd4\u5b98\u65b9 Android \u66f4\u65e9\u843d\u5730\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u76f4\u5230 Android 6.0\uff0cGoogle \u624d\u628a\u8fd9\u5957\u505a\u6210\u7cfb\u7edf\u80fd\u529b\uff1a\u5b89\u88c5\u65f6\u4ecd\u63d0\u793a\u4f1a\u7528\u5230\u54ea\u4e9b\u6743\u9650\uff1b\u771f\u6b63\u83b7\u53d6\u654f\u611f\u6743\u9650\u65f6\u518d\u5f39\u7a97\u3002\u4f8b\u5982\u8bfb\u77ed\u4fe1\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" title=\"permission\" src=\"http:\/\/gudong.name\/assets\/android_m_sms.jpeg\" alt=\"permission\"><\/p>\n<p style=\"margin: 1em 0px;\">\u5b98\u65b9\u8bf4\u660e\u5927\u610f\uff1a\u4ece Android 6.0\uff08API 23\uff09\u8d77\uff0c\u7528\u6237\u5728\u5e94\u7528\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u6388\u6743\uff0c\u800c\u4e0d\u662f\u5b89\u88c5\u65f6\u4e00\u6b21\u6027\u6388\u4e88\u3002\u5b89\u88c5\u66f4\u8f7b\uff0c\u7528\u6237\u4e5f\u80fd\u6309\u529f\u80fd\u62c6\u5f00\u6743\u9650\u2014\u2014\u6bd4\u5982\u53ea\u7ed9\u76f8\u673a\u3001\u4e0d\u7ed9\u5b9a\u4f4d\uff0c\u968f\u65f6\u53ef\u5728\u7cfb\u7edf\u8bbe\u7f6e\u91cc\u6536\u56de\u3002<\/p>\n<table style=\"border-collapse: collapse; margin: 1.4em auto; max-width: 100%; table-layout: fixed; text-align: left; overflow: auto; display: table; overflow-wrap: break-word; word-break: break-all;\" width=\"817\">\n<thead>\n<tr>\n<th style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top; font-weight: bold; background-color: #fff9f9; color: #ef7060;\">\u5bf9\u6bd4<\/th>\n<th style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top; font-weight: bold; background-color: #fff9f9; color: #ef7060;\">Android 6.0 \u4e4b\u524d<\/th>\n<th style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top; font-weight: bold; background-color: #fff9f9; color: #ef7060;\">Android 6.0\uff08target 23\uff09<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u6388\u6743\u65f6\u673a<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u5b89\u88c5\u65f6\u4e00\u6b21\u6027\u540c\u610f\u5168\u90e8<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u7528\u5230\u5371\u9669\u6743\u9650\u65f6\u518d\u5f39\u7a97<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u53ea\u58f0\u660e\u4e0d\u7533\u8bf7<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u4e00\u822c\u53ef\u76f4\u63a5\u8c03\u7528<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u53ef\u80fd\u5d29\u6e83\u6216\u529f\u80fd\u88ab\u62d2<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u7528\u6237\u53cd\u6094<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u5378\u8f7d\u6216\u6539\u7cfb\u7edf\u8bbe\u7f6e\uff08\u56e0 ROM \u800c\u5f02\uff09<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u8bbe\u7f6e\u91cc\u53ef\u968f\u65f6\u64a4\u9500<\/td>\n<\/tr>\n<tr>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u53d6\u5de7\u964d target<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u65e0\u6b64\u95ee\u9898<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u4e0d\u5d29\uff0c\u4f46\u62e8\u53f7\u7b49\u80fd\u529b\u4ecd\u53ef\u80fd\u4e0d\u53ef\u7528<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u56db\u3001\u68c0\u67e5\u3001\u7533\u8bf7\u3001\u56de\u8c03<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">\u5bf9\u7248\u672c\u505a\u5224\u65ad\uff0c6.0 \u8d70\u517c\u5bb9\u5206\u652f\uff1a<\/p>\n<section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><\/section>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">final public static int REQUEST_CODE_ASK_CALL_PHONE = 123;\n\n public void onCall(String mobile){\n        this.mMobile = mobile;\n        if (Build.VERSION.SDK_INT &gt;= 23) {\n            int checkCallPhonePermission = ContextCompat.checkSelfPermission(mContext,Manifest.permission.CALL_PHONE);\n            if(checkCallPhonePermission != PackageManager.PERMISSION_GRANTED){\n                ActivityCompat.requestPermissions(mContext,new String[]{Manifest.permission.CALL_PHONE},REQUEST_CODE_ASK_CALL_PHONE);\n                return;\n            }else{\n                \/\/\u4e0a\u9762\u5df2\u7ecf\u5199\u597d\u7684\u62e8\u53f7\u65b9\u6cd5\n                callDirectly(mobile);\n            }\n        } else {\n            \/\/\u4e0a\u9762\u5df2\u7ecf\u5199\u597d\u7684\u62e8\u53f7\u65b9\u6cd5\n            callDirectly(mobile);\n        }\n    }<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">6.0 \u7528\u6237\u89e6\u53d1\u62e8\u53f7\u65f6\uff0c\u4f1a\u770b\u5230 Material \u98ce\u683c\u7684\u7cfb\u7edf\u5bf9\u8bdd\u6846\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><img decoding=\"async\" title=\"permission\" src=\"http:\/\/gudong.name\/assets\/android_m_permission.jpeg\" alt=\"permission\"><\/p>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">requestPermissions<\/code> \u7684\u6700\u540e\u4e00\u4e2a\u53c2\u6570\u662f <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">requestCode<\/code>\uff0c\u7c7b\u4f3c <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">onActivityResult<\/code>\u3002\u7533\u8bf7\u4e4b\u540e\u8981\u5728\u5f53\u524d Activity \u5b9e\u73b0 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">onRequestPermissionsResult<\/code>\uff1a<\/p>\n<section style=\"display: block; background-repeat: no-repeat; width: 100%; height: 16px;\"><\/section>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 10px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 10px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; margin: 0.5em; padding: 3px 5px; overflow-x: auto; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">    @Override\n    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n        switch (requestCode) {\n            case REQUEST_CODE_ASK_CALL_PHONE:\n                if (grantResults[0] == PackageManager.PERMISSION_GRANTED) {\n                    \/\/ Permission Granted\n                    callDirectly(mobile);\n                } else {\n                    \/\/ Permission Denied\n                    Toast.makeText(MainActivity.this, \"CALL_PHONE Denied\", Toast.LENGTH_SHORT)\n                            .show();\n                }\n                break;\n            default:\n                super.onRequestPermissionsResult(requestCode, permissions, grantResults);\n        }\n    }<\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u7528 <code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; font-size: 0.9em; overflow-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0px 2px; color: #ef7060; background-color: rgba(27, 31, 35, 0.05); word-break: break-all;\">grantResults[0]<\/code> \u5224\u65ad\u7528\u6237\u70b9\u4e86\u5141\u8bb8\u8fd8\u662f\u62d2\u7edd\uff0c\u518d\u8d70\u62e8\u53f7\u6216\u63d0\u793a\u3002<\/p>\n<hr>\n<h2 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em; border-bottom: 2px solid #ef7060; display: flex;\"><span style=\"display: inline-block; font-weight: bold; background: #ef7060; color: #ffffff; padding: 3px 10px 1px; border-top-right-radius: 3px; border-top-left-radius: 3px; margin-right: 3px;\">\u4e94\u3001\u6709\u7528\u7684\u94fe\u63a5<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">\u4e0a\u9762\u53ea\u662f\u62e8\u53f7\u8fd9\u4e00\u6761\u6743\u9650\u7684\u6700\u5c0f\u793a\u4f8b\u3002\u66f4\u5b8c\u6574\u7684\u8fd0\u884c\u65f6\u6743\u9650\u8bf4\u660e\u89c1\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section><a href=\"http:\/\/inthecheesefactory.com\/blog\/things-you-need-to-know-about-android-m-permission-developer-edition\/en\">Everything every Android Developer must know about new Android\u2019s Runtime Permission<\/a>\uff08\u82f1\u6587\u957f\u6587\uff09<\/section>\n<\/li>\n<li>\n<section>\u5df2\u6709\u4e2d\u8bd1\uff1a<a href=\"http:\/\/jijiaxin89.com\/2015\/08\/30\/Android-s-Runtime-Permission\/\">\u7ffb\u8bd1\u94fe\u63a5<\/a><\/section>\n<\/li>\n<li>\n<section>\u5904\u7406 6.0 \u6743\u9650\u517c\u5bb9\u7684\u5f00\u6e90\u5e93\uff1a<a href=\"https:\/\/github.com\/k0shk0sh\/PermissionHelper\">PermissionHelper<\/a><\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">\u51fa\u81ea <a href=\"http:\/\/maoruibin.github.io\/\" target=\"_self\" rel=\"noopener\">\u5495\u549a<\/a> \u7684\u535a\u5ba2\uff1a<a href=\"http:\/\/maoruibin.github.io\/%E6%8A%80%E6%9C%AF\/2015\/11\/10\/android_m_permission.html\" target=\"_self\" rel=\"noopener\">\u5728Android 6.0 \u8bbe\u5907\u4e0a\u52a8\u6001\u83b7\u53d6\u6743\u9650<\/a><\/p>\n<blockquote style=\"margin: 20px 0px; display: block; font-size: 0.9em; overflow: auto; border-left: 3px solid #ef7060; color: #6a737d; padding: 10px 10px 10px 20px; background: #fff9f9;\">\n<p style=\"margin: 1em 0px;\"><strong>\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1atarget 23 \u4e4b\u540e\u5371\u9669\u6743\u9650\u8981 checkSelfPermission \u2192 requestPermissions \u2192 onRequestPermissionsResult\uff0c\u53ea\u964d target \u4e0d\u5d29\u4e5f\u62e8\u4e0d\u4e86\u7535\u8bdd\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Android 6.0\uff08API 23\uff09\u8d77\uff0c\u5371\u9669\u6743\u9650\u6539\u6210\u8fd0\u884c\u65f6\u6388\u6743\uff1a\u5b89\u88c5\u65f6\u4e0d\u518d\u4e00\u63fd\u5b50\u901a\u8fc7\uff0c\u771f\u6b63\u7528\u5230\u7535\u8bdd\u3001\u77ed\u4fe1\u3001\u76f8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1598"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1598"}],"version-history":[{"count":3,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1598\/revisions"}],"predecessor-version":[{"id":3702,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/1598\/revisions\/3702"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}