{"id":673,"date":"2011-07-12T10:26:08","date_gmt":"2011-07-12T02:26:08","guid":{"rendered":"http:\/\/leybreeze.com\/blog\/?p=673"},"modified":"2011-08-29T11:56:44","modified_gmt":"2011-08-29T03:56:44","slug":"%e6%84%8f%e5%9b%be%e5%92%8c%e6%84%8f%e5%9b%be%e8%bf%87%e6%bb%a4%e5%99%a8","status":"publish","type":"post","link":"http:\/\/leybreeze.com\/blog\/?p=673","title":{"rendered":"\u610f\u56fe\u548c\u610f\u56fe\u8fc7\u6ee4\u5668"},"content":{"rendered":"<p>\u4e00\u4e2a\u7a0b\u5e8f\u7684\u4e09\u4e2a\u6838\u5fc3\u7ec4\u4ef6\u2014\u2014\u6d3b\u52a8\u3001\u670d\u52a1\u548c\u5e7f\u64ad\u63a5\u6536\u8005\u2014\u2014\u901a\u8fc7\u88ab\u79f0\u4e3a<em>\u610f\u56fe<\/em>\uff08intent\uff09\u7684\u6d88\u606f\u6765\u88ab\u6fc0\u6d3b\u3002\u610f\u56fe\u6d88\u606f\u662f\u4e00\u79cd\u5728\u540c\u4e00\u4e2a\u6216\u4e0d\u540c\u7a0b\u5e8f\u7684\u7ec4\u4ef6\u95f4\u7684\u8fd0\u884c\u540e\u7ed1\u5b9a\u673a\u5236\u3002\u610f\u56fe\u81ea\u8eab\uff0c\u5373\u4e00\u4e2aIntent\u5bf9\u8c61\uff0c\u662f\u5305\u542b\u4e86\u5bf9\u4e8e\u8981\u6267\u884c\u7684\u64cd\u4f5c\u7684\u62bd\u8c61\u63cf\u8ff0\u7684\u88ab\u52a8\u6570\u636e\u7ed3\u6784\u2014\u2014\u6216\u8005\uff0c\u5bf9\u4e8e\u5e7f\u64ad\u6765\u8bf4\uff0c\u662f\u5bf9\u4e8e\u5df2\u53d1\u751f\u6b63\u5728\u88ab\u64ad\u62a5\u7684\u4e8b\u4ef6\u7684\u63cf\u8ff0\u3002\u5bf9\u4e8e\u5411\u4e0d\u540c\u7c7b\u578b\u7684\u7ec4\u5efa\u4f20\u9012\u610f\u56fe\uff0c\u6709\u4e0d\u540c\u7684\u673a\u5236\uff1a<\/p>\n<ul>\n<li>\u4e00\u4e2aIntent\u5bf9\u8c61\u88ab\u4f20\u9012\u7ed9Context.startActivity()\u6216Activity.startActivityForResult()\u4ee5\u542f\u52a8\u4e00\u4e2a\u6d3b\u52a8\uff0c\u6216\u662f\u8ba9\u4e00\u4e2a\u5df2\u5b58\u5728\u7684\u6d3b\u52a8\u8fdb\u884c\u65b0\u7684\u5de5\u4f5c\u3002\uff08\u5b83\u4e5f\u53ef\u4ee5\u88ab\u4f20\u9012\u7ed9Activity.setResult()\u4f7f\u5176\u5411\u8c03\u7528\u4e86<span style=\"color: #008000;\">startActivityForResult()<\/span>\u7684\u6d3b\u52a8\u8fd4\u56de\u4fe1\u606f\u3002\uff09<\/li>\n<li>\u4e00\u4e2aIntent\u5bf9\u8c61\u88ab\u4f20\u9012\u7ed9Context.startService()\u4ee5\u521d\u59cb\u5316\u4e00\u4e2a\u670d\u52a1\u6216\u5411\u6b63\u5728\u8fd0\u884c\u7684\u670d\u52a1\u53d1\u51fa\u65b0\u7684\u6307\u4ee4\u3002\u540c\u6837\u7684\uff0c\u4e00\u4e2a\u610f\u56fe\u53ef\u4ee5\u88ab\u4f20\u9012\u7ed9Context.bindService()\u4ee5\u5728\u8fdb\u884c\u8c03\u7528\u7684\u7ec4\u4ef6\u548c\u76ee\u6807\u670d\u52a1\u95f4\u5efa\u7acb\u8054\u7cfb\u3002\u5982\u679c\u670d\u52a1\u4e0d\u5728\u8fd0\u884c\uff0c\u8fd8\u53ef\u4ee5\u9009\u62e9\u521d\u59cb\u5316\u8be5\u670d\u52a1\u3002<\/li>\n<li>\u88ab\u4f20\u9012\u7ed9\u4efb\u4f55\u5e7f\u64ad\u65b9\u6cd5\uff08\u4f8b\u5982Context.sendBroadcast()\u3001Context.sendOrderedBroadcast()\u6216Context.sendStickyBroadcast()\uff09\u7684Intent\u5bf9\u8c61\u5c06\u88ab\u53d1\u9001\u7ed9\u6240\u6709\u76f8\u5173\u7684\u5e7f\u64ad\u63a5\u6536\u8005\u3002\u5f88\u591a\u79cd\u7c7b\u7684\u5e7f\u64ad\u5728\u7cfb\u7edf\u4ee3\u7801\u4e2d\u88ab\u521b\u5efa\u3002<\/li>\n<\/ul>\n<p><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u5728\u4efb\u4f55\u4e00\u79cd\u60c5\u51b5\u4e0b\uff0cAndroid\u7cfb\u7edf\u5c06\u5bfb\u627e\u5408\u9002\u7684\u6d3b\u52a8\u3001\u670d\u52a1\u6216\u5e7f\u64ad\u63a5\u6536\u8005\u6765\u54cd\u5e94\u610f\u56fe\uff0c\u5728\u5fc5\u8981\u65f6\u5bf9\u5b83\u4eec\u8fdb\u884c\u521d\u59cb\u5316\u3002\u8fd9\u4e9b\u6d88\u606f\u7cfb\u7edf\u4e4b\u95f4\u6ca1\u6709\u4ea4\u96c6\uff1a\u5e7f\u64ad\u610f\u56fe\u4ec5\u88ab\u53d1\u9001\u7ed9\u5e7f\u64ad\u63a5\u6536\u8005\uff0c\u800c\u4e0d\u4f1a\u7ed9\u6d3b\u52a8\u6216\u662f\u670d\u52a1\u3002\u4e00\u4e2a\u4f20\u9012\u7ed9<span style=\"color: #008000;\">startActivity()<\/span>\u7684\u610f\u56fe\u5c06\u4ec5\u88ab\u53d1\u9001\u7ed9\u4e00\u4e2a\u6d3b\u52a8\uff0c\u800c\u4e0d\u4f1a\u662f\u670d\u52a1\u6216\u5e7f\u64ad\u63a5\u6536\u8005\uff0c\u4f9d\u6b64\u7c7b\u63a8\u3002<\/span><\/p>\n<p>\u672c\u6587\u6863\u5c06\u9996\u5148\u5bf9Intent\u5bf9\u8c61\u8fdb\u884c\u63cf\u8ff0\u3002\u4e4b\u540e\u4ecb\u7ecdAndroid\u7528\u4ee5\u6620\u5c04\u610f\u56fe\u81f3\u7ec4\u5efa\u7684\u89c4\u5219\u2014\u2014\u5b83\u5982\u4f55\u4e86\u89e3\u54ea\u4e00\u4e2a\u7ec4\u5efa\u5e94\u5f53\u63a5\u6536\u610f\u56fe\u6d88\u606f\u3002\u5bf9\u4e8e\u6ca1\u6709\u663e\u5f0f\u5730\u547d\u540d\u76ee\u6807\u7ec4\u4ef6\u7684\u610f\u56fe\uff0c\u8fd9\u4e2a\u8fc7\u7a0b\u5c06\u5305\u62ec\u4f7f\u7528\u4e0e\u53ef\u80fd\u5bf9\u8c61\u5173\u8054\u7684<em>\u610f\u56fe\u8fc7\u6ee4\u5668<\/em>\uff08intent filter)\u6765\u6d4b\u8bd5Intent\u5bf9\u8c61\u3002<\/p>\n<h3><strong>Intent\u5bf9\u8c61<\/strong><\/h3>\n<p>Intent\u5bf9\u8c61\u662f\u4e00\u6346\u6570\u636e\u3002\u5b83\u5305\u542b\u4e86\u63a5\u53d7\u8be5\u610f\u56fe\u7684\u7ec4\u4ef6\u6240\u611f\u5174\u8da3\u7684\u4fe1\u606f\uff08\u4f8b\u5982\u8981\u91c7\u53d6\u7684\u64cd\u4f5c\u53ca\u64cd\u4f5c\u7684\u5bf9\u8c61\u6570\u636e\uff09\u53caAndroid\u7cfb\u7edf\u6240\u9700\u7684\u4fe1\u606f\uff08\u4f8b\u5982\u8981\u5904\u7406\u8be5\u610f\u56fe\u7684\u7ec4\u4ef6\u7c7b\u522b\u53ca\u5982\u4f55\u542f\u52a8\u76ee\u6807\u6d3b\u52a8\u7684\u6307\u4ee4\uff09\u3002\u539f\u5219\u4e0a\uff0c\u5b83\u5305\u542b\u4ee5\u4e0b\u5185\u5bb9\uff1a<\/p>\n<p><strong>\u7ec4\u4ef6\u540d\u79f0<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u5e94\u5f53\u5904\u7406\u8be5\u610f\u56fe\u7684\u7ec4\u4ef6\u540d\u79f0\u3002\u8fd9\u90e8\u5206\u662f\u4e00\u4e2aComponentName\u5bf9\u8c61\u2014\u2014\u4e00\u79cd\u76ee\u6807\u7ec4\u4ef6\u7684\u5b8c\u6574\u7c7b\u540d\uff08\u4f8b\u5982<span style=\"color: #008000;\">&#8220;com.example.project.app.FreneticActivity&#8221;<\/span>\uff09\u548c\u7ec4\u4ef6\u6240\u5728\u7a0b\u5e8f\u7684manifest\u6587\u4ef6\u4e2d\u7684\u5305\u540d\u79f0\u7ec4\uff08\u4f8b\u5982<span style=\"color: #008000;\">&#8220;com.example.project&#8221;<\/span>\uff09\u7684\u7ec4\u5408\u3002\u7ec4\u4ef6\u540d\u79f0\u7684\u5305\u90e8\u5206\u548cmanifest\u4e2d\u7684\u5305\u540d\u79f0\u7ec4\u4e0d\u4e00\u5b9a\u8981\u76f8\u540c\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u7ec4\u4ef6\u540d\u79f0\u662f\u53ef\u9009\u7684\u3002\u5982\u679c\u88ab\u8bbe\u5b9a\uff0cIntent\u5bf9\u8c61\u5c06\u88ab\u53d1\u9001\u7ed9\u6307\u5b9a\u7c7b\u7684\u5b9e\u4f8b\u3002\u5982\u679c\u6ca1\u6709\u8bbe\u5b9a\uff0cAndroid\u4f7f\u7528Intent\u5bf9\u8c61\u4e2d\u7684\u5176\u4ed6\u4fe1\u606f\u6765\u9009\u62e9\u5408\u9002\u7684\u76ee\u6807\u2014\u2014\u53c2\u89c1\u672c\u6587\u6863\u4e2d\u4e4b\u540e\u7684\u201c\u610f\u56fe\u89e3\u51b3\u65b9\u6848\u201d\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u7ec4\u4ef6\u540d\u79f0\u901a\u8fc7setComponent()\u3001setClass()\u6216setClassName()\u6765\u8bbe\u5b9a\uff0c\u901a\u8fc7getComponent()\u6765\u8bfb\u53d6\u3002<\/p>\n<p><strong>\u884c\u4e3a<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u547d\u540d\u4e86\u8981\u88ab\u6267\u884c\u7684\u884c\u4e3a\u7684\u5b57\u7b26\u4e32\u2014\u2014\u6216\u8005\uff0c\u5bf9\u4e8e\u5e7f\u64ad\u7684\u610f\u56fe\u6765\u8bf4\u5c06\u8981\u53d1\u751f\u5e76\u88ab\u62a5\u544a\u7684\u884c\u4e3a\u3002Intent\u7c7b\u5b9a\u4e49\u4e86\u5f88\u591a\u884c\u4e3a\u5e38\u91cf\uff0c\u5305\u62ec\uff1a<\/p>\n<table style=\"padding-left: 30px;\">\n<tbody>\n<tr>\n<th>\u5e38\u91cf<\/th>\n<th>\u76ee\u6807\u7ec4\u4ef6<\/th>\n<th>\u884c\u4e3a<\/th>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_CALL<\/span><\/code><\/td>\n<td>\u6d3b \u52a8<\/td>\n<td>\u521d\u59cb\u5316\u4e00\u6b21\u7535\u8bdd\u547c\u53eb\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_EDIT<\/span><\/code><\/td>\n<td>\u6d3b \u52a8<\/td>\n<td>\u5411\u7528\u6237\u663e\u793a\u6570\u636e\u4ee5\u4f9b\u7f16\u8f91\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_MAIN<\/span><\/code><\/td>\n<td>\u6d3b \u52a8<\/td>\n<td>\u4f5c\u4e3a\u4e00\u4e2a\u4efb\u52a1\uff08task\uff09\u7684\u9996\u6d3b\u52a8\u542f\u52a8\uff0c\u4e0d\u5305\u542b\u6570\u636e\u8f93\u5165\u4e14\u6ca1\u6709\u8fd4\u56de\u7684\u8f93\u51fa\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_SYNC<\/span><\/code><\/td>\n<td>\u6d3b \u52a8<\/td>\n<td>\u4ee5\u79fb\u52a8\u8bbe\u5907\u4e0a\u7684\u6570\u636e\u540c\u6b65\u670d\u52a1\u5668\u4e0a\u7684\u6570\u636e\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_BATTERY_LOW<\/span><\/code><\/td>\n<td>\u5e7f\u64ad \u63a5\u6536\u8005<\/td>\n<td>\u7535\u91cf\u4f4e\u7684\u8b66\u544a\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_HEADSET_PLUG<\/span><\/code><\/td>\n<td>\u5e7f\u64ad\u63a5\u6536\u8005<\/td>\n<td>\u8033\u673a\u63d2\u5165\u6216\u662f\u62d4\u51fa\u8bbe\u5907\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_SCREEN_ON<\/span><\/code><\/td>\n<td>\u5e7f\u64ad\u63a5\u6536\u8005<\/td>\n<td>\u5c4f\u5e55\u88ab\u6253\u5f00\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">ACTION_TIMEZONE_CHANGED<\/span><\/code><\/td>\n<td>\u5e7f\u64ad\u63a5\u6536\u8005<\/td>\n<td>\u65f6\u533a\u8bbe\u5b9a\u88ab\u6539\u53d8\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"padding-left: 30px;\">\u53c2\u89c1Intent\u7c7b\u7684\u63cf\u8ff0\u4ee5\u83b7\u77e5\u901a\u7528\u884c\u4e3a\u7684\u9884\u5b9a\u4e49\u5e38\u91cf\u5217\u8868\u3002\u5176\u4ed6\u7684\u884c\u4e3a\u5728Android API\u7684\u5176\u4ed6\u90e8\u5206\u88ab\u5b9a\u4e49\u3002\u4e5f\u53ef\u4ee5\u4e3a\u6fc0\u6d3b\u81ea\u5df1\u7684\u7a0b\u5e8f\u4e2d\u7684\u7ec4\u4ef6\u800c\u5b9a\u4e49\u81ea\u6709\u7684\u884c\u4e3a\u5b57\u7b26\u4e32\u3002\u5b83\u4eec\u5e94\u5f53\u5305\u542b\u4f5c\u4e3a\u524d\u7f00\u7684\u7a0b\u5e8f\u5305\u2014\u2014\u4f8b\u5982\uff1a<span style=\"color: #008000;\">&#8220;com.example.project.SHOW_COLOR&#8221;<\/span>\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u884c\u4e3a\u5f88\u5927\u7a0b\u5ea6\u4e0a\u51b3\u5b9a\u4e86\u610f\u56fe\u5269\u4f59\u90e8\u5206\u7684\u7ed3\u6784\u2014\u2014\u7279\u522b\u662f\u6570\u636e\u548c\u989d\u5916\u4fe1\u606f\u2014\u2014\u5c31\u597d\u50cf\u662f\u4e00\u4e2a\u65b9\u6cd5\u7684\u540d\u79f0\u51b3\u5b9a\u4e86\u4e00\u7ec4\u53c2\u6570\u548c\u8fd4\u56de\u503c\u3002\u56e0\u6b64\uff0c\u6700\u597d\u5c3d\u53ef\u80fd\u5177\u4f53\u5730\u4f7f\u7528\u884c\u4e3a\u540d\u79f0\uff0c\u5c06\u5b83\u4eec\u7d27\u5bc6\u5730\u548c\u610f\u56fe\u7684\u5176\u4ed6\u90e8\u5206\u914d\u5bf9\u3002\u6362\u8a00\u4e4b\uff0c\u4e0d\u8981\u5355\u72ec\u5b9a\u4e49\u4e00\u4e2a\u884c\u4e3a\uff0c\u800c\u662f\u8981\u4e3a\u7ec4\u4ef6\u53ef\u4ee5\u5904\u7406\u7684Intent\u5bf9\u8c61\u5b9a\u4e49\u4e00\u6574\u5957\u7684\u534f\u8bae\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u4e00\u4e2aIntent\u5bf9\u8c61\u7684\u884c\u4e3a\u901a\u8fc7setAction()\u65b9\u6cd5\u8bbe\u7f6e\uff0c\u901a\u8fc7getAction()\u6765\u8bfb\u53d6\u3002<\/p>\n<p><strong>\u6570\u636e<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u5c06\u88ab\u6267\u884c\u64cd\u4f5c\u7684\u6570\u636e\u7684URI\u53ca\u6570\u636e\u7684MIME\u7c7b\u578b\u3002\u4e0d\u540c\u7684\u884c\u4e3a\u548c\u4e0d\u540c\u7684\u6570\u636e\u89c4\u683c\u76f8\u5bf9\u5e94\u3002\u4f8b\u5982\uff0c\u5982\u679c\u884c\u4e3a\u57df\u662f<span style=\"color: #008000;\">ACTION_EDIT<\/span>\uff0c\u90a3\u6570\u636e\u57df\u5c31\u9700\u8981\u5305\u542b\u8981\u88ab\u663e\u793a\u4ee5\u7f16\u8f91\u7684\u6587\u6863\u7684URI\u3002\u5982\u679c\u884c\u4e3a\u662f<span style=\"color: #008000;\">ACTION_CALL<\/span>\uff0c\u90a3\u6570\u636e\u57df\u9700\u8981\u662f\u4e00\u4e2a\u8981\u62e8\u6253\u7684\u53f7\u7801\u7684<span style=\"color: #008000;\">tel<\/span>: URI\u3002\u540c\u6837\u5730\uff0c\u5982\u679c\u884c\u4e3a\u662f<span style=\"color: #008000;\">ACTION_VIEW<\/span>\u4e14\u6570\u636e\u57df\u662f<span style=\"color: #008000;\">http<\/span>: URI\uff0c\u90a3\u63a5\u6536\u65b9\u6d3b\u52a8\u5c06\u4f1a\u4e0b\u8f7d\u6216\u663e\u793a\u8be5URI\u6307\u5411\u7684\u4efb\u4f55\u6570\u636e\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u5728\u914d\u5bf9\u4e00\u4e2a\u610f\u56fe\u548c\u4e00\u4e2a\u6709\u80fd\u529b\u5904\u7406\u5176\u6570\u636e\u7684\u7ec4\u4ef6\u65f6\uff0c\u77e5\u9053\u6570\u636e\u7684\u7c7b\u578b\uff08\u5373\u5b83\u7684MIME\u7c7b\u578b\uff09\u4ee5\u53caURI\u662f\u5f88\u91cd\u8981\u7684\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a\u53ef\u4ee5\u663e\u793a\u56fe\u50cf\u6570\u636e\u7684\u7ec4\u5efa\u4e0d\u5e94\u88ab\u8c03\u7528\u6765\u64ad\u653e\u97f3\u9891\u6587\u4ef6\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u5728\u8bb8\u591a\u60c5\u51b5\u4e0b\uff0c\u6570\u636e\u7c7b\u578b\u53ef\u4ee5\u7531URI\u83b7\u77e5\u2014\u2014\u7279\u522b\u662f<span style=\"color: #008000;\">content<\/span>: URI\uff0c\u5b83\u8868\u660e\u6570\u636e\u4f4d\u4e8e\u8bbe\u5907\u4e2d\u5e76\u7531\u4e00\u4e2a\u5185\u5bb9\u63d0\u4f9b\u8005\u6240\u63a7\u5236\uff08\u53c2\u89c1\u53e6\u5916\u7684\u5173\u4e8e\u5185\u5bb9\u63d0\u4f9b\u8005\u7684\u89e3\u8bf4\uff09\u3002\u4e0d\u8fc7\u4e5f\u53ef\u4ee5\u5728Intent\u5bf9\u8c61\u5185\u663e\u5f0f\u5730\u8bbe\u5b9a\u7c7b\u578b\u3002setData()\u65b9\u6cd5\u4ee5\u4ec5URI\u6765\u6307\u5b9a\u6570\u636e\uff0csetType()\u4ec5\u4ee5MIME\u7c7b\u578b\u6765\u6307\u5b9a\u6570\u636e\uff0csetDataAndType()\u540c\u65f6\u4ee5URI\u548cMIME\u7c7b\u578b\u6765\u6307\u5b9a\u6570\u636e\u3002URI\u901a\u8fc7getData()\u8bfb\u53d6\uff0c\u7c7b\u578b\u7531getType()\u8bfb\u53d6\u3002<\/p>\n<p><strong>\u7c7b\u522b<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u4e00\u4e2a\u5305\u542b\u4e86\u5e94\u8be5\u7531\u54ea\u4e00\u79cd\u7c7b\u578b\u7684\u7ec4\u4ef6\u6765\u5904\u7406\u610f\u56fe\u7684\u989d\u5916\u4fe1\u606f\u7684\u5b57\u7b26\u4e32\u3002Intent\u5bf9\u8c61\u4e2d\u53ef\u4ee5\u5b58\u653e\u4efb\u4f55\u6570\u91cf\u7684\u7c7b\u522b\u63cf\u8ff0\u3002\u548c\u884c\u4e3a\u4e00\u6837\uff0cIntent\u7c7b\u5b9a\u4e49\u4e86\u4e00\u4e9b\u7c7b\u522b\u5e38\u91cf\uff0c\u5176\u4e2d\u5305\u62ec\uff1a<\/p>\n<table style=\"padding-left: 30px;\">\n<tbody>\n<tr>\n<th>\u5e38\u91cf<\/th>\n<th>\u610f\u4e49<\/th>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">CATEGORY_BROWSABLE<\/span><\/code><\/td>\n<td>\u76ee\u6807\u6d3b\u52a8\u53ef\u4ee5\u5b89\u5168\u5730\u88ab\u6d4f\u89c8\u5668\u7528\u4e8e\u663e\u793a\u67d0\u4e00\u94fe\u63a5\u6307\u5411\u7684\u6570\u636e\u2014\u2014\u4f8b\u5982\uff0c\u4e00\u5e45\u56fe\u50cf\u6216\u662f\u4e00\u6761\u7535\u5b50\u90ae\u4ef6\u6d88\u606f\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">CATEGORY_GADGET<\/span><\/code><\/td>\n<td>\u8be5\u6d3b\u52a8\u53ef\u4ee5\u88ab\u53e6\u4e00\u4e2a\u6301\u6709\u5c0f\u90e8\u4ef6\uff08gadget\uff09\u7684\u6d3b\u52a8\u5d4c\u4e8e\u5185\u90e8\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">CATEGORY_HOME<\/span><\/code><\/td>\n<td>\u8be5\u6d3b\u52a8\u663e\u793a\u4e3b\u754c\u9762\uff08home screen\uff09\u8fd9\u4e00\u7528\u6237\u542f\u52a8\u8bbe\u5907\u6216\u6309\u4e0bHOME\u952e\u540e\u9996\u5148\u770b\u5230\u7684\u753b\u9762\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">CATEGORY_LAUNCHER<\/span><\/code><\/td>\n<td>\u8be5\u6d3b\u52a8\u662f\u4e00\u4e2a\u4efb\u52a1\u4e2d\u7684\u9996\u6d3b\u52a8\uff0c\u88ab\u5217\u4e8e\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u5668\u7684\u9996\u7ea7\u3002<\/td>\n<\/tr>\n<tr>\n<td><code><span style=\"color: #008000;\">CATEGORY_PREFERENCE<\/span><\/code><\/td>\n<td>\u76ee\u6807\u6d3b\u52a8\u662f\u4e00\u4e2a\u504f\u597d\u8bbe\u7f6e\u9762\u677f\u3002<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"padding-left: 30px;\">\u00a0\u53c2\u89c1Intent\u7c7b\u7684\u63cf\u8ff0\u4ee5\u83b7\u77e5\u5b8c\u6574\u7684\u7c7b\u522b\u5217\u8868\u3002<\/p>\n<p style=\"padding-left: 30px;\">addCategory()\u65b9\u6cd5\u5c06\u4e00\u4e2a\u7c7b\u522b\u5b58\u5165\u4e00\u4e2aIntent\u5bf9\u8c61\uff0cremoveCategory()\u5219\u5220\u9664\u4e4b\u524d\u6dfb\u52a0\u7684\u4e00\u4e2a\u7c7b\u522b\uff0cgetCategories()\u7528\u4e8e\u83b7\u53d6\u5f53\u524d\u5728\u610f\u56fe\u5bf9\u8c61\u5185\u7684\u6574\u4e2a\u7c7b\u522b\u96c6\u3002<\/p>\n<p><strong>\u989d\u5916\u4fe1\u606f<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u5173\u4e8e\u9700\u8981\u88ab\u4f20\u9012\u7ed9\u8981\u5904\u7406\u610f\u56fe\u7684\u7ec4\u4ef6\u7684\u5176\u4ed6\u4fe1\u606f\u7684\u952e\u503c\u5bf9\uff08key-value pair\uff09\u3002\u5982\u540c\u4e00\u4e9b\u884c\u4e3a\u4e0e\u7279\u5b9a\u7c7b\u578b\u7684\u6570\u636eURI\u76f8\u914d\u5bf9\uff0c\u53e6\u4e00\u4e9b\u4f1a\u4e0e\u7279\u5b9a\u7684\u989d\u5916\u4fe1\u606f\u76f8\u914d\u5bf9\u3002\u4f8b\u5982\uff0c\u4e00\u4e2a<span style=\"color: #008000;\">ACTION_TIMEZONE_CHANGED<\/span>\u610f\u56fe\u6709\u4e00\u4e2a\u989d\u5916\u4fe1\u606f\u201c<span style=\"color: #008000;\">time-zone<\/span>\u201d\u6765\u8bc6\u522b\u65b0\u7684\u65f6\u533a\uff0c<span style=\"color: #008000;\">ACTION_HEADSET_PLUG<\/span>\u5219\u6709\u4e00\u4e2a\u989d\u5916\u4fe1\u606f\u201c<span style=\"color: #008000;\">state<\/span>\u201d\u6765\u8bc6\u522b\u8033\u673a\u662f\u88ab\u63d2\u5165\u8fd8\u662f\u62d4\u51fa\uff0c\u53e6\u5916\u8fd8\u6709\u989d\u5916\u4fe1\u606f\u201cname\u201d\u6765\u8bc6\u522b\u8033\u673a\u7684\u7c7b\u578b\u3002\u5982\u679c\u60f3\u8981\u8bbe\u8ba1\u4e00\u4e2a<span style=\"color: #008000;\">SHOW_COLOR<\/span>\u884c\u4e3a\uff0c\u989c\u8272\u7684\u503c\u5c06\u88ab\u8bbe\u7f6e\u4e8e\u4e00\u4e2a\u989d\u5916\u7684\u952e\u503c\u5bf9\u4e4b\u4e2d\u3002<\/p>\n<p style=\"padding-left: 30px;\">Intent\u5bf9\u8c61\u6709\u4e00\u7cfb\u5217\u7684<span style=\"color: #008000;\">put&#8230;()<\/span>\u65b9\u6cd5\u6765\u63d2\u5165\u4e0d\u540c\u7c7b\u578b\u7684\u989d\u5916\u6570\u636e\uff0c\u7c7b\u4f3c\u5730\u6709\u4e00\u7ec4<span style=\"color: #008000;\">get&#8230;()<\/span>\u65b9\u6cd5\u6765\u8bfb\u53d6\u8fd9\u4e9b\u503c\u3002\u8fd9\u4e9b\u65b9\u6cd5\u548cBundle\u5bf9\u8c61\u4e2d\u7684\u76f8\u7c7b\u4f3c\u3002\u4e8b\u5b9e\u4e0a\uff0c\u989d\u5916\u4fe1\u606f\u53ef\u4ee5\u5982\u540c\u4e00\u4e2aBundle\u90a3\u6837\u901a\u8fc7putExtras()\u548cgetExtras()\u65b9\u6cd5\u6765\u88ab\u8bbe\u7f6e\u548c\u8bfb\u53d6\u3002<\/p>\n<p><strong>\u65d7\u6807<\/strong><\/p>\n<p style=\"padding-left: 30px;\">\u5404\u79cd\u7c7b\u578b\u7684\u65d7\u6807\u3002\u5176\u4e2d\u5f88\u591a\u6307\u793a\u4e86Android\u7cfb\u7edf\u5982\u4f55\u53bb\u542f\u52a8\u4e00\u4e2a\u6d3b\u52a8\uff08\u4f8b\u5982\uff0c\u8be5\u6d3b\u52a8\u5e94\u8be5\u5c5e\u4e8e\u54ea\u4e00\u4e2a\u4efb\u52a1\uff09\u4ee5\u53ca\u5728\u542f\u52a8\u540e\u5e94\u8be5\u5982\u4f55\u5904\u7406\u5b83\uff08\u4f8b\u5982\uff0c\u5b83\u662f\u5426\u5e94\u8be5\u5c5e\u4e8e\u6700\u8fd1\u6d3b\u52a8\u5217\u8868\uff09\u3002\u6240\u6709\u7684\u8fd9\u4e9b\u65d7\u6807\u5728Intent\u7c7b\u4e2d\u88ab\u5b9a\u4e49\u3002<\/p>\n<p>Android\u7cfb\u7edf\u548c\u8be5\u5e73\u53f0\u7684\u5e94\u7528\u7a0b\u5e8f\u4f7f\u7528Intent\u5bf9\u8c61\u6765\u53d1\u51fa\u7cfb\u7edf\u521b\u5efa\u7684\u5e7f\u64ad\u53ca\u6fc0\u6d3b\u7cfb\u7edf\u5b9a\u4e49\u7684\u7ec4\u4ef6\u3002\u8981\u4e86\u89e3\u5982\u679c\u6784\u5efa\u4e00\u4e2a\u610f\u56fe\u4ee5\u6fc0\u6d3b\u4e00\u4e2a\u7cfb\u7edf\u7ec4\u4ef6\uff0c\u53c2\u89c1\u9644\u5f55\u4e2d\u7684\u610f\u56fe\u5217\u8868\u3002<\/p>\n<h3><strong>\u610f\u56fe\u7684\u89e3\u51b3\u65b9\u6848<\/strong><\/h3>\n<p>\u610f\u56fe\u53ef\u4ee5\u88ab\u5206\u4e3a\u4e24\u7c7b\uff1a<\/p>\n<ul>\n<li><em>\u663e\u5f0f\u610f\u56fe<\/em>\u901a\u8fc7\u5176\u540d\u79f0\u6307\u5b9a\u76ee\u6807\u7ec4\u4ef6\uff08\u524d\u9762\u63d0\u5230\u8fc7\uff0c\u8be5\u7ec4\u4ef6\u7684\u540d\u79f0\u57df\u6709\u4e00\u4e2a\u503c\u96c6\uff09\u3002\u56e0\u4e3a\u7ec4\u4ef6\u7684\u540d\u79f0\u901a\u5e38\u4e0d\u4f1a\u88ab\u5176\u4ed6\u7a0b\u5e8f\u7684\u5f00\u53d1\u8005\u77e5\u9053\uff0c\u663e\u5f0f\u7684\u610f\u56fe\u5f80\u5f80\u88ab\u7528\u4e8e\u7a0b\u5e8f\u5185\u90e8\u6d88\u606f\u2014\u2014\u4f8b\u5982\u4e00\u4e2a\u6d3b\u52a8\u542f\u52a8\u4e00\u4e2a\u9644\u5c5e\u7684\u670d\u52a1\u6216\u662f\u4e00\u4e2a\u5e73\u7ea7\u7684\u6d3b\u52a8\u3002<\/li>\n<li><em>\u9690\u5f0f\u610f\u56fe<\/em>\u4e0d\u4f1a\u547d\u540d\u76ee\u6807\uff08\u7ec4\u4ef6\u7684\u540d\u79f0\u57df\u662f\u7a7a\u767d\u7684\uff09\u3002\u9690\u5f0f\u610f\u56fe\u5e38\u7528\u4e8e\u6fc0\u6d3b\u5176\u4ed6\u6d3b\u52a8\u4e2d\u7684\u7ec4\u4ef6\u3002<\/li>\n<\/ul>\n<p>Android\u5c06\u4e00\u4e2a\u663e\u5f0f\u610f\u56fe\u4f20\u9012\u7ed9\u6240\u6307\u5b9a\u7684\u76ee\u6807\u7c7b\u7684\u4e00\u4e2a\u5b9e\u4f8b\u3002\u53ea\u6709Intent\u5bf9\u8c61\u4e2d\u7684\u7ec4\u4ef6\u540d\u79f0\u4f1a\u5f71\u54cd\u5230\u610f\u56fe\u6700\u7ec8\u5c06\u88ab\u4f20\u9001\u7ed9\u54ea\u4e00\u4e2a\u7ec4\u4ef6\u3002<\/p>\n<p>\u5bf9\u4e8e\u9690\u5f0f\u610f\u56fe\u9700\u8981\u4e00\u79cd\u4e0d\u540c\u7684\u7b56\u7565\u3002\u7531\u4e8e\u6ca1\u6709\u6307\u5b9a\u7684\u76ee\u6807\uff0cAndroid\u7cfb\u7edf\u5fc5\u987b\u627e\u5230\u6700\u4e3a\u5408\u9002\u7684\u90a3\u4e00\u7ec4\u4ef6\uff08\u6216\u90a3\u4e00\u4e9b\u7ec4\u4ef6\uff09\u2014\u2014\u4e00\u4e2a\u5355\u72ec\u7684\u6267\u884c\u6240\u8bf7\u6c42\u7684\u884c\u52a8\u7684\u6d3b\u52a8\u6216\u670d\u52a1\uff0c\u6216\u662f\u4e00\u7ec4\u5e7f\u64ad\u63a5\u6536\u8005\u6765\u54cd\u5e94\u5e7f\u64ad\u901a\u544a\u3002\u7cfb\u7edf\u901a\u8fc7\u6bd4\u8f83Intent\u5bf9\u8c61\u7684\u5185\u5bb9\u548c\u610f\u56fe\u8fc7\u6ee4\u5668\uff08\u548c\u7ec4\u4ef6\u76f8\u5173\u8054\u7684\u7528\u4ee5\u63a5\u6536\u6f5c\u5728\u610f\u56fe\u7684\u7ed3\u6784\uff09\u6765\u5b9e\u73b0\u8fd9\u4e00\u76ee\u7684\u3002\u8fc7\u6ee4\u5668\u544a\u77e5\u4e86\u4e00\u4e2a\u7ec4\u4ef6\u7684\u529f\u80fd\u5e76\u754c\u5b9a\u4e86\u5b83\u53ef\u4ee5\u5904\u7406\u7684\u610f\u56fe\u3002\u5b83\u4eec\u4f7f\u5f97\u7ec4\u4ef6\u53ef\u80fd\u63a5\u6536\u6240\u544a\u77e5\u7684\u7c7b\u578b\u7684\u9690\u5f0f\u610f\u56fe\u3002\u5982\u679c\u4e00\u4e2a\u7ec4\u4ef6\u6ca1\u6709\u4efb\u4f55\u7684\u610f\u56fe\u8fc7\u6ee4\u5668\uff0c\u5b83\u5c06\u53ea\u80fd\u63a5\u6536\u663e\u793a\u610f\u56fe\u3002\u4e00\u4e2a\u62e5\u6709\u610f\u56fe\u8fc7\u6ee4\u5668\u7684\u7ec4\u4ef6\u53ef\u4ee5\u540c\u65f6\u63a5\u6536\u663e\u5f0f\u548c\u9690\u5f0f\u610f\u56fe\u3002<\/p>\n<p>\u5f53\u4e00\u4e2aIntent\u5bf9\u8c61\u88ab\u610f\u56fe\u8fc7\u6ee4\u5668\u68c0\u67e5\u65f6\u53ea\u6709\u4e09\u4e2a\u65b9\u9762\u4f1a\u88ab\u8003\u8651\uff1a<\/p>\n<p style=\"padding-left: 30px;\"><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u884c\u4e3a<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u6570\u636e\uff08\u540c\u65f6\u5305\u62ecURI\u548c\u6570\u636e\u7c7b\u578b\uff09<\/span><\/p>\n<p style=\"padding-left: 30px;\"><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u7c7b\u522b<\/span><\/p>\n<p>\u989d\u5916\u4fe1\u606f\u548c\u65d7\u6807\u4e0d\u4f1a\u5f71\u54cd\u5230\u51b3\u5b9a\u7531\u54ea\u4e2a\u7ec4\u4ef6\u63a5\u6536\u610f\u56fe\u3002<\/p>\n<h3><strong><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u610f\u56fe\u8fc7\u6ee4\u5668\uff08Intent filter\uff09<\/span><\/strong><\/h3>\n<p><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u4e3a\u4e86\u544a\u77e5\u7cfb\u7edf\u5b83\u53ef\u4ee5\u5904\u7406\u54ea\u4e9b\u9690\u5f0f\u610f\u56fe\uff0c\u6d3b\u52a8\u3001\u670d\u52a1\u548c\u5e7f\u64ad\u63a5\u6536\u8005\u90fd\u53ef\u4ee5\u62e5\u6709\u4e00\u4e2a\u6216\u591a\u4e2a\u610f\u56fe\u8fc7\u6ee4\u5668\u3002\u6bcf\u4e00\u4e2a\u8fc7\u6ee4\u5668\u5c06\u63cf\u8ff0\u7ec4\u4ef6\u7684\u67d0\u4e00\u79cd\u529f\u80fd\u4ee5\u53ca\u8be5\u7ec4\u4ef6\u8981\u63a5\u6536\u7684\u610f\u56fe\u96c6\u3002\u5b83\u6709\u6548\u5730\u8fc7\u6ee4\u4e0b\u6240\u9700\u7684\u7c7b\u578b\uff0c\u6392\u9664\u4e0d\u9700\u8981\u7684\u610f\u56fe\u2014\u2014\u4e0d\u8fc7\u4ec5\u80fd\u6392\u9664\u4e0d\u9700\u8981\u7684\uff08\u672a\u547d\u540d\u76ee\u6807\u7c7b\u7684\uff09\u9690\u5f0f\u610f\u56fe\u3002\u663e\u5f0f\u610f\u56fe\u5c06\u59cb\u7ec8\u88ab\u4f20\u9012\u7ed9\u5176\u76ee\u6807\u800c\u65e0\u8bba\u5b83\u5305\u542b\u4ec0\u4e48\u5185\u5bb9\uff1b\u8fc7\u6ee4\u5668\u4e0d\u4f1a\u8d77\u4f5c\u7528\u3002\u7136\u800c\u4e00\u4e2a\u9690\u5f0f\u610f\u56fe\u5c31\u53ea\u6709\u5728\u901a\u8fc7\u4e86\u7ec4\u4ef6\u7684\u8fc7\u6ee4\u5668\u4e4b\u540e\u624d\u80fd\u591f\u88ab\u4f20\u9012\u7ed9\u7ec4\u4ef6\u3002<\/span><\/p>\n<p><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u4e00\u4e2a\u7ec4\u4ef6\u5bf9\u6bcf\u4e00\u7c7b\u5b83\u53ef\u4ee5\u5904\u7406\u7684\u5de5\u4f5c\u53ca\u7528\u6237\u6240\u80fd\u770b\u89c1\u7684\u6bcf\u4e00\u79cd\u5f62\u5f0f\u5206\u522b\u6709\u7740\u4e0d\u540c\u7684\u8fc7\u6ee4\u5668\u3002\u4f8b\u5982\uff0c\u8303\u4f8b\u4e2dNote Pad\u7a0b\u5e8f\u7684NoteEditor\u6d3b\u52a8\u6709\u4e24\u4e2a\u8fc7\u6ee4\u5668\u2014\u2014\u4e00\u4e2a\u7528\u4e8e\u521b\u5efa\u7528\u6237\u53ef\u4ee5\u67e5\u770b\u5e76\u7f16\u8f91\u7684\u7279\u5b9a\u4fbf\u7b4f\uff0c\u53e6\u4e00\u4e2a\u7528\u4e8e\u542f\u52a8\u4e00\u4e2a\u7a7a\u7684\u7528\u6237\u53ef\u4ee5\u8f93\u5165\u5e76\u4fdd\u5b58\u7684\u65b0\u7684\u4fbf\u7b4f\u3002\uff08Note Pad\u7684\u6240\u6709\u7684\u8fc7\u6ee4\u5668\u5c06\u4f1a\u5728\u4e4b\u540e\u7684Note Pad\u8303\u4f8b\u4e00\u8282\u4e2d\u8be6\u7ec6\u8bf4\u660e\u3002\uff09<\/span><\/p>\n<p><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u4e00\u4e2a\u610f\u56fe\u8fc7\u6ee4\u5668\u662fIntentFilter\u7c7b\u7684\u4e00\u4e2a\u5b9e\u4f8b\u3002\u4e0d\u8fc7\u56e0\u4e3aAndroid\u7cfb\u7edf\u5fc5\u987b\u5728\u542f\u52a8\u4e00\u4e2a\u7ec4\u4ef6\u4e4b\u524d\u77e5\u9053\u5b83\u6240\u5177\u6709\u7684\u529f\u80fd\uff0c\u6240\u4ee5\u610f\u56fe\u8fc7\u6ee4\u5668\u4e00\u822c\u4e0d\u5728Java\u4ee3\u7801\u4e2d\u4f7f\u7528\uff0c\u800c\u662f\u4f5c\u4e3a\u7a0b\u5e8f\u7684manifest\u6587\u4ef6\u4e2d\uff08AndroidManifest.xml\uff09\u7684&lt;intent-filter&gt;\u5143\u7d20\u3002\uff08\u4e0d\u8fc7\u6709\u4e00\u4e2a\u4f8b\u5916\u662f\u5e7f\u64ad\u63a5\u6536\u8005\u7684\u8fc7\u6ee4\u5668\u662f\u901a\u8fc7\u8c03\u7528Context.registerReceiver()\u52a8\u6001\u5730\u5728\u4ee3\u7801\u4e2d\u6ce8\u518c\u7684\uff1b\u5b83\u4eec\u88ab\u4f5c\u4e3aIntentFilter\u5bf9\u8c61\u76f4\u63a5\u521b\u5efa\u3002\uff09<\/span><\/p>\n<p><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u4e00\u4e2a\u8fc7\u6ee4\u5668\u6709\u7740\u548cIntent\u5bf9\u8c61\u4e2d\u7684\u884c\u4e3a\u3001\u6570\u636e\u548c\u7c7b\u522b\u57df\u76f8\u5bf9\u5e94\u7684\u57df\u3002\u4e00\u4e2a\u9690\u5f0f\u610f\u56fe\u5c06\u68c0\u6d4b\u8fc7\u6ee4\u5668\u7684\u6240\u6709\u8fd9\u4e09\u4e2a\u5185\u5bb9\u3002\u8981\u88ab\u4f20\u9012\u7ed9\u67d0\u4e2a\u7ec4\u4ef6\uff0c\u4e00\u4e2a\u610f\u56fe\u5fc5\u987b\u901a\u8fc7\u8be5\u7ec4\u4ef6\u7684\u8fc7\u6ee4\u5668\u7684\u6240\u6709\u4e09\u9879\u68c0\u6d4b\u3002\u5373\u4f7f\u53ea\u6709\u4e00\u9879\u4e0d\u6ee1\u8db3\uff0cAndroid\u7cfb\u7edf\u4e5f\u4e0d\u4f1a\u5c06\u8be5\u610f\u56fe\u4f20\u9012\u7ed9\u7ec4\u4ef6\u2014\u2014\u81f3\u5c11\u4e0d\u4f1a\u662f\u57fa\u4e8e\u8fc7\u6ee4\u5668\u4f20\u9012\u7ed9\u7ec4\u4ef6\u3002\u4e0d\u8fc7\uff0c\u7531\u4e8e\u4e00\u4e2a\u7ec4\u4ef6\u53ef\u4ee5\u6709\u591a\u4e2a\u610f\u56fe\u8fc7\u6ee4\u5668\uff0c\u4e00\u4e2a\u610f\u56fe\u5982\u679c\u65e0\u6cd5\u901a\u8fc7\u5176\u4e2d\u4e00\u4e2a\u8fc7\u6ee4\u5668\u8fd8\u662f\u6709\u53ef\u80fd\u80fd\u901a\u8fc7\u5176\u4ed6\u7684\u7684\u3002<\/span><\/p>\n<p style=\"padding-left: 30px;\"><strong><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u8fc7\u6ee4\u5668\u548c\u5b89\u5168<\/span><\/strong><\/p>\n<p style=\"padding-left: 30px;\"><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u610f\u56fe\u8fc7\u6ee4\u5668\u4e0d\u80fd\u786e\u4fdd\u5b89\u5168\u6027\u3002\u5c3d\u7ba1\u5b83\u53ea\u8ba9\u4e00\u4e2a\u7ec4\u4ef6\u63a5\u53d7\u7279\u5b9a\u7c7b\u578b\u7684\u9690\u5f0f\u610f\u56fe\uff0c\u5b83\u65e0\u6cd5\u963b\u6b62\u663e\u5f0f\u610f\u56fe\u6307\u5411\u76ee\u6807\u7ec4\u4ef6\u3002\u5373\u4f7f\u8fc7\u6ee4\u5668\u7ea6\u675f\u4e86\u610f\u56fe\u4f7f\u5176\u53ea\u80fd\u4f7f\u7528\u5c06\u4f1a\u88ab\u8bf7\u6c42\u5904\u7406\u7279\u5b9a\u7684\u884c\u4e3a\u548c\u6570\u636e\u6e90\u7684\u7ec4\u4ef6\uff0c\u4e00\u4e9b\u4eba\u4ecd\u7136\u53ef\u4ee5\u5c06\u4e00\u4e2a\u663e\u5f0f\u610f\u56fe\u4e0e\u4e0d\u540c\u7684\u884c\u4e3a\u548c\u6570\u636e\u6e90\u7ed3\u5408\u5728\u4e00\u8d77\uff0c\u5e76\u5c06\u76ee\u6807\u4ee5\u7ec4\u4ef6\u7684\u540d\u79f0\u6765\u547d\u540d\u3002<\/span><\/p>\n<p><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u4e0b\u9762\u5c06\u8be6\u7ec6\u63cf\u8ff0\u4e09\u79cd\u68c0\u6d4b\u662f\u5982\u4f55\u8fdb\u884c\u7684\uff1a<\/span><\/p>\n<p><strong>\u884c\u4e3a\u68c0\u6d4b<\/strong><\/p>\n<p>manifest\u6587\u4ef6\u4e2d\u7684\u4e00\u4e2a&lt;intent-filter&gt;\u5143\u7d20\u4ee5&lt;action&gt;\u5b50\u5143\u7d20\u7684\u5f62\u5f0f\u5217\u51fa\u4e86\u884c\u4e3a\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter<span style=\"color: #000000;\"> . . .<\/span> &gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"com.example.project.SHOW_CURRENT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"com.example.project.SHOW_RECENT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"com.example.project.SHOW_PENDING\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000000;\">\u00a0 \u00a0 . . .<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p>\u5982\u540c\u793a\u4f8b\u6240\u5c55\u793a\u7684\uff0c\u4e00\u4e2aIntent\u5bf9\u8c61\u53ea\u547d\u540d\u4e00\u4e2a\u5355\u72ec\u7684\u884c\u4e3a\uff0c\u800c\u4e00\u4e2a\u8fc7\u6ee4\u5668\u53ef\u4ee5\u5217\u51fa\u591a\u4e2a\u884c\u4e3a\u3002\u5217\u8868\u4e0d\u80fd\u4e3a\u7a7a\uff1b\u4e00\u4e2a\u8fc7\u6ee4\u5668\u81f3\u5c11\u8981\u5305\u542b\u4e00\u4e2a<span style=\"color: #008000;\">&lt;action&gt;<\/span>\u5143\u7d20\uff0c\u5426\u5219\u5b83\u5c06\u5c4f\u853d\u6240\u6709\u7684\u610f\u56fe\u3002<\/p>\n<p>\u8981\u901a\u8fc7\u8fd9\u4e2a\u68c0\u6d4b\uff0c\u5728Intent\u5bf9\u8c61\u4e2d\u6307\u5b9a\u7684\u884c\u4e3a\u5fc5\u987b\u4e0e\u8fc7\u6ee4\u5668\u6240\u5217\u51fa\u7684\u884c\u4e3a\u4e4b\u4e00\u76f8\u5339\u914d\u3002\u5982\u679c\u8be5\u5bf9\u8c61\u6216\u662f\u8fc7\u6ee4\u5668\u6ca1\u6709\u6307\u5b9a\u4e00\u4e2a\u884c\u4e3a\uff0c\u5c31\u4f1a\u6709\u4e0b\u9762\u7684\u7ed3\u679c\uff1a<\/p>\n<ul>\n<li>\u5982\u679c\u8fc7\u6ee4\u5668\u6ca1\u6709\u5217\u51fa\u4efb\u4f55\u884c\u4e3a\uff0c\u5c31\u6ca1\u6709\u884c\u4e3a\u53ef\u4ee5\u4e0e\u610f\u56fe\u76f8\u5339\u914d\uff0c\u6240\u6709\u7684\u610f\u56fe\u90fd\u65e0\u6cd5\u901a\u8fc7\u68c0\u6d4b\u3002\u6ca1\u6709\u610f\u56fe\u53ef\u4ee5\u901a\u8fc7\u8fc7\u6ee4\u5668\u3002<\/li>\n<li>\u53e6\u4e00\u65b9\u9762\uff0c\u5982\u679cIntent\u5bf9\u8c61\u6ca1\u6709\u6307\u5b9a\u4efb\u4f55\u7684\u884c\u4e3a\uff0c\u5b83\u5c06\u81ea\u52a8\u901a\u8fc7\u68c0\u6d4b\u2014\u2014\u53ea\u8981\u8fc7\u6ee4\u5668\u542b\u6709\u4e00\u4e2a\u6216\u4ee5\u4e0a\u7684\u884c\u4e3a\u3002<\/li>\n<\/ul>\n<p><strong>\u7c7b\u522b\u68c0\u6d4b<\/strong><\/p>\n<p>&lt;intent-filter&gt;\u4e5f\u4f1a\u5c06\u7c7b\u522b\u4f5c\u4e3a\u5b50\u5143\u7d20\u5217\u51fa\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter<span style=\"color: #000000;\"> . . .<\/span> &gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category<span style=\"color: #800080;\"> android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.BROWSABLE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000000;\">\u00a0 \u00a0 . . .<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p>\u6ce8\u610f\u4e4b\u524d\u63cf\u8ff0\u8fc7\u7684\u8868\u793a\u884c\u4e3a\u548c\u7c7b\u578b\u7684\u5e38\u91cf\u4e0d\u5728mainfest\u6587\u4ef6\u4e2d\u88ab\u4f7f\u7528\u3002\u800c\u662f\u4f7f\u7528\u5b8c\u6574\u7684\u5b57\u7b26\u4e32\u503c\u3002\u4f8b\u5982\uff0c\u5728\u8303\u4f8b\u4e2d\u7684<span style=\"color: #008000;\">&#8220;android.intent.category.BROWSABLE&#8221;<\/span>\u5b57\u7b26\u4e32\u548c\u6587\u6863\u4e4b\u524d\u63d0\u5230\u7684<span style=\"color: #008000;\">CATEGORY_BROWSABLE<\/span>\u5e38\u91cf\u76f8\u5bf9\u5e94\u3002\u7c7b\u4f3c\u5730\uff0c\u5b57\u7b26\u4e32<span style=\"color: #008000;\">&#8220;android.intent.action.EDIT&#8221;<\/span>\u548c<span style=\"color: #008000;\">ACTION_EDIT<\/span>\u5e38\u91cf\u76f8\u5bf9\u5e94\u3002<\/p>\n<p>\u4e00\u4e2a\u610f\u56fe\u8981\u901a\u8fc7\u7c7b\u522b\u68c0\u6d4b\uff0cIntent\u5bf9\u8c61\u4e2d\u7684\u6bcf\u4e00\u4e2a\u7c7b\u522b\u90fd\u5fc5\u987b\u4e0e\u8fc7\u6ee4\u5668\u4e2d\u7684\u67d0\u4e2a\u7c7b\u522b\u76f8\u5339\u914d\u3002\u8fc7\u6ee4\u5668\u53ef\u4ee5\u5217\u51fa\u5176\u4ed6\u66f4\u591a\u7684\u7c7b\u522b\uff0c\u4f46\u4e0d\u80fd\u7701\u7565\u4efb\u4f55\u4e00\u4e2a\u610f\u56fe\u4e2d\u542b\u6709\u7684\u7c7b\u522b\u3002<\/p>\n<p>\u539f\u5219\u4e0a\uff0c\u6240\u4ee5\u8bf4\uff0c\u4e00\u4e2a\u4e0d\u542b\u6709\u7c7b\u522b\u7684Intent\u5bf9\u8c61\uff0c\u65e0\u8bba\u8fc7\u6ee4\u5668\u4e2d\u6709\u54ea\u4e9b\u7c7b\u522b\uff0c\u603b\u662f\u80fd\u591f\u901a\u8fc7\u8fd9\u9879\u68c0\u6d4b\u3002\u8fd9\u901a\u5e38\u662f\u6b63\u786e\u7684\u3002\u4e0d\u8fc7\uff0c\u6709\u4e00\u4e2a\u4f8b\u5916\uff0cAndroid\u628a\u6240\u6709\u4f20\u9012\u7ed9startActivity()\u7684\u9690\u5f0f\u610f\u56fe\u89c6\u4e3a\u5b83\u4eec\u5305\u542b\u4e86\u81f3\u5c11\u8fd9\u6837\u4e00\u4e2a\u7c7b\u522b\uff1a<span style=\"color: #008000;\">&#8220;android.intent.category.DEFAULT&#8221;<\/span>\uff08<span style=\"color: #008000;\">CATEGORY_DEFAULT<\/span>\u5e38\u91cf\uff09\u3002\u56e0\u6b64\uff0c\u8981\u63a5\u53d7\u9690\u5f0f\u610f\u56fe\u7684\u6d3b\u52a8\u5fc5\u987b\u5728\u5176\u610f\u56fe\u8fc7\u6ee4\u5668\u4e2d\u5305\u542b\u6709<span style=\"color: #008000;\">&#8220;android.intent.category.DEFAULT&#8221;<\/span>\u3002\uff08\u8bbe\u6709<span style=\"color: #008000;\">&#8220;android.intent.action.MAIN&#8221;<\/span>\u548c<span style=\"color: #008000;\">&#8220;android.intent.category.LAUNCHER&#8221;<\/span>\u7684\u8fc7\u6ee4\u5668\u4e0d\u5728\u6b64\u8303\u56f4\u4e4b\u4e2d\u3002\u5b83\u4eec\u5c06\u6d3b\u52a8\u6807\u8bb0\u4e3a\u4e86\u65b0\u4efb\u52a1\u7684\u5f00\u59cb\uff0c\u5e76\u663e\u793a\u5728\u5e94\u7528\u542f\u52a8\u5668\uff08launcher\uff09\u5c4f\u5e55\u4e0a\u3002\u5b83\u4eec\u53ef\u4ee5\u5728\u7c7b\u522b\u5217\u8868\u4e2d\u5305\u542b<span style=\"color: #008000;\">&#8220;android.intent.category.DEFAULT&#8221;<\/span>\uff0c\u4e0d\u8fc7\u8fd9\u5e76\u4e0d\u662f\u5fc5\u987b\u7684\u3002\uff09\u53c2\u89c1\u4e4b\u540e\u7684\u201c\u4f7f\u7528\u610f\u56fe\u5339\u914d\u201d\u6765\u8fdb\u4e00\u6b65\u4e86\u89e3\u8fd9\u4e9b\u8fc7\u6ee4\u5668\u3002<\/p>\n<p><strong>\u6570\u636e\u68c0\u6d4b<\/strong><\/p>\n<p>\u5982\u540c\u884c\u4e3a\u548c\u7c7b\u522b\uff0c\u610f\u56fe\u8fc7\u6ee4\u5668\u7684\u7684\u6570\u636e\u7c7b\u578b\u4e5f\u662f\u4f5c\u4e3a\u5b50\u5143\u7d20\u4fdd\u5b58\u7684\u3002\u800c\u4e14\u548c\u5b83\u4eec\u4e00\u6837\uff0c\u8fd9\u4e9b\u5b50\u5143\u7d20\u53ef\u4ee5\u51fa\u73b0\u591a\u6b21\u6216\u5b8c\u5168\u4e0d\u51fa\u73b0\u3002\u4f8b\u5982\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter . . . &gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"video\/mpeg\"<\/span> <span style=\"color: #800080;\">android:scheme<\/span>=<span style=\"color: #008000;\">\"http\"<\/span> . . . \/&gt; <\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"audio\/mpeg\"<\/span> <span style=\"color: #800080;\">android:scheme<\/span>=<span style=\"color: #008000;\">\"http\"<\/span> . . . \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 . . .<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p>\u6bcf\u4e00\u4e2a&lt;data&gt;\u5143\u7d20\u53ef\u4ee5\u6307\u5b9a\u4e00\u4e2aURI\u548c\u6570\u636e\u7c7b\u578b\uff08MINE\u5a92\u4f53\u7c7b\u578b\uff09\u3002URI\u7684\u6bcf\u4e00\u4e2a\u90e8\u5206\u7531\u4e0d\u540c\u7684\u5c5e\u6027\u2014\u2014<span style=\"color: #008000;\">\u6a21\u5f0f<\/span>\uff08scheme\uff09\u3001<span style=\"color: #008000;\">\u4e3b\u673a<\/span>\uff08host\uff09\u3001<span style=\"color: #008000;\">\u63a5\u53e3<\/span>\uff08port\uff09\u548c<span style=\"color: #008000;\">\u8def\u5f84<\/span>\uff08path\uff09\u3002<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #008000;\">scheme:\/\/host:port\/path<\/span><\/p>\n<p>\u4f8b\u5982\uff0c\u4e0b\u9762\u7684URI\uff0c<\/p>\n<p style=\"padding-left: 30px;\"><span style=\"color: #008000;\">content:\/\/com.example.project:200\/folder\/subfolder\/etc<\/span><\/p>\n<p>\u5176\u6a21\u5f0f\u662f<span style=\"color: #008000;\">&#8220;content&#8221;<\/span>\uff0c\u4e3b\u673a\u662f<span style=\"color: #008000;\">&#8220;com.example.project&#8221;<\/span>\uff0c\u63a5\u53e3\u662f<span style=\"color: #008000;\">&#8220;200&#8221;<\/span>\uff0c\u8def\u5f84\u662f<span style=\"color: #008000;\">&#8220;folder\/subfolder\/etc&#8221;<\/span>\u3002\u4e3b\u673a\u548c\u63a5\u53e3\u5171\u540c\u6784\u6210\u4e86URI\u7684\u6388\u6743\uff1b\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u4e3b\u673a\uff0c\u90a3\u4e48\u63a5\u53e3\u5c06\u88ab\u5ffd\u7565\u3002<\/p>\n<p>\u6bcf\u4e00\u4e2a\u5c5e\u6027\u90fd\u662f\u53ef\u9009\u7684\uff0c\u4f46\u5e76\u975e\u4e0e\u5176\u4ed6\u5c5e\u6027\u76f8\u4e92\u72ec\u7acb\uff1a\u8981\u8ba9\u4e00\u4e2a\u6388\u6743\u53d8\u5f97\u6709\u610f\u4e49\uff0c\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u6a21\u5f0f\u3002\u8981\u8ba9\u8def\u5f84\u5177\u6709\u610f\u4e49\uff0c\u5fc5\u987b\u6307\u5b9a\u4e00\u4e2a\u6a21\u5f0f\u548c\u4e00\u4e2a\u6388\u6743\u3002<\/p>\n<p>\u5f53\u4e00\u4e2aIntent\u5bf9\u8c61\u4e2d\u7684URI\u548c\u8fc7\u6ee4\u5668\u4e2d\u7684URI\u76f8\u6bd4\u8f83\u65f6\uff0c\u4ec5\u6bd4\u8f83\u8fc7\u6ee4\u5668\u4e2d\u6240\u5305\u542b\u7684URI\u90e8\u5206\u3002\u4f8b\u5982\uff0c\u5982\u679c\u4e00\u4e2a\u8fc7\u6ee4\u5668\u4ec5\u6307\u5b9a\u4e86\u4e00\u4e2a\u6a21\u5f0f\uff0c\u90a3\u6240\u6709\u5177\u6709\u8fd9\u4e2a\u6a21\u5f0f\u7684URI\u5c31\u4e0e\u8fc7\u6ee4\u5668\u76f8\u5339\u914d\u3002\u5982\u679c\u8fc7\u6ee4\u5668\u6307\u5b9a\u4e86\u4e00\u4e2a\u6a21\u5f0f\u53ca\u4e00\u4e2a\u6388\u6743\u4f46\u662f\u6ca1\u6709\u6307\u5b9a\u8def\u5f84\uff0c\u90a3\u4e48\u65e0\u8bba\u662f\u4ec0\u4e48\u8def\u5f84\uff0c\u5177\u6709\u76f8\u540c\u6a21\u5f0f\u548c\u6388\u6743\u7684URI\u5c06\u5f97\u5230\u5339\u914d\u3002\u5982\u679c\u8fc7\u6ee4\u5668\u6307\u5b9a\u4e86\u6a21\u5f0f\u3001\u6388\u6743\u548c\u8def\u5f84\uff0c\u90a3\u5c31\u53ea\u6709\u5177\u6709\u76f8\u540c\u6a21\u5f0f\u3001\u6388\u6743\u548c\u8def\u5f84\u7684URI\u5f97\u5230\u5339\u914d\u3002\u4e0d\u8fc7\uff0c\u8fc7\u6ee4\u5668\u4e2d\u6307\u5b9a\u7684\u8def\u5f84\u53ef\u4ee5\u5305\u542b\u901a\u914d\u7b26\u4ee5\u4ec5\u4ec5\u9650\u5b9a\u90e8\u5206\u8def\u5f84\u3002<\/p>\n<p>\u4e00\u4e2a<span style=\"color: #008000;\">&lt;data&gt;<\/span>\u5143\u7d20\u7684\u7c7b\u578b\uff08<span style=\"color: #008000;\">type<\/span>\uff09\u5c5e\u6027\u6307\u5b9a\u4e86\u6570\u636e\u7684MINE\u7c7b\u578b\u3002\u5728\u8fc7\u6ee4\u5668\u4e2d\u8fd9\u6bd4URI\u66f4\u4e3a\u5e38\u89c1\u3002Intent\u5bf9\u8c61\u548c\u8fc7\u6ee4\u5668\u90fd\u53ef\u4ee5\u7528&#8221;*&#8221;\u901a\u914d\u7b26\u4f5c\u4e3a\u5b50\u7c7b\u522b\u57df\u6765\u6807\u8bc6\u5b50\u7c7b\u522b\u5339\u914d\uff0c\u4f8b\u5982<span style=\"color: #008000;\">&#8220;text\/*&#8221;<\/span>\u6216<span style=\"color: #008000;\">&#8220;audio\/*&#8221;<\/span>\u3002<\/p>\n<p>\u6570\u636e\u68c0\u6d4b\u540c\u65f6\u5c06Intent\u5bf9\u8c61\u4e2d\u7684URI\u548c\u6570\u636e\u7c7b\u578b\u4e0e\u8fc7\u6ee4\u5668\u4e2d\u7684URI\u548c\u6570\u636e\u7c7b\u578b\u76f8\u6bd4\u8f83\u3002\u8be5\u8fc7\u7a0b\u9075\u5faa\u4ee5\u4e0b\u89c4\u5219\uff1a<\/p>\n<ul>\n<li>\u4e0d\u5305\u542bURI\u548c\u6570\u636e\u7c7b\u578b\u7684Intent\u5bf9\u8c61\u53ea\u6709\u5728\u8fc7\u6ee4\u5668\u4e5f\u4e0d\u6307\u5b9a\u4efb\u4f55URI\u53ca\u6570\u636e\u7c7b\u578b\u65f6\u624d\u80fd\u901a\u8fc7\u68c0\u6d4b\u3002<\/li>\n<li>\u5305\u542bURI\u4f46\u4e0d\u5305\u542b\u6570\u636e\u7c7b\u578b\uff08\u4e14\u6570\u636e\u7c7b\u578b\u4e0d\u80fd\u901a\u8fc7URI\u63a8\u65ad\u51fa\u6765\uff09\u7684Intent\u5bf9\u8c61\u53ea\u6709\u5728\u5176URI\u4e0e\u8fc7\u6ee4\u5668\u4e2d\u7684URI\u76f8\u5339\u914d\u4e14\u8fc7\u6ee4\u5668\u540c\u6837\u6ca1\u6709\u6307\u5b9a\u7c7b\u578b\u65f6\u624d\u80fd\u901a\u8fc7\u68c0\u6d4b\u3002\u8fd9\u662f\u4ec5\u4ec5\u5728\u7c7b\u4f3cmailto:\u548ctel:\u8fd9\u6837\u6ca1\u6709\u6307\u5411\u5b9e\u9645\u6570\u636e\u7684URI\u65f6\u624d\u4f1a\u51fa\u73b0\u7684\u60c5\u51b5\u3002<\/li>\n<li>\u5305\u542b\u6570\u636e\u7c7b\u578b\u4f46\u4e0d\u5305\u542bURI\u7684Intent\u5bf9\u8c61\u53ea\u6709\u5728\u8fc7\u6ee4\u5668\u5217\u51fa\u4e86\u76f8\u540c\u7684\u6570\u636e\u7c7b\u578b\u800c\u6ca1\u6709\u6307\u5b9aURI\u65f6\u624d\u80fd\u901a\u8fc7\u68c0\u6d4b\u3002<\/li>\n<li>\u540c\u65f6\u5305\u542b\u6709URI\u548c\u6570\u636e\u7c7b\u578b\uff08\u6216URI\u53ef\u4ee5\u63a8\u5bfc\u51fa\u6570\u636e\u7c7b\u578b\uff09\u7684Intent\u5bf9\u8c61\u5728\u5176\u6570\u636e\u7c7b\u578b\u4e0e\u8fc7\u6ee4\u5668\u4e2d\u5217\u51fa\u7684\u7c7b\u578b\u76f8\u5339\u914d\u65f6\u901a\u8fc7\u68c0\u6d4b\u7684\u6570\u636e\u7c7b\u578b\u90e8\u5206\u3002\u5f53\u5176URI\u4e0e\u8fc7\u6ee4\u5668\u4e2d\u7684URI\u76f8\u5339\u914d\uff0c\u6216\uff0c\u5176\u5177\u6709\u4e00\u4e2a<span style=\"color: #008000;\">content:<\/span>\u6216<span style=\"color: #008000;\">file:<\/span>URI\u5e76\u4e14\u8fc7\u6ee4\u5668\u6ca1\u6709\u6307\u5b9aURI\u65f6\uff0c\u901a\u8fc7\u6d4b\u8bd5\u7684URI\u90e8\u5206\u3002\u6362\u8a00\u4e4b\uff0c\u5982\u679c\u8fc7\u6ee4\u5668\u4ec5\u5217\u51fa\u4e86\u6570\u636e\u7c7b\u578b\uff0c\u4e00\u4e2a\u7ec4\u4ef6\u5c06\u88ab\u5047\u5b9a\u652f\u6301<span style=\"color: #008000;\">content:<\/span>\u548c<span style=\"color: #008000;\">file:<\/span>\u6570\u636e\u3002<\/li>\n<\/ul>\n<p><span class=\"Apple-style-span\" style=\"font-size: 14px; line-height: 21px;\">\u5982\u679c\u4e00\u4e2a\u610f\u56fe\u53ef\u4ee5\u901a\u8fc7\u4e0d\u6b62\u4e00\u4e2a\u6d3b\u52a8\u6216\u670d\u52a1\u7684\u8fc7\u6ee4\u5668\uff0c\u7528\u6237\u5c06\u88ab\u8be2\u95ee\u8981\u6fc0\u6d3b\u54ea\u4e00\u4e2a\u7ec4\u4ef6\u3002\u5982\u679c\u6ca1\u6709\u4e00\u4e2a\u76ee\u6807\u80fd\u88ab\u627e\u5230\uff0c\u5219\u4f1a\u629b\u51fa\u4e00\u4e2a\u4f8b\u5916\u3002<br \/>\n<\/span><\/p>\n<h3><strong>\u5e38\u89c1\u60c5\u51b5<\/strong><\/h3>\n<p>\u4e0a\u9762\u6570\u636e\u68c0\u6d4b\u4e2d\u7684\u6700\u540e\u4e00\u6761\u89c4\u5219\uff0c\u8bf4\u660e\u4e86\u7ec4\u4ef6\u53ef\u4ee5\u4ece\u4e00\u4e2a\u6587\u4ef6\u6216\u662f\u5185\u5bb9\u63d0\u4f9b\u8005\u5904\u83b7\u53d6\u672c\u5730\u6570\u636e\u3002\u56e0\u6b64\uff0c\u5b83\u4eec\u7684\u8fc7\u6ee4\u5668\u53ef\u4ee5\u4ec5\u4ec5\u5217\u51fa\u6570\u636e\u7c7b\u578b\u800c\u4e0d\u9700\u8981\u663e\u5f0f\u5730\u547d\u540d<span style=\"color: #008000;\">content:<\/span>\u548c<span style=\"color: #008000;\">file:<\/span>\u6a21\u5f0f\u3002\u8fd9\u662f\u4e00\u79cd\u5178\u578b\u7684\u60c5\u51b5\u3002\u6bd4\u5982\u8bf4\uff0c\u4e00\u4e2a\u5982\u4e0b\u7684<span style=\"color: #008000;\">&lt;data&gt;<\/span>\u5143\u7d20\uff0c\u544a\u8bc9Android\u7ec4\u4ef6\u53ef\u4ee5\u4ece\u5185\u5bb9\u63d0\u4f9b\u8005\u5904\u83b7\u53d6\u56fe\u50cf\u6570\u636e\u5e76\u663e\u793a\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"image\/*\"<\/span> \/&gt;<\/span><\/pre>\n<p>\u56e0\u4e3a\u5927\u90e8\u5206\u53ef\u7528\u7684\u6570\u636e\u7531\u6570\u636e\u63d0\u4f9b\u8005\u5206\u53d1\uff0c\u6240\u4ee5\u6307\u5b9a\u4e86\u6570\u636e\u7c7b\u578b\u800c\u6ca1\u6709\u6307\u5b9aURI\u7684\u8fc7\u6ee4\u5668\u4e5f\u8bb8\u662f\u6700\u4e3a\u5e38\u89c1\u7684\u4e86\u3002<\/p>\n<p>\u53e6\u4e00\u79cd\u5e38\u89c1\u7684\u60c5\u51b5\u662f\u8fc7\u6ee4\u5668\u6307\u5b9a\u4e86\u6a21\u5f0f\u548c\u6570\u636e\u7c7b\u578b\u3002\u4f8b\u5982\uff0c\u5982\u4e0b\u7684\u4e00\u4e2a<span style=\"color: #008000;\">&lt;data&gt;<\/span>\u5143\u7d20\u544a\u8bc9Android\u7ec4\u4ef6\u53ef\u4ee5\u4ece\u7f51\u7edc\u83b7\u53d6\u89c6\u9891\u6570\u636e\u5e76\u64ad\u653e\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;data<\/span> <span style=\"color: #800080;\">android:scheme<\/span>=<span style=\"color: #008000;\">\"http\"<\/span> <span style=\"color: #800080;\">android:type<\/span>=<span style=\"color: #008000;\">\"video\/*\"<\/span> <span style=\"color: #000080;\">\/&gt;<\/span><\/pre>\n<p>\u8bd5\u60f3\uff0c\u4f8b\u5982\uff0c\u6d4f\u89c8\u5668\u7c7b\u5e94\u7528\u5728\u7528\u6237\u6253\u5f00\u7f51\u9875\u4e0a\u7684\u4e00\u4e2a\u94fe\u63a5\u540e\u5c06\u505a\u4ec0\u4e48\u3002\u5b83\u9996\u5148\u5c1d\u8bd5\u663e\u793a\u6570\u636e\uff08\u5982\u679c\u8be5\u94fe\u63a5\u662f\u4e00\u4e2aHTML\u9875\u9762\u7684\u8bdd\uff09\u3002\u5982\u679c\u5b83\u65e0\u6cd5\u663e\u793a\u6570\u636e\uff0c\u5b83\u5c06\u751f\u6210\u4e00\u4e2a\u5305\u542b\u6a21\u5f0f\u548c\u6570\u636e\u7c7b\u578b\u7684\u9690\u5f0f\u610f\u56fe\u5e76\u8bd5\u56fe\u542f\u52a8\u4e00\u4e2a\u53ef\u4ee5\u5904\u7406\u8be5\u5de5\u4f5c\u7684\u6d3b\u52a8\u3002\u5982\u679c\u6ca1\u6709\u5408\u9002\u7684\u6d3b\u52a8\uff0c\u5b83\u5c06\u8bf7\u6c42\u4e0b\u8f7d\u7ba1\u7406\u5668\u4e0b\u8f7d\u8be5\u6570\u636e\u3002\u8fd9\u5904\u4e8e\u5185\u5bb9\u63d0\u4f9b\u8005\u7684\u63a7\u5236\u4e4b\u4e0b\uff0c\u6240\u4ee5\u6709\u5927\u91cf\u7684\u53ef\u80fd\u5408\u9002\u7684\u6d3b\u52a8\uff08\u5b83\u4eec\u7684\u8fc7\u6ee4\u5668\u4ec5\u6307\u5b9a\u4e86\u6570\u636e\u7c7b\u578b\uff09\u5c06\u80fd\u591f\u505a\u51fa\u54cd\u5e94\u3002<\/p>\n<p>\u5927\u90e8\u5206\u7a0b\u5e8f\u8fd8\u6709\u4e00\u79cd\u4e0d\u9700\u8981\u4efb\u4f55\u6307\u5b9a\u6570\u636e\u5f15\u7528\u7684\u5f00\u59cb\u5237\u65b0\u7684\u65b9\u6cd5\u3002\u80fd\u591f\u521d\u59cb\u5316\u4e00\u4e2a\u7a0b\u5e8f\u7684\u6d3b\u52a8\u6709\u7740\u5c06\u884c\u4e3a\u6307\u5b9a\u4e3a&#8221;android.intent.action.MAIN&#8221;\u7684\u8fc7\u6ee4\u5668\u3002\u5982\u679c\u5b83\u4eec\u9700\u8981\u88ab\u663e\u793a\u5728\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u5668\u4e2d\u7684\u8bdd\uff0c\u5b83\u4eec\u8fd8\u9700\u8981\u88ab\u6307\u5b9a\u4e3a&#8221;android.intent.category.LAUNCHER&#8221;\u7c7b\u522b\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter . . . &gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"code android.intent.action.MAIN\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"code android.intent.category.LAUNCHER\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<h3><strong>\u4f7f\u7528\u610f\u56fe\u5339\u914d<\/strong><\/h3>\n<p>\u5c06\u610f\u56fe\u4e0e\u610f\u56fe\u8fc7\u6ee4\u5668\u76f8\u5339\u914d\u4e0d\u4ec5\u4ec5\u662f\u4e3a\u4e86\u5bfb\u627e\u8981\u6fc0\u6d3b\u7684\u67d0\u4e00\u76ee\u6807\u7ec4\u4ef6\uff0c\u540c\u65f6\u4e5f\u662f\u8981\u83b7\u53d6\u8bbe\u5907\u4e0a\u7684\u67d0\u4e00\u7ec4\u7ec4\u4ef6\u7684\u67d0\u4e9b\u5c5e\u6027\u3002\u4f8b\u5982\uff0cAndroid\u7cfb\u7edf\u901a\u8fc7\u67e5\u627e\u6240\u6709\u5177\u6709\u6307\u5b9a\u4e86<span style=\"color: #008000;\">&#8220;android.intent.action.MAIN&#8221;<\/span>\u884c\u4e3a\u548c<span style=\"color: #008000;\">&#8220;android.intent.category.LAUNCHER&#8221;<\/span>\u7c7b\u522b\u7684\u8fc7\u6ee4\u5668\u7684\u6d3b\u52a8\uff08\u5982\u524d\u4e00\u8282\u6240\u793a\uff09\u6765\u5f39\u51fa\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u5668\u8fd9\u4e00\u5217\u51fa\u4e86\u6240\u6709\u53ef\u4f9b\u7528\u6237\u542f\u52a8\u7684\u7a0b\u5e8f\u7684\u9876\u5c42\u5c4f\u5e55\u5185\u5bb9\u3002\u4e4b\u540e\u5b83\u5728\u542f\u52a8\u5668\u4e2d\u663e\u793a\u90a3\u4e9b\u6d3b\u52a8\u7684\u56fe\u6807\uff08icon\uff09\u548c\u6807\u7b7e\uff08label\uff09\u3002\u540c\u6837\u5730\uff0c\u5b83\u901a\u8fc7\u67e5\u627e\u5177\u6709<span style=\"color: #008000;\">&#8220;android.intent.category.HOME&#8221;<\/span>\u7c7b\u522b\u7684\u8fc7\u6ee4\u5668\u7684\u6d3b\u52a8\u6765\u663e\u793a\u4e3b\u754c\u9762\u3002<\/p>\n<p>\u7a0b\u5e8f\u53ef\u4ee5\u4ee5\u4e00\u79cd\u7c7b\u4f3c\u7684\u65b9\u5f0f\u6765\u4f7f\u7528\u610f\u56fe\u5339\u914d\u3002PackageManager\u62e5\u6709\u4e00\u7ec4<span style=\"color: #008000;\">query&#8230;()<\/span>\u65b9\u6cd5\u6765\u8fd4\u56de\u6240\u6709\u53ef\u4ee5\u63a5\u53d7\u67d0\u4e00\u7279\u5b9a\u610f\u56fe\u7684\u7ec4\u4ef6\uff0c\u4ee5\u53ca\u4e00\u7cfb\u5217\u7684<span style=\"color: #008000;\">resolve&#8230;()<\/span>\u65b9\u6cd5\u6765\u51b3\u5b9a\u54cd\u5e94\u610f\u56fe\u6700\u5408\u9002\u7684\u7ec4\u4ef6\u3002\u4f8b\u5982\uff0cqueryIntentActivities()\u5c06\u8fd4\u56de\u4e00\u4e2a\u5217\u51fa\u4e86\u6240\u6709\u53ef\u4ee5\u5c06\u610f\u56fe\u4f5c\u4e3a\u53c2\u6570\u4f20\u9012\u7684\u6d3b\u52a8\u7684\u5217\u8868\uff0cqueryIntentServices()\u5c06\u8fd4\u56de\u4e00\u4e2a\u7c7b\u4f3c\u4f5c\u7528\u7684\u6240\u6709\u670d\u52a1\u7684\u5217\u8868\u3002\u8fd9\u4e24\u79cd\u65b9\u6cd5\u90fd\u4e0d\u4f1a\u6fc0\u6d3b\u7ec4\u4ef6\uff1b\u5b83\u4eec\u53ea\u662f\u5217\u51fa\u4e86\u90a3\u4e9b\u53ef\u4ee5\u505a\u51fa\u54cd\u5e94\u7684\u3002\u5bf9\u4e8e\u5e7f\u64ad\u63a5\u6536\u8005\uff0c\u8fd8\u6709\u4e00\u4e2a\u7c7b\u4f3c\u7684queryBroadcastReceivers()\u65b9\u6cd5\u3002<\/p>\n<h3><strong>\u8bb0\u4e8b\u672c\uff08Note Pad\uff09\u8303\u4f8b<\/strong><\/h3>\n<p>\u8bb0\u4e8b\u672c\u8303\u4f8b\u5141\u8bb8\u7528\u6237\u6d4f\u89c8\u7b14\u8bb0\u5217\u8868\u3001\u67e5\u770b\u5217\u8868\u4e2d\u9879\u76ee\u7684\u8be6\u7ec6\u5185\u5bb9\u3001\u7f16\u8f91\u9879\u76ee\u3001\u5411\u5217\u8868\u589e\u52a0\u65b0\u9879\u76ee\u3002\u672c\u8282\u5c06\u5206\u6790\u5728\u5176manifest\u6587\u4ef6\u4e2d\u58f0\u660e\u7684\u610f\u56fe\u8fc7\u6ee4\u5668\uff08\u5982\u679c\u6b63\u5728\u79bb\u7ebf\u4f7f\u7528SDK\uff0c\u53ef\u4ee5\u5728<span style=\"color: #008000;\">&lt;sdk&gt;\/samples\/NotePad\/index.html<\/span>\u4e0b\u627e\u5230\u5305\u62ecmanifest\u6587\u4ef6\u5728\u5185\u7684\u8be5\u8303\u4f8b\u7a0b\u5e8f\u7684\u6240\u6709\u6e90\u6587\u4ef6\u3002\u5982\u679c\u662f\u5728\u5728\u7ebf\u67e5\u770b\u6587\u6863\uff0c\u6e90\u6587\u4ef6\u5219\u662f\u5728<a title=\"\u8bb0\u4e8b\u672c\u4ee3\u7801\" href=\"http:\/\/developer.android.com\/resources\/samples\/NotePad\/index.html\" target=\"_blank\">\u8fd9\u91cc<\/a>\u7684\u201c<a title=\"\u8303\u4f8b\u53ca\u4ee3\u4e70\" href=\"http:\/\/developer.android.com\/resources\/browser.html?tag=sample\" target=\"_blank\">\u6559\u7a0b\u548c\u8303\u4f8b\u4ee3\u7801<\/a>\u201d\u4e00\u8282\u3002<\/p>\n<p>\u5728manifest\u6587\u4ef6\u4e2d\uff0c\u8bb0\u4e8b\u672c\u7a0b\u5e8f\u58f0\u660e\u4e86\u4e09\u4e2a\u6d3b\u52a8\uff0c\u6bcf\u4e00\u4e2a\u90fd\u6709\u81f3\u5c11\u4e00\u4e2a\u610f\u56fe\u8fc7\u6ee4\u5668\u3002\u5b83\u8fd8\u58f0\u660e\u4e86\u4e00\u4e2a\u5185\u5bb9\u63d0\u4f9b\u8005\u7528\u4ee5\u7ba1\u7406\u7b14\u8bb0\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u6574\u4e2amanifest\u6587\u4ef6\u7684\u5185\u5bb9\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;manifest <span style=\"color: #800080;\">xmlns:android<\/span>=<span style=\"color: #008000;\">\"http:\/\/schemas.android.com\/apk\/res\/android\"<\/span><\/span>\r\n<span style=\"color: #000080;\"><span style=\"color: #800080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 package<\/span>=<span style=\"color: #008000;\">\"com.example.android.notepad\"<\/span>&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;application <span style=\"color: #800080;\">android:icon<\/span>=<span style=\"color: #008000;\">\"@drawable\/app_notes\"<\/span><\/span>\r\n<span style=\"color: #000080;\"><span style=\"color: #800080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0android:label<\/span>=<span style=\"color: #008000;\">\"@string\/app_name\"<\/span> &gt;<\/span>\r\n\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;provider <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"NotePadProvider\"<\/span><\/span>\r\n<span style=\"color: #000080;\"><span style=\"color: #800080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 android:authorities<\/span>=<span style=\"color: #008000;\">\"com.google.provider.NotePad\"<\/span> \/&gt;<\/span>\r\n\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;activity <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"NotesList\"<\/span> android:label=<span style=\"color: #008000;\">\"@string\/title_notes_list\"<\/span>&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.MAIN\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.LAUNCHER\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.VIEW\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.EDIT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.PICK\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.dir\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.GET_CONTENT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.item\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;\/activity&gt;<\/span>\r\n\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;activity <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"NoteEditor\"<\/span><\/span>\r\n<span style=\"color: #000080;\"><span style=\"color: #800080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 android:theme<\/span>=<span style=\"color: #008000;\">\"@android:style\/Theme.Light\"<\/span><\/span>\r\n<span style=\"color: #000080;\"><span style=\"color: #800080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 android:label<\/span>=<span style=\"color: #008000;\">\"@string\/title_note\"<\/span> &gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;intent-filter <span style=\"color: #800080;\">android:label<\/span>=<span style=\"color: #008000;\">\"@string\/resolve_edit\"<\/span>&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.VIEW\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.EDIT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"com.android.notepad.action.EDIT_NOTE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.item\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.INSERT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.dir\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;\/activity&gt;<\/span>\r\n\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;activity <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"TitleEditor\" <\/span><\/span>\r\n<span style=\"color: #000080;\"><span style=\"color: #800080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 android:label<\/span>=<span style=\"color: #008000;\">\"@string\/title_edit_title\"<\/span><\/span>\r\n<span style=\"color: #000080;\"><span style=\"color: #800080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 android:theme<\/span>=<span style=\"color: #008000;\">\"@android:style\/Theme.Dialog\"<\/span>&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;intent-filter <span style=\"color: #800080;\">android:label<\/span>=<span style=\"color: #008000;\">\"@string\/resolve_title\"<\/span>&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"com.android.notepad.action.EDIT_TITLE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.ALTERNATIVE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.SELECTED_ALTERNATIVE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.item\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 &lt;\/intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 \u00a0 \u00a0 &lt;\/activity&gt;<\/span>\r\n\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;\/application&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/manifest&gt;<\/span><\/pre>\n<p>\u7b2c\u4e00\u4e2a\u6d3b\u52a8\uff0cNoteList\uff0c\u548c\u5176\u4ed6\u7684\u6d3b\u52a8\u4e0d\u540c\uff0c\u5b83\u8981\u5bf9\u4e00\u7cfb\u5217\u7684\u7b14\u8bb0\uff08\u7b14\u8bb0\u5217\u8868\uff09\u8fdb\u884c\u64cd\u4f5c\u800c\u4e0d\u662f\u67d0\u6761\u5355\u72ec\u7684\u7b14\u8bb0\u3002\u5b83\u901a\u5e38\u5c06\u4f5c\u4e3a\u7528\u6237\u8fdb\u5165\u7a0b\u5e8f\u7684\u521d\u59cb\u754c\u9762\u3002\u5982\u5176\u4e09\u4e2a\u610f\u56fe\u8fc7\u6ee4\u5668\u6240\u63cf\u8ff0\u7684\uff0c\u5b83\u80fd\u6267\u884c\u4e09\u9879\u5de5\u4f5c\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.MAIN\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.LAUNCHER\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p style=\"padding-left: 30px;\">\u8be5\u8fc7\u6ee4\u5668\u58f0\u660e\u4e86Note Pad\u7a0b\u5e8f\u7684\u4e3b\u5165\u53e3\u3002\u6807\u51c6<span style=\"color: #008000;\">MAIN<\/span>\u884c\u4e3a\u662f\u4e00\u79cd\u4e0d\u9700\u8981Intent\u4e2d\u7684\u5176\u4ed6\u4fe1\u606f\uff08\u6bd4\u5982\u4e0d\u9700\u8981\u6570\u636e\u7c7b\u578b\uff09\u7684\u5165\u53e3\uff08entry point\uff09\uff0c<span style=\"color: #008000;\">LAUNCHER<\/span>\u7c7b\u522b\u5219\u8bf4\u660e\u8be5\u5165\u53e3\u5e94\u8be5\u88ab\u5217\u4e8e\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u5668\u4e2d\u3002<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.VIEW\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.EDIT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.PICK\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.dir\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p style=\"padding-left: 30px;\">\u8be5\u8fc7\u6ee4\u5668\u58f0\u660e\u4e86\u8fd9\u4e2a\u6d3b\u52a8\u53ef\u4ee5\u5bf9\u4e00\u5217\u7b14\u8bb0\u8fdb\u884c\u4f55\u79cd\u64cd\u4f5c\u3002\u5b83\u53ef\u4ee5\u5141\u8bb8\u7528\u6237\u67e5\u770b\u6216\u7f16\u8f91\u7b14\u8bb0\uff08\u901a\u8fc7<span style=\"color: #008000;\">VIEW<\/span>\u548c<span style=\"color: #008000;\">EDIT<\/span>\u884c\u4e3a\uff09\uff0c\u6216\u662f\u4ece\u5217\u8868\u4e2d\u9009\u53d6\u4e00\u6761\u7279\u5b9a\u7b14\u8bb0\uff08\u901a\u8fc7<span style=\"color: #008000;\">PICK<\/span>\u884c\u4e3a\uff09\u3002<\/p>\n<p style=\"padding-left: 30px;\">&lt;data&gt;\u5143\u7d20\u7684<span style=\"color: #008000;\">mimeType<\/span>\u5c5e\u6027\u6307\u5b9a\u4e86\u8fd9\u4e9b\u884c\u4e3a\u8981\u6267\u884c\u64cd\u4f5c\u7684\u6570\u636e\u7c7b\u578b\u3002\u5b83\u8868\u660e\u4e86\u8fd9\u4e2a\u6d3b\u52a8\u53ef\u4ee5\u4ece\u4e00\u4e2a\u6301\u6709Note Pad\u6570\u636e\u7684\u5185\u5bb9\u63d0\u4f9b\u5668\uff08<span style=\"color: #008000;\">vnd.google.note<\/span>\uff09\u4e2d\u83b7\u53d6\u4e00\u4e2a\u6307\u5411\u96f6\u4e2a\u6216\u66f4\u591a\u4e2a\u9879\u76ee\uff08<span style=\"color: #008000;\">vnd.android.cursor.dir<\/span>\uff09\u7684Cursor\u3002\u542f\u52a8\u8be5\u6d3b\u52a8\u7684Intent\u5bf9\u8c61\u5305\u542b\u4e00\u4e2a<span style=\"color: #008000;\">content: URI<\/span>\u7528\u4ee5\u6307\u5b9a\u6d3b\u52a8\u5e94\u8be5\u6253\u5f00\u7684\u786e\u5207\u6570\u636e\u7c7b\u578b\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u4e5f\u8bf7\u6ce8\u610f\u8be5\u8fc7\u6ee4\u5668\u4e2d\u63d0\u4f9b\u7684<span style=\"color: #008000;\">DEFAULT<\/span>\u7c7b\u522b\uff0c\u56e0\u4e3aContext.startActivity()\u548cActivity.startActivityForResult()\u65b9\u6cd5\u5728\u610f\u56fe\u5305\u542b<span style=\"color: #008000;\">DEFAULT<\/span>\u7c7b\u522b\u65f6\u5c06\u4f1a\u5bf9\u5176\u8fdb\u884c\u5904\u7406\u2014\u2014\u53ea\u6709\u4e24\u79cd\u4f8b\u5916\uff1a<\/p>\n<ul>\n<li>\u663e\u5f0f\u5730\u547d\u540d\u4e86\u76ee\u6807\u6d3b\u52a8\u7684Intent<\/li>\n<li>\u5305\u542b\u4e86MAIN\u884c\u4e3a\u548cLAUNCHER\u7c7b\u522b\u7684Intent<\/li>\n<\/ul>\n<p style=\"padding-left: 30px;\">\u56e0\u6b64\uff0c\u6240\u6709\u7684\u8fc7\u6ee4\u5668\u90fd<em>\u9700\u8981<\/em><span style=\"color: #008000;\">DEFAULT<\/span>\u7c7b\u522b\u2014\u2014\u9664\u975e\u6709<span style=\"color: #008000;\">MAIN<\/span>\u884c\u4e3a\u548c<span style=\"color: #008000;\">LAUNCHER<\/span>\u7c7b\u522b\u3002\uff08\u610f\u56fe\u8fc7\u6ee4\u5668\u4e0d\u8fc7\u6ee4\u663e\u5f0f\u610f\u56fe\uff09<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.GET_CONTENT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.item\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p style=\"padding-left: 30px;\">\u8be5\u8fc7\u6ee4\u5668\u8bf4\u660e\u4e86\u8fd9\u4e2a\u6d3b\u52a8\u53ef\u4ee5\u8fd4\u56de\u4e00\u6761\u7528\u6237\u9009\u4e2d\u7684\u7b14\u8bb0\u800c\u4e0d\u9700\u8981\u8fd9\u6761\u7b14\u8bb0\u6240\u5728\u7684\u5217\u8868\u7684\u76f8\u5173\u4fe1\u606f\u3002<span style=\"color: #008000;\">GET_CONTENT<\/span>\u884c\u4e3a\u7c7b\u4f3c\u4e8e<span style=\"color: #008000;\">PICK<\/span>\u884c\u4e3a\u3002\u4e24\u79cd\u60c5\u51b5\u4e0b\u6d3b\u52a8\u90fd\u5c06\u8fd4\u56de\u7528\u6237\u6240\u9009\u62e9\u7684\u7b14\u8bb0\u7684URI\u3002\uff08\u5c06\u8fd4\u56de\u7ed9\u8c03\u7528\u4e86startActivityForResult()\u6765\u542f\u52a8NoteList\u6d3b\u52a8\u7684\u90a3\u4e2a\u6d3b\u52a8\u3002\uff09\u4e0d\u8fc7\u73b0\u5728\uff0c\u8c03\u7528\u8005\u6307\u5b9a\u4e86\u6240\u9700\u7684\u6570\u636e\u7c7b\u578b\u800c\u4e0d\u662f\u7528\u6237\u8981\u8fdb\u884c\u9009\u62e9\u7684\u6570\u636e\u5217\u8868\u7684\u7c7b\u578b\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u6570\u636e\u7c7b\u578b\uff0c<span style=\"color: #008000;\">vnd.android.cursor.item<\/span>\/<span style=\"color: #008000;\">vnd.google.note<\/span>\uff0c\u6807\u660e\u4e86\u8be5\u6d3b\u52a8\u53ef\u4ee5\u8fd4\u56de\u7684\u6570\u636e\u7684\u7c7b\u578b\u2014\u2014\u4e00\u6761\u5355\u7b14\u8bb0\u7684URI\u3002\u901a\u8fc7\u6240\u8fd4\u56de\u7684URI\uff0c\u8c03\u7528\u8005\u53ef\u4ee5\u4ece\u6301\u6709Note Pad\u6570\u636e\uff08<span style=\"color: #008000;\">vnd.google.note<\/span>\uff09\u7684\u5185\u5bb9\u63d0\u4f9b\u5176\u4e2d\u83b7\u53d6\u67d0\u4e00\u7279\u5b9a\u6761\u76ee\uff08<span style=\"color: #008000;\">vnd.android.cursor.item<\/span>\uff09\u7684Cursor\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u4e5f\u5c31\u662f\u8bf4\uff0c\u524d\u4e00\u4e2a\u8fc7\u6ee4\u5668\u4e2d\u7684<span style=\"color: #008000;\">PICK<\/span>\u884c\u4e3a\uff0c\u6570\u636e\u7c7b\u578b\u6807\u8bc6\u51fa\u4e86\u6d3b\u52a8\u53ef\u4ee5\u663e\u793a\u7ed9\u7528\u6237\u7684\u6570\u636e\u7684\u7c7b\u578b\u3002\u800c<span style=\"color: #008000;\">GET_CONTENT<\/span>\u8fc7\u6ee4\u5668\u5219\u6807\u8bc6\u51fa\u4e86\u6d3b\u52a8\u53ef\u4ee5\u8fd4\u56de\u7ed9\u5b83\u7684\u8c03\u7528\u8005\u7684\u6570\u636e\u7684\u7c7b\u578b\u3002<\/p>\n<p>\u6709\u4e86\u8fd9\u4e9b\u80fd\u529b\uff0c\u4e0b\u9762\u7684\u610f\u56fe\u53ef\u4ee5\u5b9e\u73b0\u6d3b\u52a8NotesList\u7684\u529f\u80fd\uff1a<\/p>\n<p style=\"padding-left: 30px;\">\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.MAIN<\/span><\/p>\n<p style=\"padding-left: 60px;\">\u4e0d\u9700\u8981\u7279\u5b9a\u7684\u6570\u636e\u5c31\u80fd\u542f\u52a8\u6d3b\u52a8<\/p>\n<p style=\"padding-left: 30px;\">\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.MAIN\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\">\u7c7b\u522b\uff1a<span style=\"color: #008000;\">android.intent.category.LAUNCHER<\/span><\/p>\n<p style=\"padding-left: 60px;\">\u4e0d\u9700\u8981\u7279\u5b9a\u7684\u88ab\u9009\u62e9\u7684\u6570\u636e\u5c31\u80fd\u542f\u52a8\u6d3b\u52a8\u3002\u8fd9\u662f\u5b9e\u9645\u4e0a\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u5668\u7528\u6765\u586b\u5145\u5176\u6700\u9ad8\u5c42\u5217\u8868\uff08top-level list\uff09\u7684\u610f\u56fe\u3002\u6240\u6709\u5177\u6709\u5339\u914d\u8be5\u884c\u4e3a\u548c\u7c7b\u522b\u7684\u8fc7\u6ee4\u5668\u7684\u6d3b\u52a8\u5c06\u88ab\u6dfb\u52a0\u81f3\u5217\u8868\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.VIEW\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\">\u6570\u636e\uff1a<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes<\/span><\/p>\n<p style=\"padding-left: 60px;\">\u8bf7\u6c42\u6d3b\u52a8\u663e\u793a\u5728<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes<\/span>\u4e0b\u7684\u6240\u6709\u7b14\u8bb0\u7684\u5217\u8868\u3002\u4e4b\u540e\u7528\u6237\u53ef\u4ee5\u6d4f\u89c8\u8be5\u5217\u8868\u5e76\u83b7\u53d6\u5217\u8868\u4e2d\u9879\u76ee\u7684\u4fe1\u606f\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.PICK\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\">\u6570\u636e\uff1a<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes<\/span><\/p>\n<p style=\"padding-left: 60px;\">\u8bf7\u6c42\u6d3b\u52a8\u663e\u793a\u5728<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes<\/span>\u4e0b\u7684\u7b14\u8bb0\u7684\u5217\u8868\u3002\u4e4b\u540e\u7528\u6237\u53ef\u4ee5\u4ece\u5217\u8868\u4e2d\u9009\u53d6\u4e00\u6761\u7b14\u8bb0\uff0c\u6d3b\u52a8\u5c06\u8fd4\u56de\u8be5\u6761\u76ee\u7684URI\u7ed9\u542f\u52a8\u4e86NoteList\u6d3b\u52a8\u7684\u90a3\u4e2a\u6d3b\u52a8\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.GET_CONTENT\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\">\u6570\u636e\u7c7b\u578b\uff1a<span style=\"color: #008000;\">vnd.android.cursor.item\/vnd.google.note<\/span><\/p>\n<p style=\"padding-left: 60px;\">\u8bf7\u6c42\u6d3b\u52a8\u63d0\u4f9b\u4e00\u6761\u5355\u72ec\u7684Note Pad\u6570\u636e\u3002<\/p>\n<p>\u7b2c\u4e8c\u4e2a\u6d3b\u52a8\uff0cNoteEditor\uff0c\u5411\u7528\u6237\u663e\u793a\u4e00\u6761\u5355\u72ec\u7684\u7b14\u8bb0\u6761\u76ee\u5e76\u5141\u8bb8\u5bf9\u5176\u8fdb\u884c\u7f16\u8f91\u3002\u6839\u636e\u5176\u4e24\u4e2a\u610f\u56fe\u8fc7\u6ee4\u5668\u7684\u63cf\u8ff0\uff0c\u5b83\u53ef\u4ee5\u8fdb\u884c\u4e24\u9879\u4efb\u52a1\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter <span style=\"color: #800080;\">android:label<\/span>=<span style=\"color: #008000;\">\"@string\/resolve_edit\"<\/span>&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.VIEW<\/span>\" \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.EDIT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"com.android.notepad.action.EDIT_NOTE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.item\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p>\u8fd9\u4e2a\u6d3b\u52a8\u7684\u7b2c\u4e00\u4e2a\uff0c\u4e5f\u662f\u4e3b\u8981\u7684\u76ee\u7684\u662f\u4f7f\u7528\u6237\u4e0e\u4e00\u6761\u7b14\u8bb0\u4ea4\u4e92\uff0c<span style=\"color: #008000;\">VIEW<\/span>\u8fd9\u6761\u7b14\u8bb0\u6216\u662f<span style=\"color: #008000;\">EDIT<\/span>\u5b83\u3002\uff08\u7c7b\u522b<span style=\"color: #008000;\">EDIT_NOTE<\/span>\u4e0e<span style=\"color: #008000;\">EDIT<\/span>\u7684\u610f\u4e49\u76f8\u540c\u3002\uff09\u8be5\u610f\u56fe\u5c06\u5305\u542b\u5339\u914dMIME\u7c7b\u578b<span style=\"color: #008000;\">vnd.android.cursor.item\/vnd.google.note<\/span>\u7684\u6570\u636e\u7684URI\u2014\u2014\u4e5f\u5c31\u662f\u8bf4\uff0c\u8fd9\u6761\u6307\u5b9a\u7684\u7b14\u8bb0\u7684URI\u3002\u5b83\u901a\u5e38\u662f\u88abNoteList\u6d3b\u52a8\u7684<span style=\"color: #008000;\">PICK<\/span>\u6216<span style=\"color: #008000;\">GET_CONTENT<\/span>\u884c\u4e3a\u6240\u8fd4\u56de\u7684URI\u3002<\/p>\n<p>\u548c\u4e4b\u524d\u4e00\u6837\uff0c\u8be5\u8fc7\u6ee4\u5668\u5217\u51fa\u4e86<span style=\"color: #008000;\">DEFAULT<\/span>\u7c7b\u522b\u56e0\u6b64\u8fd9\u4e2a\u6d3b\u52a8\u53ef\u4ee5\u88ab\u5176\u4ed6\u6ca1\u6709\u663e\u5f0f\u5730\u6307\u5b9aNoteEditor\u7c7b\u7684\u610f\u56fe\u542f\u52a8\u3002<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.action.INSERT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.dir\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p>\u8fd9\u4e2a\u6d3b\u52a8\u7684\u7b2c\u4e8c\u4e2a\u76ee\u7684\u662f\u4f7f\u7528\u6237\u521b\u5efa\u4e00\u6761\u65b0\u7684\u7b14\u8bb0\u5e76<span style=\"color: #008000;\">INSERT<\/span>\u81f3\u73b0\u6709\u7684\u7b14\u8bb0\u5217\u8868\u4e2d\u3002\u8be5\u610f\u56fe\u5305\u542b\u4e86\u5339\u914dMIME\u7c7b\u578b<span style=\"color: #008000;\">vnd.android.cursor.dir\/vnd.google.note<\/span>\u7684\u6570\u636e\u7684URI\u2014\u2014\u5373\u7b14\u8bb0\u5c06\u88ab\u63d2\u5165\u7684\u7b14\u8bb0\u5217\u8868\u7684URI\u3002<\/p>\n<p>\u6709\u4e86\u8fd9\u4e9b\u80fd\u529b\uff0c\u4e0b\u9762\u7684\u610f\u56fe\u53ef\u4ee5\u5b9e\u73b0NoteEditor\u6d3b\u52a8\u7684\u529f\u80fd\uff1a<\/p>\n<p>\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.VIEW\u00a0<\/span><\/p>\n<p>\u6570\u636e\uff1a<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes\/ID<\/span><\/p>\n<p style=\"padding-left: 30px;\">\u8bf7\u6c42\u6d3b\u52a8\u663e\u793a\u7531<span style=\"color: #008000;\">ID<\/span>\u786e\u5b9a\u7684\u7b14\u8bb0\u7684\u5185\u5bb9\u3002\uff08\u5173\u4e8e<span style=\"color: #008000;\">content:<\/span> URIs\u662f\u5982\u4f55\u6307\u5b9a\u4e00\u4e2a\u7fa4\u7ec4\u5185\u7684\u4e2a\u522b\u6210\u5458\u7684\uff0c\u8bf7\u53c2\u89c1\u201c\u5185\u5bb9\u63d0\u4f9b\u5668\u201d\u3002\uff09<\/p>\n<p>\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.EDIT\u00a0<\/span><\/p>\n<p>\u6570\u636e\uff1a<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes\/ID<\/span><\/p>\n<p style=\"padding-left: 30px;\">\u8bf7\u6c42\u6d3b\u52a8\u663e\u793a\u7531<span style=\"color: #008000;\">ID<\/span>\u786e\u5b9a\u7684\u7b14\u8bb0\u7684\u5185\u5bb9\uff0c\u5e76\u5141\u8bb8\u7528\u6237\u5bf9\u5176\u8fdb\u884c\u7f16\u8f91\u3002\u5982\u679c\u7528\u6237\u4fdd\u5b58\u4e86\u4fee\u6539\uff0c\u8be5\u6d3b\u52a8\u5c06\u66f4\u65b0\u5185\u5bb9\u63d0\u4f9b\u5668\u4e2d\u7684\u7b14\u8bb0\u6570\u636e\u3002<\/p>\n<p>\u884c\u4e3a\uff1a<span style=\"color: #008000;\">android.intent.action.INSERT\u00a0<\/span><\/p>\n<p>\u6570\u636e\uff1a<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes<\/span><\/p>\n<p>\u8bf7\u6c42\u6d3b\u52a8\u5728<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/note<\/span>\u7684\u7b14\u8bb0\u5217\u8868\u4e2d\u521b\u5efa\u4e00\u4e2a\u65b0\u7684\u7a7a\u7b14\u8bb0\u5e76\u5141\u8bb8\u7528\u6237\u5bf9\u5176\u8fdb\u884c\u7f16\u8f91\u3002\u5982\u679c\u7528\u6237\u4fdd\u5b58\u4e86\u7b14\u8bb0\uff0c\u5176URI\u5c06\u88ab\u8fd4\u56de\u7ed9\u8c03\u7528\u8005\u3002<\/p>\n<p>\u6700\u540e\u4e00\u4e2a\u6d3b\u52a8\uff0cTitleEditor\uff0c\u5141\u8bb8\u7528\u6237\u7f16\u8f91\u7b14\u8bb0\u7684\u6807\u9898\u3002\u8fd9\u53ef\u4ee5\u901a\u8fc7\u76f4\u63a5\u8c03\u7528\u8be5\u6d3b\u52a8\u6765\u5b9e\u73b0\uff08\u901a\u8fc7\u663e\u5f0f\u5730\u5728Intent\u4e2d\u8bbe\u5b9a\u8be5\u7ec4\u4ef6\u540d\u79f0\uff09\uff0c\u800c\u4e0d\u9700\u8981\u901a\u8fc7\u4e00\u4e2a\u610f\u56fe\u8fc7\u6ee4\u5668\u3002\u4e0d\u8fc7\u8fd9\u91cc\u4e3b\u8981\u5173\u6ce8\u5982\u4f55\u5bf9\u73b0\u5b58\u7684\u6570\u636e\u8fdb\u884c\u5176\u4ed6\u64cd\u4f5c\uff1a<\/p>\n<pre><span style=\"color: #000080;\">&lt;intent-filter <span style=\"color: #800080;\">android:label<\/span>=<span style=\"color: #008000;\">\"@string\/resolve_title\"<\/span>&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;action <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"com.android.notepad.action.EDIT_TITLE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.DEFAULT\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.ALTERNATIVE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;category <span style=\"color: #800080;\">android:name<\/span>=<span style=\"color: #008000;\">\"android.intent.category.SELECTED_ALTERNATIVE\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">\u00a0 \u00a0 &lt;data <span style=\"color: #800080;\">android:mimeType<\/span>=<span style=\"color: #008000;\">\"vnd.android.cursor.item\/vnd.google.note\"<\/span> \/&gt;<\/span>\r\n<span style=\"color: #000080;\">&lt;\/intent-filter&gt;<\/span><\/pre>\n<p>\u8fd9\u4e2a\u6d3b\u52a8\u7684\u552f\u4e00\u7684\u610f\u56fe\u8fc7\u6ee4\u5668\u4f7f\u7528\u4e86\u4e00\u4e2a\u540d\u4e3a&#8221;<span style=\"color: #008000;\">com.android.notepad.action.EDIT_TITLE<\/span>&#8220;\u7684\u81ea\u5b9a\u4e49\u884c\u4e3a\u3002\u5b83\u5fc5\u987b\u50cf\u4e4b\u524d\u7684<span style=\"color: #008000;\">VIEW<\/span>\u548c<span style=\"color: #008000;\">EDIT<\/span>\u884c\u4e3a\u4e00\u6837\u901a\u8fc7\u4e00\u6761\u6307\u5b9a\u7684\u7b14\u8bb0\u8c03\u7528\uff08\u6570\u636e\u7c7b\u578b<span style=\"color: #008000;\">vnd.android.cursor.item\/vnd.google.note<\/span>\uff09\u3002\u4e0d\u8fc7\uff0c\u8fd9\u4e2a\u6d3b\u52a8\u5c06\u663e\u793a\u5305\u542b\u4e8e\u7b14\u8bb0\u6570\u636e\u4e2d\u7684\u6807\u9898\uff0c\u800c\u4e0d\u662f\u7b14\u8bb0\u5185\u5bb9\u81ea\u8eab\u3002<\/p>\n<p>\u53e6\u5916\u4e3a\u4e86\u652f\u6301\u5e38\u89c1\u7684<span style=\"color: #008000;\">DEFAULT<\/span>\u7c7b\u522b\uff0c\u8fd9\u4e2a\u6807\u9898\u7f16\u8f91\u5668\u4e5f\u652f\u6301\u5176\u4ed6\u4e24\u79cd\u5e38\u89c1\u7c7b\u522b\uff1aALTERNATIVE\u548cSELECTED_ALTERNATIVE\u3002\u8fd9\u4e24\u4e2a\u7c7b\u522b\u8868\u660e\u4e86\u6d3b\u52a8\u53ef\u4ee5\u5728\u4e00\u4e2a\u9009\u9879\u83dc\u5355\u4e2d\u663e\u793a\u7ed9\u7528\u6237\uff08\u5c31\u597d\u8c61<span style=\"color: #008000;\">LAUNCHER<\/span>\u7c7b\u522b\u8868\u660e\u4e86\u6d3b\u52a8\u5e94\u5f53\u5728\u5e94\u7528\u7a0b\u5e8f\u542f\u52a8\u5668\u4e2d\u663e\u793a\u7ed9\u7528\u6237\u4e00\u6837\uff09\u3002\u6ce8\u610f\u8fc7\u6ee4\u5668\u4e5f\u652f\u6301\u4e00\u4e2a\u663e\u5f0f\u6807\u7b7e\uff08\u901a\u8fc7<span style=\"color: #008000;\">android:label=&#8221;@string\/resolve_title&#8221;<\/span>\uff09\u4ee5\u66f4\u597d\u5730\u63a7\u5236\u7528\u6237\u80fd\u591f\u770b\u5230\u5f53\u524d\u88ab\u8fd9\u4e2a\u6d3b\u52a8\u4ee5\u5176\u4ed6\u884c\u4e3a\u65b9\u5f0f\u67e5\u770b\u7684\u6570\u636e\u7684\u54ea\u4e9b\u5185\u5bb9\u3002\uff08\u5173\u4e8e\u8fd9\u4e9b\u7c7b\u522b\u548c\u521b\u5efa\u9009\u9879\u83dc\u5355\u7684\u66f4\u591a\u4fe1\u606f\uff0c\u8bf7\u53c2\u89c1PackageManager.queryIntentActivityOptions()\u548cMenu.addIntentOptions()\u65b9\u6cd5\u3002\uff09<\/p>\n<p>\u6709\u4e86\u8fd9\u4e9b\u80fd\u529b\uff0c\u4e0b\u9762\u7684\u610f\u56fe\u5c31\u53ef\u4ee5\u5b9e\u73b0TitleEditor\u6d3b\u52a8\u7684\u529f\u80fd\uff1a<\/p>\n<p style=\"padding-left: 30px;\">\u884c\u4e3a\uff1a<span style=\"color: #008000;\">com.android.notepad.action.EDIT_TITLE\u00a0<\/span><\/p>\n<p style=\"padding-left: 30px;\">\u6570\u636e\uff1a<span style=\"color: #008000;\">content:\/\/com.google.provider.NotePad\/notes\/ID<\/span><\/p>\n<p style=\"padding-left: 60px;\">\u8bf7\u6c42\u6d3b\u52a8\u663e\u793a\u548c\u7b14\u8bb0<span style=\"color: #008000;\">ID<\/span>\u76f8\u5173\u8054\u7684\u6807\u9898\uff0c\u5e76\u5141\u8bb8\u7528\u6237\u5bf9\u5176\u8fdb\u884c\u7f16\u8f91\u3002<\/p>\n<p>\u672c\u9875\u90e8\u5206\u5185\u5bb9\u6839\u636e<a title=\"Android Open Source Projec\" href=\"http:\/\/code.google.com\/intl\/zh-CN\/policies.html\" target=\"_blank\">Android Open Source Project<\/a>\u521b\u4f5c\u5e76\u5171\u4eab\u7684\u5185\u5bb9\u4fee\u6539\uff0c\u5e76\u5728<a title=\"\u77e5\u8bc6\u5171\u4eab \u7f72\u540d2.5\u8bb8\u53ef\u534f\u8bae\" href=\"http:\/\/creativecommons.org\/licenses\/by\/2.5\/\" target=\"_blank\">\u77e5\u8bc6\u5171\u4eab \u7f72\u540d2.5\u8bb8\u53ef\u534f\u8bae<\/a>\u4e2d\u6240\u8ff0\u6761\u6b3e\u7684\u9650\u5236\u4e0b\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00\u4e2a\u7a0b\u5e8f\u7684\u4e09\u4e2a\u6838\u5fc3\u7ec4\u4ef6\u2014\u2014\u6d3b\u52a8\u3001\u670d\u52a1\u548c\u5e7f\u64ad\u63a5\u6536\u8005\u2014\u2014\u901a\u8fc7\u88ab\u79f0\u4e3a\u610f\u56fe\uff08intent\uff09\u7684\u6d88\u606f\u6765\u88ab\u6fc0\u6d3b\u3002\u610f\u56fe\u6d88\u606f\u662f\u4e00 &hellip; <a href=\"http:\/\/leybreeze.com\/blog\/?p=673\" class=\"more-link\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">\u201c\u610f\u56fe\u548c\u610f\u56fe\u8fc7\u6ee4\u5668\u201d<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,10],"tags":[5,82,40],"_links":{"self":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/673"}],"collection":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=673"}],"version-history":[{"count":28,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/673\/revisions"}],"predecessor-version":[{"id":676,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/673\/revisions\/676"}],"wp:attachment":[{"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=673"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/leybreeze.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}