{"id":446,"date":"2015-04-19T19:50:08","date_gmt":"2015-04-19T11:50:08","guid":{"rendered":"https:\/\/ai.zhousir.top\/?p=446"},"modified":"2026-09-06T17:02:06","modified_gmt":"2026-09-06T09:02:06","slug":"android%e5%b9%b3%e5%8f%b0%e4%bb%8b%e7%bb%8d","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=446","title":{"rendered":"\u5e73\u53f0\u4ecb\u7ecd"},"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 \u662f\u4e00\u79cd\u57fa\u4e8e Linux \u7684\u81ea\u7531\u53ca\u5f00\u653e\u6e90\u4ee3\u7801\u64cd\u4f5c\u7cfb\u7edf\uff0c\u7531\u64cd\u4f5c\u7cfb\u7edf\u3001\u4e2d\u95f4\u4ef6\u3001\u7528\u6237\u754c\u9762\u548c\u5e94\u7528\u8f6f\u4ef6\u7ec4\u6210\u3002\u4e3b\u8981\u4f7f\u7528\u4e8e\u667a\u80fd\u624b\u673a\u548c\u5e73\u677f\u7535\u8111\u7b49\u79fb\u52a8\u8bbe\u5907\uff0c\u7531 Google \u548c\u5f00\u653e\u624b\u673a\u8054\u76df\u9886\u5bfc\u5f00\u53d1\u3002\u4e2d\u56fd\u5927\u9646\u8f83\u591a\u4eba\u4f7f\u7528\u300c\u5b89\u5353\u300d\u6216\u300c\u5b89\u81f4\u300d\u4f5c\u4e3a\u4e2d\u6587\u540d\u79f0\u3002<\/p>\n<\/blockquote>\n<p><!--more--><\/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;\">\u4e00\u3001\u7cfb\u7edf\u67b6\u6784<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">Android \u7684\u7cfb\u7edf\u67b6\u6784\u548c\u5176\u64cd\u4f5c\u7cfb\u7edf\u4e00\u6837\uff0c\u91c7\u7528\u5206\u5c42\u67b6\u6784\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/snipaste_2026-09-06_16-58-54.jpg\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3971\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/snipaste_2026-09-06_16-58-54.jpg\" alt=\"\" width=\"655\" height=\"470\" srcset=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/snipaste_2026-09-06_16-58-54.jpg 2035w, https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/snipaste_2026-09-06_16-58-54-768x552.jpg 768w\" sizes=\"(max-width: 655px) 100vw, 655px\" \/><\/a><\/p>\n<p>Google\u5b98\u65b9\u63d0\u4f9b\u7684\u7ecf\u5178\u5206\u5c42\u67b6\u6784\u56fe\uff1a<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/c80b14c7bca58a8c74cb6f4edfffc244.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone  wp-image-3973\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/c80b14c7bca58a8c74cb6f4edfffc244.png\" alt=\"\" width=\"672\" height=\"989\" srcset=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/c80b14c7bca58a8c74cb6f4edfffc244.png 1384w, https:\/\/ai.zhousir.top\/wp-content\/uploads\/2015\/04\/c80b14c7bca58a8c74cb6f4edfffc244-768x1131.png 768w\" sizes=\"(max-width: 672px) 100vw, 672px\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\">\u4ece\u67b6\u6784\u56fe\u770b\uff0cAndroid \u5206\u4e3a\u56db\u5c42\uff0c\u4ece\u9ad8\u5c42\u5230\u4f4e\u5c42\u5206\u522b\u662f\u5e94\u7528\u7a0b\u5e8f\u5c42\u3001\u5e94\u7528\u7a0b\u5e8f\u6846\u67b6\u5c42\u3001\u7cfb\u7edf\u8fd0\u884c\u5e93\u5c42\u548c Linux <a href=\"http:\/\/baike.baidu.com\/view\/1366.htm\">\u5185\u6838<\/a>\u5c42\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">\u5e94\u7528\u7a0b\u5e8f<\/h3>\n<p style=\"margin: 1em 0px;\"><a href=\"http:\/\/baike.baidu.com\/view\/330120.htm\"><strong>\u5e94\u7528\u7a0b\u5e8f<\/strong><\/a>\u5c42\u4f1a\u540c\u4e00\u7cfb\u5217\u6838\u5fc3\u5e94\u7528\u7a0b\u5e8f\u5305\u4e00\u8d77\u53d1\u5e03\uff0c\u5305\u62ec\u5ba2\u6237\u7aef\u3001SMS \u77ed\u6d88\u606f\u7a0b\u5e8f\u3001\u65e5\u5386\u3001\u5730\u56fe\u3001\u6d4f\u89c8\u5668\u3001\u8054\u7cfb\u4eba\u7ba1\u7406\u7b49\u3002\u6240\u6709\u5e94\u7528\u7a0b\u5e8f\u90fd\u4f7f\u7528 Java \u8bed\u8a00\u7f16\u5199\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">\u5e94\u7528\u7a0b\u5e8f\u6846\u67b6<\/h3>\n<p style=\"margin: 1em 0px;\">\u5f00\u53d1\u4eba\u5458\u4e5f\u53ef\u4ee5\u5b8c\u5168\u8bbf\u95ee\u6838\u5fc3\u5e94\u7528\u7a0b\u5e8f\u6240\u4f7f\u7528\u7684 <a href=\"http:\/\/baike.baidu.com\/view\/16068.htm\">API<\/a> \u6846\u67b6\u3002\u67b6\u6784\u8bbe\u8ba1\u7b80\u5316\u4e86\u7ec4\u4ef6\u91cd\u7528\uff1a\u4efb\u4f55\u4e00\u4e2a\u5e94\u7528\u7a0b\u5e8f\u90fd\u53ef\u4ee5\u53d1\u5e03\u529f\u80fd\u5757\uff0c\u5176\u5b83\u5e94\u7528\u53ef\u4ee5\u4f7f\u7528\uff08\u987b\u9075\u5faa\u6846\u67b6\u5b89\u5168\u6027\uff09\u3002\u8fd9\u5957\u91cd\u7528\u673a\u5236\u4e5f\u65b9\u4fbf\u7528\u6237\u66ff\u6362\u7a0b\u5e8f\u7ec4\u4ef6\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u9690\u85cf\u5728\u6bcf\u4e2a\u5e94\u7528\u540e\u9762\u7684\u662f\u4e00\u7cfb\u5217\u670d\u52a1\u548c\u7cfb\u7edf\uff0c\u5176\u4e2d\u5305\u62ec\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u4e30\u5bcc\u800c\u53c8\u53ef\u6269\u5c55\u7684 <a href=\"http:\/\/baike.baidu.com\/view\/71981.htm\">\u89c6\u56fe\uff08Views\uff09<\/a>\uff0c\u7528\u6765\u6784\u5efa\u5e94\u7528\u7a0b\u5e8f\uff0c\u5305\u62ec\u5217\u8868\u3001\u7f51\u683c\u3001\u6587\u672c\u6846\u3001\u6309\u94ae\uff0c\u751a\u81f3\u53ef\u5d4c\u5165\u7684 web \u6d4f\u89c8\u5668\u3002<\/section>\n<\/li>\n<li>\n<section>\u5185\u5bb9\u63d0\u4f9b\u5668\uff08Content Providers\uff09\u4f7f\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u8bbf\u95ee\u53e6\u4e00\u4e2a\u5e94\u7528\u7684\u6570\u636e\uff08\u5982\u8054\u7cfb\u4eba\u6570\u636e\u5e93\uff09\uff0c\u6216\u5171\u4eab\u81ea\u5df1\u7684\u6570\u636e\u3002<\/section>\n<\/li>\n<li>\n<section>\u8d44\u6e90\u7ba1\u7406\u5668\uff08Resource Manager\uff09\u63d0\u4f9b\u975e\u4ee3\u7801\u8d44\u6e90\u7684\u8bbf\u95ee\uff0c\u5982\u672c\u5730\u5b57\u7b26\u4e32\u3001\u56fe\u5f62\u548c\u5e03\u5c40\u6587\u4ef6\uff08Layout files\uff09\u3002<\/section>\n<\/li>\n<li>\n<section>\u901a\u77e5\u7ba1\u7406\u5668\uff08Notification Manager\uff09\u4f7f\u5f97\u5e94\u7528\u7a0b\u5e8f\u53ef\u4ee5\u5728\u72b6\u6001\u680f\u4e2d\u663e\u793a\u81ea\u5b9a\u4e49\u63d0\u793a\u3002<\/section>\n<\/li>\n<li>\n<section>\u6d3b\u52a8\u7ba1\u7406\u5668\uff08Activity Manager\uff09\u7528\u6765\u7ba1\u7406\u5e94\u7528\u7a0b\u5e8f\u751f\u547d\u5468\u671f\u5e76\u63d0\u4f9b\u5e38\u7528\u7684\u5bfc\u822a\u56de\u9000\u529f\u80fd\u3002<\/section>\n<\/li>\n<\/ul>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">\u7cfb\u7edf\u8fd0\u884c\u5e93<\/h3>\n<p style=\"margin: 1em 0px;\">Android \u5305\u542b\u4e00\u4e9b C\/C++ \u5e93\uff0c\u80fd\u88ab <a href=\"http:\/\/baike.baidu.com\/view\/4971681.htm\">Android \u7cfb\u7edf<\/a>\u4e2d\u4e0d\u540c\u7684 <a href=\"http:\/\/baike.baidu.com\/view\/379950.htm\">\u7ec4\u4ef6<\/a>\u4f7f\u7528\uff0c\u901a\u8fc7\u5e94\u7528\u7a0b\u5e8f\u6846\u67b6\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u670d\u52a1\u3002\u6838\u5fc3\u5e93\u5305\u62ec\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>\u7cfb\u7edf C \u5e93\uff1a\u4ece <a href=\"http:\/\/baike.baidu.com\/view\/209692.htm\">BSD<\/a> \u7ee7\u627f\u6765\u7684\u6807\u51c6 C \u7cfb\u7edf\u51fd\u6570\u5e93 Libc\uff0c\u4e13\u95e8\u4e3a\u57fa\u4e8e Embedded Linux \u7684\u8bbe\u5907\u5b9a\u5236\u3002<\/section>\n<\/li>\n<li>\n<section>\u5a92\u4f53\u5e93\uff1a\u57fa\u4e8e PacketVideo OpenCORE\uff1b\u652f\u6301\u591a\u79cd\u5e38\u7528\u97f3\u89c6\u9891\u683c\u5f0f\u56de\u653e\u548c\u5f55\u5236\uff0c\u540c\u65f6\u652f\u6301\u9759\u6001\u56fe\u7247\u6587\u4ef6\u3002\u7f16\u7801\u683c\u5f0f\u5305\u62ec MPEG4\u3001H.264\u3001MP3\u3001AAC\u3001AMR\u3001JPG\u3001PNG\u3002<\/section>\n<\/li>\n<li>\n<section>Surface Manager\uff1a\u7ba1\u7406\u663e\u793a\u5b50\u7cfb\u7edf\uff0c\u5e76\u4e3a\u591a\u4e2a\u5e94\u7528\u7a0b\u5e8f\u63d0\u4f9b <a href=\"http:\/\/baike.baidu.com\/view\/115346.htm\">2D<\/a> \u548c <a href=\"http:\/\/baike.baidu.com\/view\/53149.htm\">3D<\/a> \u56fe\u5c42\u7684\u65e0\u7f1d\u878d\u5408\u3002<\/section>\n<\/li>\n<li>\n<section>LibWebCore\uff1a\u8f83\u65b0\u7684 <a href=\"http:\/\/baike.baidu.com\/view\/206703.htm\">web \u6d4f\u89c8\u5668<\/a>\u5f15\u64ce\uff0c\u652f\u6301 Android \u6d4f\u89c8\u5668\u548c\u4e00\u4e2a\u53ef\u5d4c\u5165\u7684 web \u89c6\u56fe\u3002<\/section>\n<\/li>\n<\/ul>\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\u7cfb\u7edf\u5185\u6838<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">Android \u8fd0\u884c\u4e8e Linux kernel \u4e4b\u4e0a\uff0c\u4f46\u5e76\u4e0d\u662f <a href=\"http:\/\/baike.baidu.com\/view\/36272.htm\">GNU<\/a>\/Linux\u3002\u4e00\u822c GNU\/Linux \u91cc\u652f\u6301\u7684\u529f\u80fd\uff0cAndroid \u5927\u90fd\u6ca1\u6709\u652f\u6301\uff0c\u5305\u62ec <a href=\"http:\/\/baike.baidu.com\/view\/5207172.htm\">Cairo<\/a>\u3001<a href=\"http:\/\/baike.baidu.com\/view\/575115.htm\">X11<\/a>\u3001<a href=\"http:\/\/baike.baidu.com\/view\/1558228.htm\">Alsa<\/a>\u3001<a href=\"http:\/\/baike.baidu.com\/view\/856526.htm\">FFmpeg<\/a>\u3001<a href=\"http:\/\/baike.baidu.com\/view\/173704.htm\">GTK<\/a>\u3001<a href=\"http:\/\/baike.baidu.com\/view\/2941612.htm\">Pango<\/a> \u53ca <a href=\"http:\/\/baike.baidu.com\/view\/1323132.htm\">Glibc<\/a> \u7b49\u90fd\u88ab\u79fb\u9664\u3002Android \u53c8\u4ee5 Bionic \u53d6\u4ee3 Glibc\u3001\u4ee5 Skia \u53d6\u4ee3 Cairo\u3001\u518d\u4ee5 <a href=\"http:\/\/baike.baidu.com\/view\/3905960.htm\">OpenCORE<\/a> \u53d6\u4ee3 FFmpeg \u7b49\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e3a\u4e86\u8fbe\u5230\u5546\u4e1a\u5e94\u7528\uff0c\u5fc5\u987b\u79fb\u9664\u88ab GNU GPL \u7ea6\u675f\u7684\u90e8\u5206\uff0c\u4f8b\u5982\u628a\u9a71\u52a8\u7a0b\u5e8f\u79fb\u5230 Userspace\uff0c\u4f7f Linux driver \u4e0e Linux kernel \u5f7b\u5e95\u5206\u5f00\u3002Bionic\/Libc\/Kernel \u5e76\u975e\u6807\u51c6\u7684 Kernel header files\u3002Android \u7684 Kernel header \u662f\u5229\u7528\u5de5\u5177\u7531 Linux Kernel header \u4ea7\u751f\u7684\uff0c\u8fd9\u6837\u505a\u662f\u4e3a\u4e86\u4fdd\u7559\u5e38\u6570\u3001\u6570\u636e\u7ed3\u6784\u4e0e\u5b8f\u3002<\/p>\n<p style=\"margin: 1em 0px;\">Android \u7684 Linux kernel \u63a7\u5236\u5305\u62ec\u5b89\u5168\uff08<a href=\"http:\/\/baike.baidu.com\/view\/875341.htm\">Security<\/a>\uff09\u3001\u5b58\u50a8\u5668\u7ba1\u7406\uff08Memory Management\uff09\u3001\u7a0b\u5e8f\u7ba1\u7406\uff08Process Management\uff09\u3001\u7f51\u7edc\u5806\u6808\uff08Network Stack\uff09\u3001<a href=\"http:\/\/baike.baidu.com\/view\/1048.htm\">\u9a71\u52a8\u7a0b\u5e8f<\/a>\u6a21\u578b\uff08Driver Model\uff09\u7b49\u3002\u4e0b\u8f7d\u6e90\u7801\u4e4b\u524d\u5148\u8981\u5b89\u88c5\u6784\u5efa\u5de5\u5177 Repo \u6765\u521d\u59cb\u5316\u6e90\u7801\u3002Repo \u662f Android \u7528\u6765\u8f85\u52a9 Git \u5de5\u4f5c\u7684\u5de5\u5177\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\u3001APK \u6587\u4ef6<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">APK \u662f\u5b89\u5353\u5e94\u7528\u7684\u540e\u7f00\uff0cAndroid Package \u7684\u7f29\u5199\uff0c\u5373 Android \u5b89\u88c5\u5305\u3002APK \u7c7b\u4f3c Symbian \u7684 Sis \u6216 Sisx\uff1a\u628a APK \u4f20\u5230\u6a21\u62df\u5668\u6216\u624b\u673a\u4e2d\u6267\u884c\u5373\u53ef\u5b89\u88c5\u3002APK \u6587\u4ef6\u5176\u5b9e\u662f zip \u683c\u5f0f\uff0c\u540e\u7f00\u6539\u4e3a apk\uff1bUnZip \u89e3\u538b\u540e\u53ef\u4ee5\u770b\u5230 Dex \u6587\u4ef6\u3002Dex \u662f Dalvik VM executes \u7684\u5168\u79f0\uff0c\u5373 Android Dalvik \u6267\u884c\u7a0b\u5e8f\uff0c\u5e76\u975e Java ME \u5b57\u8282\u7801\u800c\u662f Dalvik \u5b57\u8282\u7801\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e00\u4e2a APK \u6587\u4ef6\u7ed3\u6784\u4e3a\uff1a<\/p>\n<ul style=\"padding-left: 1rem; margin-left: 1rem; font-size: 0.9rem; list-style-type: disc;\">\n<li>\n<section>META-INF\\\uff08Jar \u6587\u4ef6\u4e2d\u5e38\u53ef\u4ee5\u770b\u5230\uff09<\/section>\n<\/li>\n<li>\n<section>res\\\uff08\u5b58\u653e\u8d44\u6e90\u6587\u4ef6\u7684\u76ee\u5f55\uff09<\/section>\n<\/li>\n<li>\n<section>AndroidManifest.xml\uff08\u7a0b\u5e8f\u5168\u5c40\u914d\u7f6e\u6587\u4ef6\uff09<\/section>\n<\/li>\n<li>\n<section>classes.dex\uff08Dalvik \u5b57\u8282\u7801\uff09<\/section>\n<\/li>\n<li>\n<section>resources.arsc\uff08\u7f16\u8bd1\u540e\u7684\u4e8c\u8fdb\u5236\u8d44\u6e90\u6587\u4ef6\uff09<\/section>\n<\/li>\n<\/ul>\n<p style=\"margin: 1em 0px;\">Android \u8fd0\u884c\u4e00\u4e2a\u7a0b\u5e8f\u65f6\u9996\u5148\u9700\u8981 UnZip\uff0c\u7136\u540e\u7c7b\u4f3c Symbian \u90a3\u6837\u76f4\u63a5\u6267\u884c\u5b89\u88c5\uff0c\u548c Windows Mobile \u4e2d\u7684 PE \u6587\u4ef6\u6709\u533a\u522b\u3002\u8fd9\u6837\u505a\u5bf9\u7a0b\u5e8f\u7684\u4fdd\u5bc6\u6027\u548c\u53ef\u9760\u6027\u4e0d\u662f\u5f88\u9ad8\uff0c\u901a\u8fc7 dexdump \u53ef\u4ee5\u53cd\u7f16\u8bd1\uff0c\u4f46\u7b26\u5408\u5f53\u65f6\u7684\u53d1\u5c55\u89c4\u5f8b\uff1b\u5fae\u8f6f\u7684 Windows Gadgets \u6216\u8005\u8bf4 WPF \u4e5f\u91c7\u7528\u4e86\u8fd9\u79cd\u67b6\u6784\u65b9\u5f0f\u3002<\/p>\n<p style=\"margin: 1em 0px;\">dalvik vm \u7684\u6267\u884c\u6587\u4ef6\u88ab\u6253\u5305\u4e3a apk\uff0c\u6700\u7ec8\u8fd0\u884c\u65f6\u52a0\u8f7d\u5668\u4f1a\u89e3\u538b\u7136\u540e\u83b7\u53d6\u7f16\u8bd1\u540e androidmanifest.xml \u4e2d permission \u5206\u652f\u76f8\u5173\u7684\u5b89\u5168\u8bbf\u95ee\uff0c\u4f46\u4ecd\u7136\u5b58\u5728\u5f88\u591a\u5b89\u5168\u9650\u5236\u3002\u5982\u679c\u628a apk \u4f20\u5230 \/system\/app \u6587\u4ef6\u5939\u4e0b\u4f1a\u53d1\u73b0\u6267\u884c\u4e0d\u53d7\u9650\u5236\u3002\u5e73\u65f6\u5b89\u88c5\u7684\u6587\u4ef6\u53ef\u80fd\u4e0d\u5728\u8fd9\u4e2a\u6587\u4ef6\u5939\uff1bandroid rom \u4e2d\u7cfb\u7edf apk \u9ed8\u8ba4\u4f1a\u653e\u5165\u8fd9\u91cc\uff0c\u5b83\u4eec\u62e5\u6709 root \u6743\u9650\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;\">\u56db\u3001\u786c\u4ef6\u62bd\u8c61\u5c42\u4e0e\u4e2d\u95f4\u4ef6<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">Android \u7684 <a href=\"http:\/\/baike.baidu.com\/view\/1166796.htm\">HAL<\/a>\uff08\u786c\u4ef6\u62bd\u8c61\u5c42\uff09\u80fd\u4ee5\u5c01\u95ed\u6e90\u7801\u5f62\u5f0f\u63d0\u4f9b\u786c\u4ef6\u9a71\u52a8\u6a21\u5757\u3002\u76ee\u7684\u662f\u628a Android framework \u4e0e Linux kernel \u9694\u5f00\uff0c\u8ba9 Android \u4e0d\u81f3\u8fc7\u5ea6\u4f9d\u8d56 Linux kernel\uff0c\u8fbe\u6210 Kernel independent\uff0c\u4e5f\u8ba9 framework \u5f00\u53d1\u80fd\u5728\u4e0d\u8003\u8651\u9a71\u52a8\u7a0b\u5e8f\u5b9e\u73b0\u7684\u524d\u63d0\u4e0b\u8fdb\u884c\u3002<\/p>\n<p style=\"margin: 1em 0px;\">HAL stub \u662f\u4e00\u79cd\u4ee3\u7406\u4eba\uff08Proxy\uff09\u6982\u5ff5\uff0cStub \u4ee5 *.so \u5f62\u5f0f\u5b58\u5728\u3002Stub \u5411 HAL\u300c\u63d0\u4f9b\u300d\u64cd\u4f5c\u51fd\u6570\uff08Operations\uff09\uff0c\u7531 Android runtime \u5411 HAL \u53d6\u5f97 Stub \u7684 Operations\uff0c\u518d Callback \u8fd9\u4e9b\u64cd\u4f5c\u51fd\u6570\u3002HAL \u91cc\u5305\u542b\u8bb8\u591a Stub\u3002Runtime \u53ea\u8981\u8bf4\u660e\u300c\u7c7b\u578b\u300d\u5373 Module ID\uff0c\u5c31\u53ef\u4ee5\u53d6\u5f97\u64cd\u4f5c\u51fd\u6570\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e2d\u4ecb\u8f6f\u4ef6\u662f\u64cd\u4f5c\u7cfb\u7edf\u4e0e\u5e94\u7528\u7a0b\u5e8f\u7684\u6c9f\u901a\u6865\u6881\uff0c\u5e94\u7528\u5206\u4e3a\u4e24\u5c42\uff1a\u51fd\u6570\u5c42\uff08Library\uff09\u548c <a href=\"http:\/\/baike.baidu.com\/view\/1132.htm\">\u865a\u62df\u673a<\/a>\uff08Virtual Machine\uff09\u3002Bionic \u662f Android \u6539\u826f libc \u7684\u7248\u672c\u3002\u540c\u65f6\u5305\u542b\u4e86 Webkit\uff08Apple Safari \u6d4f\u89c8\u5668\u80cc\u540e\u7684\u5f15\u64ce\uff09\u3002Surface flinger \u628a 2D \u6216 3D \u5185\u5bb9\u663e\u793a\u5230\u5c4f\u5e55\u4e0a\u3002\u5de5\u5177\u94fe\u4e3a Google \u81ea\u5236\u7684 Bionic Libc\u3002<\/p>\n<p style=\"margin: 1em 0px;\">Android \u91c7\u7528 OpenCORE \u4f5c\u4e3a\u57fa\u7840\u591a\u5a92\u4f53\u6846\u67b6\uff0c\u53ef\u5206 7 \u5927\u5757\uff1aPVPlayer\u3001PVAuthor\u3001Codec\u3001PacketVideo Multimedia Framework\uff08PVMF\uff09\u3001Operating System Compatibility Library\uff08OSCL\uff09\u3001Common\u3001OpenMAX\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u56fe\u5f62\u5f15\u64ce\u4ee5 Skia \u4e3a\u6838\u5fc3\uff0c\u642d\u914d OpenGL\/ES\u3002skia \u4e0e Linux Cairo \u529f\u80fd\u76f8\u5f53\uff0c\u4f46\u5f53\u65f6\u76f8\u5bf9\u8fd8\u53ea\u662f\u96cf\u5f62\u30022005 \u5e74 Skia \u516c\u53f8\u88ab Google \u6536\u8d2d\uff0c2007 \u5e74\u521d Skia GL \u6e90\u7801\u516c\u5f00\uff1bSkia \u4e5f\u662f Google Chrome \u7684\u56fe\u5f62\u5f15\u64ce\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u591a\u5a92\u4f53\u6570\u636e\u5e93\u91c7\u7528 SQLite\uff0c\u53c8\u5206\u4e3a\u5171\u7528\u6570\u636e\u5e93\u53ca\u79c1\u7528\u6570\u636e\u5e93\u3002\u7528\u6237\u53ef\u901a\u8fc7 ContentResolver \u7c7b\u53d6\u5f97\u5171\u7528\u6570\u636e\u5e93\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e2d\u95f4\u5c42\u591a\u4ee5 Java \u5b9e\u73b0\uff0c\u5e76\u91c7\u7528\u7279\u6b8a\u7684 Dalvik \u865a\u62df\u673a\u3002Dalvik \u662f\u300c\u5bc4\u5b58\u5668\u578b\u6001\u300d\uff08Register Based\uff09\u7684 Java \u865a\u62df\u673a\uff0c\u53d8\u91cf\u5b58\u653e\u4e8e\u5bc4\u5b58\u5668\u4e2d\uff0c\u6307\u4ee4\u76f8\u5bf9\u51cf\u5c11\u3002\u53ef\u4ee5\u6709\u591a\u4e2a\u5b9e\u4f8b\uff0c\u6bcf\u4e2a Android \u5e94\u7528\u7a0b\u5e8f\u90fd\u7528\u4e00\u4e2a\u81ea\u5c5e\u7684 Dalvik \u865a\u62df\u673a\u8fd0\u884c\uff0c\u4fbf\u4e8e\u4f18\u5316\u3002\u5b83\u5e76\u975e\u8fd0\u884c Java \u5b57\u8282\u7801\uff0c\u800c\u662f\u8fd0\u884c .dex \u683c\u5f0f\u6587\u4ef6\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\u5b89\u5168\u6743\u9650\u673a\u5236<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">Android \u672c\u8eab\u662f\u6743\u9650\u5206\u7acb\u7684 <a href=\"http:\/\/baike.baidu.com\/view\/880.htm\">\u64cd\u4f5c\u7cfb\u7edf<\/a>\u3002\u6bcf\u4e2a\u5e94\u7528\u90fd\u4ee5\u552f\u4e00\u7684\u7cfb\u7edf\u8bc6\u522b\u8eab\u4efd\u8fd0\u884c\uff08Linux \u7528\u6237 ID \u4e0e\u7fa4\u7ec4 ID\uff09\uff0c\u7cfb\u7edf\u5404\u90e8\u5206\u4e5f\u5206\u522b\u4f7f\u7528\u72ec\u7acb\u8bc6\u522b\u65b9\u5f0f\u3002Linux \u5c31\u8fd9\u6837\u5c06\u5e94\u7528\u4e0e\u5e94\u7528\u3001\u5e94\u7528\u4e0e\u7cfb\u7edf\u9694\u79bb\u5f00\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u66f4\u591a\u5b89\u5168\u529f\u80fd\u901a\u8fc7\u6743\u9650\u673a\u5236\u63d0\u4f9b\uff1a\u53ef\u4ee5\u9650\u5236\u67d0\u4e2a\u7279\u5b9a\u8fdb\u7a0b\u7684\u7279\u5b9a\u64cd\u4f5c\uff0c\u4e5f\u53ef\u4ee5\u9650\u5236\u6bcf\u4e2a <a href=\"http:\/\/baike.baidu.com\/view\/160675.htm\">URI<\/a> \u6743\u9650\u5bf9\u7279\u5b9a\u6570\u636e\u6bb5\u7684\u8bbf\u95ee\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5b89\u5168\u67b6\u6784\u7684\u6838\u5fc3\u601d\u60f3\u662f\uff1a\u9ed8\u8ba4\u8bbe\u7f6e\u4e0b\uff0c\u6240\u6709\u5e94\u7528\u90fd\u6ca1\u6709\u6743\u9650\u5bf9\u5176\u4ed6\u5e94\u7528\u3001\u7cfb\u7edf\u6216\u7528\u6237\u8fdb\u884c\u8f83\u5927\u5f71\u54cd\u7684\u64cd\u4f5c\u3002\u8fd9\u5305\u62ec\u8bfb\u5199\u7528\u6237\u9690\u79c1\u6570\u636e\uff08\u8054\u7cfb\u4eba\u6216\u7535\u5b50\u90ae\u4ef6\uff09\u3001\u8bfb\u5199\u5176\u4ed6\u5e94\u7528\u6587\u4ef6\u3001\u8bbf\u95ee\u7f51\u7edc\u6216\u963b\u6b62\u8bbe\u5907\u5f85\u673a\u7b49\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5b89\u88c5\u5e94\u7528\u65f6\uff0c\u5728\u68c0\u67e5\u7a0b\u5e8f\u7b7e\u540d\u63d0\u53ca\u7684\u6743\u9650\u4e14\u7ecf\u8fc7\u7528\u6237\u786e\u8ba4\u540e\uff0c\u8f6f\u4ef6\u5305\u5b89\u88c5\u5668\u4f1a\u7ed9\u4e88\u5e94\u7528\u6743\u9650\u3002\u4ece\u7528\u6237\u89d2\u5ea6\u770b\uff0c\u4e00\u6b3e Android \u5e94\u7528\u901a\u5e38\u4f1a\u8981\u6c42\u5982\u4e0b\u6743\u9650\uff1a<\/p>\n<p style=\"margin: 1em 0px;\">\u62e8\u6253\u7535\u8bdd\u3001\u53d1\u9001\u77ed\u4fe1\u6216\u5f69\u4fe1\u3001\u4fee\u6539\/\u5220\u9664 <a href=\"http:\/\/baike.baidu.com\/view\/2228.htm\">SD \u5361<\/a>\u4e0a\u7684\u5185\u5bb9\u3001\u8bfb\u53d6\u8054\u7cfb\u4eba\u3001\u8bfb\u53d6\/\u5199\u5165\u65e5\u7a0b\u3001\u8bfb\u53d6\u7535\u8bdd\u72b6\u6001\u6216\u8bc6\u522b\u7801\u3001\u7cbe\u786e\u7684\uff08\u57fa\u4e8e <a href=\"http:\/\/baike.baidu.com\/view\/7773.htm\">GPS<\/a>\uff09\u5730\u7406\u4f4d\u7f6e\u3001\u6a21\u7cca\u7684\uff08\u57fa\u4e8e\u7f51\u7edc\uff09\u5730\u7406\u4f4d\u7f6e\u3001\u521b\u5efa\u84dd\u7259\u8fde\u63a5\u3001\u5bf9\u4e92\u8054\u7f51\u7684\u5b8c\u5168\u8bbf\u95ee\u3001\u67e5\u770b\u7f51\u7edc\/WiFi \u72b6\u6001\u3001\u907f\u514d\u624b\u673a\u5f85\u673a\u3001\u4fee\u6539\u7cfb\u7edf\u5168\u5c40\u8bbe\u7f6e\u3001\u8bfb\u53d6\u540c\u6b65\u8bbe\u5b9a\u3001\u5f00\u673a\u81ea\u542f\u52a8\u3001\u91cd\u542f\u5176\u4ed6\u5e94\u7528\u3001\u7ec8\u6b62\u8fd0\u884c\u4e2d\u7684\u5e94\u7528\u3001\u8bbe\u5b9a\u504f\u597d\u5e94\u7528\u3001\u9707\u52a8\u63a7\u5236\u3001\u62cd\u6444\u56fe\u7247\u7b49\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e00\u6b3e\u5e94\u7528\u5e94\u8be5\u6839\u636e\u81ea\u8eab\u529f\u80fd\u8981\u6c42\u5408\u7406\u7684\u6743\u9650\u3002\u7528\u6237\u4e5f\u53ef\u4ee5\u5206\u6790\u6240\u9700\u6743\u9650\uff0c\u7b80\u5355\u5224\u5b9a\u662f\u5426\u5b89\u5168\u3002\u5982\u4e00\u6b3e\u4e0d\u5e26\u5e7f\u544a\u7684\u5355\u673a\u7248\u3001\u6ca1\u6709\u4efb\u4f55\u9644\u52a0\u5185\u5bb9\u9700\u8981\u4e0b\u8f7d\uff0c\u5374\u8981\u6c42\u8bbf\u95ee\u7f51\u7edc\uff0c\u5c31\u6bd4\u8f83\u53ef\u7591\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;\">\u516d\u3001\u56db\u5927\u7ec4\u4ef6<\/span><\/h2>\n<p style=\"margin: 1em 0px;\">Android \u5f00\u53d1\u56db\u5927\u7ec4\u4ef6\u5206\u522b\u662f\uff1a\u6d3b\u52a8\uff08<a href=\"http:\/\/baike.baidu.com\/view\/1136177.htm\">Activity<\/a>\uff09\u7528\u4e8e\u8868\u73b0\u529f\u80fd\uff1b\u670d\u52a1\uff08<a href=\"http:\/\/baike.baidu.com\/view\/3862339.htm\">Service<\/a>\uff09\u540e\u53f0\u8fd0\u884c\u3001\u4e0d\u63d0\u4f9b\u754c\u9762\uff1b\u5e7f\u64ad\u63a5\u6536\u5668\uff08BroadcastReceiver\uff09\u7528\u4e8e\u63a5\u6536\u5e7f\u64ad\uff1b\u5185\u5bb9\u63d0\u4f9b\u5546\uff08<a href=\"http:\/\/baike.baidu.com\/view\/1445128.htm\">Content Provider<\/a>\uff09\u652f\u6301\u5728\u591a\u4e2a\u5e94\u7528\u4e2d\u5b58\u50a8\u548c\u8bfb\u53d6\u6570\u636e\uff0c\u76f8\u5f53\u4e8e <a href=\"http:\/\/baike.baidu.com\/view\/1088.htm\">\u6570\u636e\u5e93<\/a>\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;\">\u7ec4\u4ef6<\/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;\">\u4f5c\u7528<\/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;\">Activity<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u4e00\u5c4f\u754c\u9762\uff0c\u7a0b\u5e8f\u6d41\u7a0b\u8fd0\u884c\u5176\u4e2d\uff0c\u53ef\u4e92\u76f8\u8df3\u8f6c\u751a\u81f3\u5e26\u8fd4\u56de\u503c<\/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;\">Service<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u65e0\u754c\u9762\u7684\u957f\u751f\u547d\u5468\u671f\u540e\u53f0\u4ee3\u7801<\/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;\">BroadcastReceiver<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u8fc7\u6ee4\u5e76\u54cd\u5e94\u5e7f\u64ad\uff0c\u4e0d\u80fd\u751f\u6210 UI<\/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;\">Content Provider<\/td>\n<td style=\"font-size: 0.75em; padding: 9px 12px; line-height: 22px; border: 1px solid #ef7060; vertical-align: top;\">\u5bf9\u5916\u5171\u4eab\u6570\u636e\u7684\u7a97\u53e3\uff0c\u7528 content:\/\/ URI \u6807\u8bc6<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">Activity<\/h3>\n<p style=\"margin: 1em 0px;\">Activity \u662f\u6240\u6709\u7a0b\u5e8f\u7684\u6839\u672c\uff0c\u6d41\u7a0b\u90fd\u8fd0\u884c\u5728 Activity \u4e4b\u4e2d\uff0c\u4e5f\u662f\u6700\u57fa\u672c\u7684\u6a21\u5757\u4e4b\u4e00\u3002\u4e00\u822c\u4ee3\u8868\u624b\u673a\u5c4f\u5e55\u7684\u4e00\u5c4f\u3002\u5982\u679c\u628a\u624b\u673a\u6bd4\u4f5c\u6d4f\u89c8\u5668\uff0cActivity \u5c31\u76f8\u5f53\u4e8e\u4e00\u4e2a\u7f51\u9875\uff0c\u5176\u4e2d\u53ef\u4ee5\u6dfb\u52a0 Button\u3001CheckBox \u7b49\u63a7\u4ef6\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u4e00\u822c\u4e00\u4e2a Android \u5e94\u7528\u7531\u591a\u4e2a Activity \u7ec4\u6210\uff0c\u5b83\u4eec\u4e4b\u95f4\u53ef\u4ee5\u76f8\u4e92\u8df3\u8f6c\uff0c\u4f8b\u5982\u6309\u4e0b Button \u540e\u8df3\u5230\u5176\u4ed6 Activity\u3002\u548c\u7f51\u9875\u8df3\u8f6c\u7a0d\u5fae\u4e0d\u540c\u7684\u662f\uff0cActivity \u8df3\u8f6c\u6709\u53ef\u80fd\u8fd4\u56de\u503c\uff1a\u4ece A \u8df3\u5230 B\uff0cB \u7ed3\u675f\u65f6\u53ef\u80fd\u7ed9 A \u4e00\u4e2a\u8fd4\u56de\u503c\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u6253\u5f00\u4e00\u4e2a\u65b0\u5c4f\u5e55\u65f6\uff0c\u4e4b\u524d\u7684\u5c4f\u5e55\u4f1a\u88ab\u7f6e\u4e3a\u6682\u505c\u5e76\u538b\u5165\u5386\u53f2\u5806\u6808\u3002\u7528\u6237\u53ef\u4ee5\u901a\u8fc7\u56de\u9000\u8fd4\u56de\u4ee5\u524d\u6253\u5f00\u8fc7\u7684\u5c4f\u5e55\u3002\u53ef\u4ee5\u9009\u62e9\u6027\u79fb\u9664\u4e00\u4e9b\u6ca1\u6709\u5fc5\u8981\u4fdd\u7559\u7684\u5c4f\u5e55\uff0c\u56e0\u4e3a Android \u4f1a\u628a\u6bcf\u4e2a\u5e94\u7528\u4ece\u5f00\u59cb\u5230\u5f53\u524d\u7684\u6bcf\u4e2a\u5c4f\u5e55\u4fdd\u5b58\u5728\u5806\u6808\u4e2d\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">Service<\/h3>\n<p style=\"margin: 1em 0px;\">Service \u8ddf Activity \u7ea7\u522b\u5dee\u4e0d\u591a\uff0c\u4f46\u4e0d\u80fd\u81ea\u5df1\u8fd0\u884c\uff0c\u53ea\u80fd\u540e\u53f0\u8fd0\u884c\uff0c\u5e76\u4e14\u53ef\u4ee5\u548c\u5176\u4ed6\u7ec4\u4ef6\u4ea4\u4e92\u3002\u5b83\u662f\u6ca1\u6709\u754c\u9762\u7684\u957f\u751f\u547d\u5468\u671f\u4ee3\u7801\u3002\u4f8b\u5982\u6253\u5f00\u97f3\u4e50\u64ad\u653e\u5668\u540e\u518d\u6253\u5f00\u6d4f\u89c8\u5668\uff0c\u6b4c\u66f2\u4ecd\u5728\u540e\u53f0\u64ad\u653e\uff0c\u8fd9\u5c31\u662f\u7531\u64ad\u653e\u97f3\u4e50\u7684 Service \u63a7\u5236\u3002\u4e5f\u53ef\u4ee5\u5728\u68c0\u6d4b SD \u5361\u6587\u4ef6\u53d8\u5316\u3001\u540e\u53f0\u8bb0\u5f55\u5730\u7406\u4f4d\u7f6e\u7b49\u573a\u5408\u4f7f\u7528\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5f00\u542f Service \u6709\u4e24\u79cd\u65b9\u5f0f\uff1a<\/p>\n<p style=\"margin: 1em 0px;\"><strong>(1) Context.startService()<\/strong>\uff1aService \u4f1a\u7ecf\u5386 onCreate -&gt; onStart\uff08\u5982\u679c\u8fd8\u6ca1\u8fd0\u884c\uff0c\u5148 onCreate \u518d onStart\uff1b\u5982\u679c\u5df2\u7ecf\u8fd0\u884c\uff0c\u5219\u53ea\u8c03\u7528 onStart\uff0c\u6240\u4ee5 onStart \u53ef\u80fd\u88ab\u591a\u6b21\u8c03\u7528\uff09\u3002StopService \u65f6\u76f4\u63a5 onDestroy\u3002\u5982\u679c\u8c03\u7528\u8005\u81ea\u5df1\u9000\u51fa\u800c\u6ca1\u6709 StopService\uff0cService \u4f1a\u4e00\u76f4\u5728\u540e\u53f0\u8fd0\u884c\uff0c\u8c03\u7528\u8005\u518d\u542f\u52a8\u540e\u53ef\u4ee5\u901a\u8fc7 stopService \u5173\u95ed\u3002\u591a\u6b21\u8c03\u7528 startService \u4e0d\u4f1a\u5d4c\u5957\uff0c\u65e0\u8bba\u542f\u52a8\u591a\u5c11\u6b21\uff0c\u4e00\u65e6 stopService \u6216 stopSelf \u90fd\u4f1a\u88ab\u505c\u6b62\u3002\u4f20\u7ed9 startService \u7684 Intent \u4f1a\u4f20\u7ed9 onStart\u3002\u8c03\u7528\u987a\u5e8f\uff1aonCreate &#8211;&gt; onStart\uff08\u53ef\u591a\u6b21\uff09&#8211;&gt; onDestroy\u3002<\/p>\n<p style=\"margin: 1em 0px;\"><strong>(2) Context.bindService()<\/strong>\uff1a\u7ecf\u5386 onCreate() &#8211;&gt; onBind()\uff0conBind \u5c06\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u4e00\u4e2a IBinder \u63a5\u53e3\u5b9e\u4f8b\uff0c\u5141\u8bb8\u5ba2\u6237\u7aef\u56de\u8c03\u670d\u52a1\u7684\u65b9\u6cd5\uff0c\u6bd4\u5982\u5f97\u5230\u8fd0\u884c\u72b6\u6001\u3002\u8fd9\u65f6\u8c03\u7528\u8005\uff08Context\uff0c\u4f8b\u5982 Activity\uff09\u4f1a\u548c Service \u7ed1\u5b9a\u5728\u4e00\u8d77\uff0cContext \u9000\u51fa\u4e86\uff0cService \u5c31\u4f1a onUnbind &#8211;&gt; onDestroy\uff0c\u6240\u8c13\u7ed1\u5b9a\u5728\u4e00\u8d77\u5c31\u5171\u5b58\u4ea1\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">BroadcastReceiver<\/h3>\n<p style=\"margin: 1em 0px;\">Broadcast \u662f\u5e7f\u6cdb\u8fd0\u7528\u7684\u5728\u5e94\u7528\u7a0b\u5e8f\u4e4b\u95f4\u4f20\u8f93\u4fe1\u606f\u7684\u673a\u5236\u3002BroadcastReceiver \u662f\u5bf9\u53d1\u9001\u51fa\u6765\u7684 Broadcast \u8fdb\u884c\u8fc7\u6ee4\u63a5\u53d7\u5e76\u54cd\u5e94\u7684\u7ec4\u4ef6\u3002\u53ef\u4ee5\u8ba9\u5e94\u7528\u5bf9\u5916\u90e8\u4e8b\u4ef6\u505a\u51fa\u54cd\u5e94\uff0c\u4f8b\u5982\u7535\u8bdd\u547c\u5165\u3001\u4e0b\u8f7d\u5b8c\u6210\u3002BroadcastReceiver \u4e0d\u80fd\u751f\u6210 UI\uff0c\u7528\u6237\u770b\u4e0d\u5230\uff1b\u901a\u8fc7 NotificationManager \u901a\u77e5\u7528\u6237\u3002\u65e2\u53ef\u4ee5\u5728 AndroidManifest.xml \u4e2d\u6ce8\u518c\uff0c\u4e5f\u53ef\u4ee5\u5728\u8fd0\u884c\u65f6\u7528 Context.registerReceiver() \u6ce8\u518c\u3002\u53ea\u8981\u6ce8\u518c\u4e86\uff0c\u4e8b\u4ef6\u6765\u4e34\u65f6\u5373\u4f7f\u7a0b\u5e8f\u6ca1\u6709\u542f\u52a8\uff0c\u7cfb\u7edf\u4e5f\u4f1a\u5728\u9700\u8981\u65f6\u542f\u52a8\u7a0b\u5e8f\u3002\u5404\u79cd\u5e94\u7528\u8fd8\u53ef\u4ee5\u901a\u8fc7 Context.sendBroadcast() \u628a Intent Broadcasts \u5e7f\u64ad\u7ed9\u5176\u4ed6\u5e94\u7528\u7a0b\u5e8f\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">Content Provider<\/h3>\n<p style=\"margin: 1em 0px;\">Content Provider \u662f Android \u63d0\u4f9b\u7684\u7b2c\u4e09\u65b9\u5e94\u7528\u6570\u636e\u8bbf\u95ee\u65b9\u6848\u3002\u5bf9\u6570\u636e\u7684\u4fdd\u62a4\u5f88\u4e25\u5bc6\uff1a\u9664\u4e86\u653e\u5728 SD \u5361\u4e2d\u7684\u6570\u636e\uff0c\u4e00\u4e2a\u5e94\u7528\u6240\u6301\u6709\u7684\u6570\u636e\u5e93\u3001\u6587\u4ef6\u7b49\uff0c\u90fd\u4e0d\u5141\u8bb8\u5176\u4ed6\u5e94\u7528\u76f4\u63a5\u8bbf\u95ee\u3002Android \u4e0d\u4f1a\u628a\u6bcf\u4e2a\u5e94\u7528\u505a\u6210\u5b64\u5c9b\uff0c\u4e3a\u6240\u6709\u5e94\u7528\u51c6\u5907\u4e86\u4e00\u6247\u7a97\uff0c\u5c31\u662f Content Provider\u3002\u60f3\u5bf9\u5916\u63d0\u4f9b\u7684\u6570\u636e\uff0c\u53ef\u4ee5\u901a\u8fc7\u6d3e\u751f Content Provider \u7c7b\u5c01\u88c5\uff1b\u6bcf\u4e2a Provider \u7528\u4e00\u4e2a uri \u4f5c\u4e3a\u72ec\u7acb\u6807\u8bc6\uff0c\u5f62\u5982 content:\/\/com.xxxxx\u3002\u770b\u8d77\u6765\u50cf REST\uff0c\u4f46\u6bd4 REST \u66f4\u7075\u6d3b\uff1auri \u53ef\u4ee5\u5e26 id \u6216\u5217\u8868\uff0c\u5b9e\u73b0\u8005\u4e0d\u5fc5\u4e25\u683c\u6309\u8fd9\u4e2a\u6a21\u5f0f\uff0c\u7ed9 id \u7684 uri \u4e5f\u53ef\u4ee5\u8fd4\u56de\u5217\u8868\uff0c\u53ea\u8981\u8c03\u7528\u8005\u660e\u767d\u5373\u53ef\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;\">\u4e03\u3001\u5e73\u53f0\u4f18\u52bf<\/span><\/h2>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">\u5f00\u653e\u6027<\/h3>\n<p style=\"margin: 1em 0px;\">Android \u5e73\u53f0\u9996\u5148\u5c31\u662f\u5f00\u653e\u6027\uff0c\u5141\u8bb8\u4efb\u4f55\u79fb\u52a8\u7ec8\u7aef\u5382\u5546\u52a0\u5165 Android \u8054\u76df\u3002\u663e\u8457\u7684\u5f00\u653e\u6027\u53ef\u4ee5\u4f7f\u5176\u62e5\u6709\u66f4\u591a\u5f00\u53d1\u8005\uff0c\u968f\u7740\u7528\u6237\u548c\u5e94\u7528\u65e5\u76ca\u4e30\u5bcc\uff0c\u5e73\u53f0\u4e5f\u5c06\u5f88\u5feb\u8d70\u5411\u6210\u719f\u3002\u5f00\u653e\u6027\u6709\u5229\u4e8e\u79ef\u7d2f\u4eba\u6c14\uff08\u6d88\u8d39\u8005\u548c\u5382\u5546\uff09\uff1b\u5bf9\u6d88\u8d39\u8005\u6700\u5927\u7684\u53d7\u76ca\u662f\u4e30\u5bcc\u7684\u8f6f\u4ef6\u8d44\u6e90\u3002\u5f00\u653e\u4e5f\u4f1a\u5e26\u6765\u66f4\u5927\u7ade\u4e89\uff0c\u6d88\u8d39\u8005\u53ef\u4ee5\u7528\u66f4\u4f4e\u4ef7\u4f4d\u8d2d\u5f97\u5fc3\u4eea\u7684\u624b\u673a\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">\u4e30\u5bcc\u7684\u786c\u4ef6<\/h3>\n<p style=\"margin: 1em 0px;\">\u540c\u6837\u4e0e\u5f00\u653e\u6027\u76f8\u5173\uff1a\u4f17\u591a\u5382\u5546\u4f1a\u63a8\u51fa\u529f\u80fd\u7279\u8272\u5404\u5177\u7684\u591a\u79cd\u4ea7\u54c1\u3002\u529f\u80fd\u4e0a\u7684\u5dee\u5f02\u548c\u7279\u8272\u5374\u4e0d\u4f1a\u5f71\u54cd\u5230\u6570\u636e\u540c\u6b65\u751a\u81f3\u8f6f\u4ef6\u7684\u517c\u5bb9\uff0c\u5982\u540c\u4ece\u8bfa\u57fa\u4e9a Symbian \u6539\u7528\u82f9\u679c iPhone\uff0c\u540c\u65f6\u8fd8\u53ef\u5c06 Symbian \u4e2d\u4f18\u79c0\u7684\u8f6f\u4ef6\u5e26\u5230 iPhone \u4e0a\u4f7f\u7528\uff0c\u8054\u7cfb\u4eba\u7b49\u8d44\u6599\u4e5f\u53ef\u4ee5\u65b9\u4fbf\u8f6c\u79fb\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">\u65b9\u4fbf\u5f00\u53d1<\/h3>\n<p style=\"margin: 1em 0px;\">\u5e73\u53f0\u63d0\u4f9b\u7ed9\u7b2c\u4e09\u65b9\u5f00\u53d1\u5546\u4e00\u4e2a\u5341\u5206\u5bbd\u6cdb\u3001\u81ea\u7531\u7684\u73af\u5883\uff0c\u4e0d\u4f1a\u53d7\u5230\u5404\u79cd\u6761\u6761\u6846\u6846\u7684\u963b\u6270\uff0c\u4f1a\u6709\u5f88\u591a\u65b0\u9896\u522b\u81f4\u7684\u8f6f\u4ef6\u8bde\u751f\u3002\u4f46\u4e5f\u6709\u4e24\u9762\u6027\uff1a\u8840\u8165\u3001\u66b4\u529b\u3001\u60c5\u8272\u65b9\u9762\u7684\u7a0b\u5e8f\u548c\u6e38\u620f\u5982\u4f55\u63a7\u5236\uff0c\u6b63\u662f\u7559\u7ed9 Android \u7684\u96be\u9898\u4e4b\u4e00\u3002<\/p>\n<h3 style=\"margin: 1.2em 0px 1em; padding: 0px; font-weight: bold; font-size: 1.3em;\">Google \u5e94\u7528<\/h3>\n<p style=\"margin: 1em 0px;\">Google \u4ece\u641c\u7d22\u5de8\u4eba\u5230\u5168\u9762\u7684\u4e92\u8054\u7f51\u6e17\u900f\uff0c\u5730\u56fe\u3001\u90ae\u4ef6\u3001\u641c\u7d22\u7b49\u670d\u52a1\u5df2\u7ecf\u6210\u4e3a\u8fde\u63a5\u7528\u6237\u548c\u4e92\u8054\u7f51\u7684\u91cd\u8981\u7ebd\u5e26\uff0c\u800c Android \u5e73\u53f0\u624b\u673a\u5c06\u65e0\u7f1d\u7ed3\u5408\u8fd9\u4e9b\u4f18\u79c0\u7684 Google \u670d\u52a1\u3002<\/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\uff1aAndroid \u662f Linux \u4e0a\u7684\u5206\u5c42\u7cfb\u7edf\uff1a\u5e94\u7528\u7528 Java \u8dd1\u5728 Dalvik \u4e0a\uff0c\u7ecf\u6846\u67b6\u8bbf\u95ee C\/C++ \u5e93\u4e0e\u5185\u6838\uff1b\u56db\u5927\u7ec4\u4ef6\u52a0\u4e0a\u6743\u9650\u6a21\u578b\uff0c\u6784\u6210\u6574\u5957\u5e73\u53f0\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Android \u662f\u4e00\u79cd\u57fa\u4e8e Linux \u7684\u81ea\u7531\u53ca\u5f00\u653e\u6e90\u4ee3\u7801\u64cd\u4f5c\u7cfb\u7edf\uff0c\u7531\u64cd\u4f5c\u7cfb\u7edf\u3001\u4e2d\u95f4\u4ef6\u3001\u7528\u6237\u754c\u9762\u548c\u5e94\u7528\u8f6f\u4ef6\u7ec4\u6210 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[52],"tags":[195],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/446"}],"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=446"}],"version-history":[{"count":5,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/446\/revisions"}],"predecessor-version":[{"id":3974,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/446\/revisions\/3974"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=446"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=446"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=446"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}