{"id":2186,"date":"2022-11-25T18:01:14","date_gmt":"2022-11-25T10:01:14","guid":{"rendered":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/2186.html"},"modified":"2022-11-25T18:01:14","modified_gmt":"2022-11-25T10:01:14","slug":"vivo-x21%e5%b1%8f%e4%b8%8b%e6%8c%87%e7%ba%b9%e9%80%82%e9%85%8d%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/app.applebyme.cn\/cloud\/appshangjia\/2186.html","title":{"rendered":"vivo X21\u5c4f\u4e0b\u6307\u7eb9\u9002\u914d\u6307\u5357"},"content":{"rendered":"<p><strong>vivo X21\u5c4f\u4e0b\u6307\u7eb9\u9002\u914d\u6307\u5357\uff0c\u70b9\u51fb<\/strong><strong>\u6b64\u5904<\/strong><strong>\u53ef\u4e0b\u8f7d\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u6240\u9700\u7684\u5168\u90e8\u4ee3\u7801\u3002\u6587\u6863\u5177\u4f53\u5185\u5bb9\u5982\u4e0b\uff1a<\/strong><\/p>\n<h2>\u4e00\u3001<strong><span class=\"wpcom_tag_link\">FingerprintInsets<\/span><\/strong><\/h2>\n<p>public final class FingerprintInsets<\/p>\n<p>extends Object<\/p>\n<p>java.lang.Object&nbsp;&nbsp;&nbsp;&nbsp;<\/p>\n<p>\u21b3&nbsp; com.vivo.fingerprint.ud.FingerprintInsets<\/p>\n<p>\u8be5\u7c7b\u63cf\u8ff0\u5c4f\u5e55\u6307\u7eb9\u76f8\u5173\u4fe1\u606f\uff0c\u4f8b\u5982\u6307\u7eb9\u56fe\u6807\u4f4d\u7f6e\uff0c\u6307\u7eb9\u56fe\u6807\u663e\u793a\u72b6\u6001\u7b49\u3002\u8be5\u7c7b\u4f1a\u8fde\u63a5\u5c4f\u5e55\u6307\u7eb9\u670d\u52a1\u83b7\u53d6\u72b6\u6001\u4fe1\u606f\uff0c\u5e94\u7528\u53ea\u6709\u5728 <span class=\"wpcom_tag_link\">isReady<\/span>() \u8fd4\u56de true \u7684\u65f6\u5019\u624d\u80fd\u901a\u8fc7\u8be5\u7c7b\u7684\u5176\u5b83\u63a5\u53e3\u83b7\u53d6\u76f8\u5173\u4fe1\u606f\u3002\u4f7f\u7528\u672c\u63a5\u53e3\uff0c\u9700\u8981\u5e94\u7528\u58f0\u660ecom.vivo.fingerprint.permission.READ_STATE \u6743\u9650\uff0c\u8c03\u7528 create \u65b9\u6cd5\u540e\uff0c\u5e94\u7528\u4e0d\u518d\u4f7f\u7528\u8be5\u7cfb\u5217\u63a5\u53e3\u540e\u5e94\u8be5\u8c03\u7528 destroy \u65b9\u6cd5\u91ca\u653e\u76f8\u5173\u7684\u8d44\u6e90\uff0c\u907f\u514d\u9020\u6210\u53ef\u80fd\u53d1\u751f\u7684\u5185\u5b58\u6cc4\u9732\u3002<\/p>\n<p>\u8be5\u7c7b\u7684\u65b9\u6cd5\u90fd\u4e0d\u662f\u7ebf\u7a0b\u5b89\u5168\u7684\uff0c\u8fd9\u5c31\u610f\u5473\u7740\u6240\u6709\u65b9\u6cd5\u90fd\u5e94\u8be5\u5728\u540c\u4e00\u7ebf\u7a0b\u4e2d\u8c03\u7528\uff0ccreate \u65b9\u6cd5\u4f1a\u521b\u5efa\u4e00\u4e2a Handler\uff0c\u56e0\u6b64\u8be5\u7c7b\u7684\u6240\u6709\u65b9\u6cd5\u5e94\u8be5\u5728\u4e3b\u7ebf\u7a0b\u6216\u8005\u6709 Looper \u7684\u7ebf\u7a0b\u4e2d\u8c03\u7528\u3002<\/p>\n<p>\u4f7f\u7528\u8be5\u7c7b\u7684 minSdkVersion \u5e94\u8be5\u4e0d\u5c0f\u4e8e 11\uff08Android 3.0.x\uff09\u3002\u8be5\u7c7b\u80fd\u591f\u5728 vivo \u624b\u673a\u53ca\u5176\u5b83 sdk version \u4e0d\u5c0f\u4e8e 11 \u7684\u975e vivo \u8bbe\u5907\u4e0a\u4f7f\u7528\u3002\u672c\u7c7b\u4f9d\u8d56 android-support-v4\u3002<\/p>\n<h3>ICON_INVISIBLE<\/h3>\n<p>int ICON_INVISIBLE = 0<\/p>\n<p>\u56fe\u6807\u72b6\u6001\u6807\u8bb0\uff0c\u8868\u793a\u6307\u7eb9\u56fe\u6807\u4e0d\u53ef\u89c1\u3002<\/p>\n<p>\u503c\uff1a0<\/p>\n<h3>ICON_VISIBLE<\/h3>\n<p>int ICON_VISIBLE = 1<\/p>\n<p>\u56fe\u6807\u72b6\u6001\u6807\u8bb0\uff0c\u8868\u793a\u6307\u7eb9\u56fe\u6807\u53ef\u89c1\u3002<\/p>\n<h3>static void setDebugEnable(boolean enable)<\/h3>\n<p>\u6253\u5f00\u6216\u8005\u5173\u95ed\u5185\u90e8\u65e5\u5fd7<\/p>\n<p>enable: \u662f\u5426\u6253\u5f00\u65e5\u5fd7<\/p>\n<h3>static FingerprintInsets<\/h3>\n<h3>create(Context context,FingerprintInsetsListener listener)<\/h3>\n<p>\u8be5\u7c7b\u53ef\u4ee5\u521b\u5efa\u5bf9\u8c61\u5b9e\u4f8b\uff0c\u5982\u679c\u591a\u6b21\u8c03\u7528\u8be5\u65b9\u6cd5\u5e76\u4e14\u6ca1\u6709\u8c03\u7528 destroy\uff0c\u5219\u8fd4\u56de\u7684\u662f\u540c\u4e00\u4e2a\u5bf9\u8c61\uff0c\u5982\u679c\u521b\u5efa\u5931\u8d25\uff0c\u5219\u8fd4\u56de\u7a7a\uff0c\u8fd9\u79cd\u60c5\u51b5\u4e00\u822c\u662f\u5728\u975e vivo \u624b\u673a\u4e0a\u8c03\u7528\u8be5\u63a5\u53e3\uff0c\u5982\u679c\u521b\u5efa\u6210\u529f\uff0c\u8be5\u65b9\u6cd5\u4f1a\u4ea7\u751f\u4e00\u4e2a\u5bf9 context \u7684\u5f31\u5f15\u7528\u5bf9\u8c61\uff0clistener \u53ef\u4e3a null\u3002<\/p>\n<p>context\uff1a\u7ec4\u4ef6\u4e0a\u4e0b\u6587<\/p>\n<p>listener\uff1aInsets \u5185\u90e8\u4e8b\u4ef6\u76d1\u542c\u5668<\/p>\n<p>\u8fd4\u56de\u503c\uff1a\u521b\u5efa\u6210\u529f\u8fd4\u56de\u975e\u7a7a\u7f6e\uff0c\u5931\u8d25\u5219\u4e3a\u7a7a<\/p>\n<h3>boolean isReady()<\/h3>\n<p>\u6307\u7eb9\u76f8\u5173\u72b6\u6001\u662f\u5426\u521d\u59cb\u5316\u5b8c\u6bd5\uff0c\u53ea\u6709\u5728\u521d\u59cb\u5316\u5b8c\u6bd5\u540e\uff0c\u624d\u80fd\u8c03\u7528\u5176\u5b83\u63a5\u53e3\u83b7\u53d6\u6b63\u786e\u7684\u53c2\u6570\u3002<\/p>\n<h3>void destroy()<\/h3>\n<p>\u6e05\u7406\u5f53\u524d\u5b9e\u4f8b\u5bf9\u8c61\u3002<\/p>\n<h3>boolean hasUnderDisplayFingerprint()<\/h3>\n<p>\u5f53\u524d\u673a\u578b\u662f\u5426\u6709\u5c4f\u5e55\u6307\u7eb9\uff0c\u975e vivo \u673a\u578b\u4e0a\u59cb\u7ec8\u8fd4\u56de false<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u65b9\u6cd5\u53ea\u6709\u5728 isReady \u548c hasUnderDisplayFingerprint \u8fd4\u56de true \u65f6\u8fd4\u56de\u6709\u6548\u503c\u3002<\/p>\n<h3>void setFingerprintInsetsListener(FingerprintInsetsListener listener)<\/h3>\n<p>\u8bbe\u7f6e insets \u4e8b\u4ef6\u76d1\u542c\u5668\uff0c\u7528\u4e8e isReady \u548c \u56fe\u6807\u72b6\u6001\u53d8\u5316\u4e8b\u4ef6\uff08\u663e\u793a\uff0c\u9690\u85cf\uff09\u76d1\u542c\u3002<\/p>\n<p>listener\uff1aInsets \u5185\u90e8\u4e8b\u4ef6\u76d1\u542c\u5668<\/p>\n<h3>int getFingerprintIconState()<\/h3>\n<p>\u83b7\u53d6\u6307\u7eb9\u56fe\u6807\u72b6\u6001\uff0c\u8fd4\u56de ICON_INVISIBLE \u6216\u8005 ICON_INVISIBLE<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u65b9\u6cd5\u53ea\u6709\u5728 isReady \u548c hasUnderDisplayFingerprint \u8fd4\u56de true \u65f6\u8fd4\u56de\u6709\u6548\u503c\u3002<\/p>\n<h3>Rect getFingerprintIconPosition()<\/h3>\n<p>\u83b7\u53d6\u6307\u7eb9\u56fe\u6807\u4f4d\u7f6e\uff0c\u8fd4\u56de\u6307\u7eb9\u56fe\u6807 left, top, right, bottom\u56db\u4e2a\u7ef4\u5ea6\uff0c\u5750\u6807\u503c\u4e3a\u5c4f\u5e55\u7edd\u5bf9\u5750\u6807\u3002<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u65b9\u6cd5\u53ea\u6709\u5728 isReady \u548c hasUnderDisplayFingerprint \u8fd4\u56de true \u65f6\u8fd4\u56de\u6709\u6548\u503c\u3002<\/p>\n<h3>int getFingerprintIconLeft()<\/h3>\n<p>\u83b7\u53d6\u6307\u7eb9\u56fe\u6807 left \u503c<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u65b9\u6cd5\u53ea\u6709\u5728 isReady \u548c hasUnderDisplayFingerprint \u8fd4\u56de true \u65f6\u8fd4\u56de\u6709\u6548\u503c\u3002<\/p>\n<h3>int getFingerprintIconTop()<\/h3>\n<p>\u83b7\u53d6\u6307\u7eb9\u56fe\u6807 top \u503c<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u65b9\u6cd5\u53ea\u6709\u5728 isReady \u548c hasUnderDisplayFingerprint \u8fd4\u56de true \u65f6\u8fd4\u56de\u6709\u6548\u503c\u3002<\/p>\n<h3>int getFingerprintIconRight()<\/h3>\n<p>\u83b7\u53d6\u6307\u7eb9\u56fe\u6807 right \u503c<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u65b9\u6cd5\u53ea\u6709\u5728 isReady \u548c hasUnderDisplayFingerprint \u8fd4\u56de true \u65f6\u8fd4\u56de\u6709\u6548\u503c\u3002<\/p>\n<h3>int getFingerprintIconBottom()<\/h3>\n<p>\u83b7\u53d6\u6307\u7eb9\u56fe\u6807 bottom \u503c<\/p>\n<p>\u6ce8\u610f\uff1a\u8be5\u65b9\u6cd5\u53ea\u6709\u5728 isReady \u548c hasUnderDisplayFingerprint \u8fd4\u56de true \u65f6\u8fd4\u56de\u6709\u6548\u503c\u3002<\/p>\n<h2>\u4e8c\u3001FingerprintInsets.FingerprintInsetsListener<\/h2>\n<h3>public interface FingerprintInsets.FingerprintInsetsListener<\/h3>\n<h3>com.vivo.fingerprint.ud.FingerprintInsets.FingerprintInsetsListener<\/h3>\n<p>\u76d1\u542c FingerprintInsets \u4e8b\u4ef6\uff0c\u5305\u62ec Insets \u51c6\u5907\u5c31\u7eea\uff0c\u6307\u7eb9\u56fe\u6807\u663e\u793a\u6216\u8005\u9690\u85cf\u3002<\/p>\n<h3>void onReady()<\/h3>\n<p>Insets \u51c6\u5907\u5c31\u7eea<\/p>\n<h3>void onIconStateChanged(int state)<\/h3>\n<p>\u6307\u7eb9\u56fe\u6807\u72b6\u6001\u53d8\u5316<\/p>\n<p>state\uff1aFingerprintInsets.ICON_VISIBLE \u53ef\u89c1,FingerprintInsets.ICON_VI<a href=\"https:\/\/app.applebyme.cn\/shengcheng-57.html\">\u81ea\u52a8\u751f\u6210app<\/a>SIBLE \u4e0d\u53ef\u89c1\uff0c-1 \u72b6\u6001\u66f4\u65b0\u4e2d\u3002<\/p>\n<h3>&nbsp;\u4ee3\u7801\u793a\u4f8b&nbsp;\u2193&nbsp;<\/h3>\n<p>private FingerprintInsets mInsets;<\/p>\n<p>class InsetsListener implements<br \/>&nbsp; &nbsp;FingerprintInsets.FingerprintInsetsListener {<br \/>&nbsp; &nbsp;@Override<br \/>&nbsp; &nbsp;public void onReady() {<br \/>&nbsp; &nbsp; &nbsp; &nbsp;boolean hasUdFeature =<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mInsets.hasUnderDisplayFingerprint();<br \/>&nbsp; &nbsp; &nbsp; &nbsp;if (hasUdFeature) {<br \/>&amp;nbsp<a href=\"https:\/\/app.applebyme.cn\/shengcheng-43.html\">\u7f51\u7ad9\u8f6capp<\/a>; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;final Rect rect =<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mInsets.getFingerprintIconPosition();<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Log.d(TAG, &#8220;iconRect:&#8221; +<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rect.toShortString());<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ TODO: vivo device support<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ under display fingerprint.<br \/>&nbsp; &nbsp; &nbsp; &nbsp;} else {<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ TODO: vivo device don&#8217;t<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ support under display&nbsp;<br \/>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;\/\/ fingerprint.<br \/>&nbsp; &nbsp; &nbsp; &nbsp;}<br \/>&nbsp; &nbsp;}<\/p>\n<p>&nbsp; &nbsp;@Override<br \/>&nbsp; &nbsp;public void onIconStateChanged(int state) {<br \/>&nbsp; &nbsp; &nbsp; &nbsp;Log.d(TAG, &#8220;onIconStateChanged &#8221; + state);<br \/>&nbsp; &nbsp;}<br \/>}<\/p>\n<p>mInsets = FingerprintInsets.create(<br \/>&nbsp; &nbsp; &nbsp; &nbsp;this, new InsetsListener());<br \/>if (mInsets == null) {<br \/>&nbsp; &nbsp;\/\/ TODO: Not vivo device.<br \/>}<\/p>\n<p>\/\/ Later call destroy if needed.<br \/>if (mInsets != null) {<br \/>&nbsp; &nbsp;mInsets.setFingerprintInsetsListener(null);<br \/>&nbsp; &nbsp;mInsets.destroy();<br \/>&nbsp; &nbsp;mInsets = null;<br \/>}<\/p>\n<p>\u7f16\u8f91\uff1ayimen\uff0c\u5982\u82e5\u8f6c\u8f7d\uff0c\u8bf7\u6ce8\u660e\u51fa\u5904\uff1ahttps:\/\/www.yimenapp.com\/kb-yimen\/11622\/<\/p>\n<p>\u90e8\u5206\u5185\u5bb9\u6765\u81ea\u7f51\u7edc\u6295\u7a3f\uff0c\u5982\u6709\u4fb5\u6743\u8054\u7cfb\u7acb\u5220<\/p>\n","protected":false},"excerpt":{"rendered":"<p>vivo X21\u5c4f\u4e0b\u6307\u7eb9\u9002\u914d\u6307\u5357\uff0c\u70b9\u51fb\u6b64\u5904\u53ef\u4e0b\u8f7d\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u6240\u9700\u7684\u5168\u90e8\u4ee3\u7801\u3002\u6587\u6863\u5177\u4f53\u5185\u5bb9\u5982\u4e0b\uff1a\u4e00\u3001FingerprintInsetspublic final class FingerprintInsetsextends Objectjava.lang.Object    \u21b3  com.vivo.fin<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[14],"tags":[521,1125,864],"class_list":["post-2186","post","type-post","status-publish","format-standard","hentry","category-appshangjia","tag-vivo","tag-1125","tag-864"],"_links":{"self":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/2186","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/comments?post=2186"}],"version-history":[{"count":0,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/posts\/2186\/revisions"}],"wp:attachment":[{"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/media?parent=2186"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/categories?post=2186"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/app.applebyme.cn\/cloud\/wp-json\/wp\/v2\/tags?post=2186"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}