{"id":859,"date":"2018-10-29T20:39:24","date_gmt":"2018-10-29T11:39:24","guid":{"rendered":"https:\/\/www.charlezz.com\/?p=859"},"modified":"2018-10-29T21:04:52","modified_gmt":"2018-10-29T12:04:52","slug":"%ec%95%88%eb%93%9c%eb%a1%9c%ec%9d%b4%eb%93%9c%ec%9d%98-intentfilter%eb%9e%80","status":"publish","type":"post","link":"https:\/\/charlezz.com\/?p=859","title":{"rendered":"\uc548\ub4dc\ub85c\uc774\ub4dc\uc758 IntentFilter\ub780?"},"content":{"rendered":"<h1>IntentFilter\ub780?<\/h1>\n<p><a href=\"https:\/\/www.charlezz.com\/?p=857\">Intent<\/a>\ub294 \uba85\uc2dc\uc801 \uc778\ud150\ud2b8\uc640 \uc554\uc2dc\uc801 \uc778\ud150\ud2b8\ub85c \ub098\ub269\ub2c8\ub2e4. \uadf8\uc911 \uc554\uc2dc\uc801 \uc778\ud150\ud2b8\ub97c \ud1b5\ud574 \uc0ac\uc6a9\uc790\ub85c \ud558\uc5ec\uae08 \uc5b4\ub290 \uc571\uc744 \uc0ac\uc6a9\ud560\uc9c0 \uc120\ud0dd\ud558\ub3c4\ub85d \ud558\uace0\uc790 \ud560\ub54c IntentFilter\uac00 \ud544\uc694\ud569\ub2c8\ub2e4.<\/p>\n<p>\uc608\ub97c \ub4e4\uc5b4 \uc0ac\uc6a9\uc790\uac00 \ub2e4\ub978 \uc0ac\ub78c\ub4e4\uacfc \uacf5\uc720\ud588\uc73c\uba74 \ud558\ub294 \ucf58\ud150\uce20\ub97c \uac00\uc9c0\uace0 \uc788\ub294 \uacbd\uc6b0, ACTION_SEND\ub77c\ub294 Action \uc788\ub294 \uc778\ud150\ud2b8\ub97c \uc0dd\uc131\ud55c \ub2e4\uc74c \uacf5\uc720\ud560 \ucf58\ud150\uce20\ub97c \uc9c0\uc815\ud558\ub294 Extra\ub97c \ucd94\uac00\ud558\uba74 \ub429\ub2c8\ub2e4. \ud574\ub2f9 \uc778\ud150\ud2b8\ub85c startActivity()\ub97c \ud638\ucd9c\ud558\uba74 \uc0ac\uc6a9\uc790\uac00 \uc5b4\ub290 \uc571\uc744 \ud1b5\ud574 \ucf58\ud150\uce20\ub97c \uacf5\uc720\ud560\uc9c0 \uc120\ud0dd\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 100%;\"><strong>\uc8fc\uc758:<\/strong><span>\u00a0\uac1c\ubc1c\uc790\uac00\u00a0<\/span><code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Context.html?hl=ko#startActivity(android.content.Intent)\">startActivity()<\/a><\/code><span>\ub85c \uc804\uc1a1\ud55c \uc554\uc2dc\uc801 \uc778\ud150\ud2b8\ub97c \ucc98\ub9ac\ud560 \uc571\uc774 \uc0ac\uc6a9\uc790\uc5d0\uac8c\u00a0<\/span><em>\uc804\ud600<\/em><span>\u00a0\ud45c\uc2dc\ub418\uc9c0 \uc54a\uc744 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4. \uc774\ub7f0 \uc77c\uc774 \ubc1c\uc0dd\ud558\uba74, \ud638\ucd9c\uc774 \uc2e4\ud328\ud558\uace0 \uc571\uc774 \uc791\ub3d9 \uc911\ub2e8\ub429\ub2c8\ub2e4. \uc5b4\ub290 \uc561\ud2f0\ube44\ud2f0\ub4e0 \uc774 \uc778\ud150\ud2b8\ub97c \uc218\uc2e0\ud558\ub3c4\ub85d \ud655\uc2e4\ud788 \ud558\ub824\uba74,\u00a0<\/span><code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html?hl=ko\">Intent<\/a><\/code><span>\u00a0\uac1d\uccb4\uc758\u00a0<\/span><code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html?hl=ko#resolveActivity(android.content.pm.PackageManager)\">resolveActivity()<\/a><\/code><span>\ub97c \ud638\ucd9c\ud569\ub2c8\ub2e4. \uacb0\uacfc\uac00 null\uc774 \uc544\ub2cc \uacbd\uc6b0, \uc778\ud150\ud2b8\ub97c \ucc98\ub9ac\ud560 \uc218 \uc788\ub294 \uc571\uc774 \ucd5c\uc18c\ud55c \ud558\ub098\ub294 \uc788\ub2e4\ub294 \ub73b\uc774\uba70\u00a0<\/span><code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Context.html?hl=ko#startActivity(android.content.Intent)\">startActivity()<\/a><\/code><span>\ub97c \ud638\ucd9c\ud574\ub3c4 \uc548\uc804\ud569\ub2c8\ub2e4. \uacb0\uacfc\uac00 null\uc774\uba74, \ud574\ub2f9 \uc778\ud150\ud2b8\ub97c \uc0ac\uc6a9\ud574\uc11c\ub294 \uc548 \ub418\uba70 \uac00\ub2a5\ud55c \uacbd\uc6b0 \ud574\ub2f9 \uc778\ud150\ud2b8\ub97c \ubc1c\uc0dd\uc2dc\ud0a4\ub294 \uae30\ub2a5\uc744 \ube44\ud65c\uc131\ud654\ud574\uc57c \ud569\ub2c8\ub2e4.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>\uc554\uc2dc\uc801 \uc778\ud150\ud2b8 \uc218\uc2e0\ud558\uae30<\/h3>\n<p>\uc571\uc5d0\uc11c \uc554\uc2dc\uc801\uc778\ud150\ud2b8\ub97c \uc218\uc2e0\ud558\ub824\uba74 \uc571\uc758 \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \ub300\ud574 \ud558\ub098\uc774\uc0c1\uc758 &lt;intent-filter&gt;\ub97c \uba54\ub2c8\ud398\uc2a4\ud2b8\uc5d0 \uc120\uc5b8\ud574\uc57c\ud569\ub2c8\ub2e4. \uac01 \uc778\ud150\ud2b8 \ud544\ud130\uac00 \uc778\ud150\ud2b8\uc758 Action, Data, Category\ub97c \uadfc\uac70\ub85c \uc5b4\ub290 \uc720\ud615\uc758 \uc778\ud150\ud2b8\ub97c \ud5c8\uc6a9\ud558\ub294\uc9c0 \ub098\ud0c0\ub0c5\ub2c8\ub2e4. \uc2dc\uc2a4\ud15c\uc774 \ucef4\ud3ec\ub10c\ud2b8\uc5d0 \uc554\uc2dc\uc801 \uc778\ud150\ud2b8\ub97c \uc804\ub2ec\ud558\ub294 \uac83\uc740 \uc778\ud150\ud2b8\uac00 \uac1c\ubc1c\uc790\uac00 \uc120\uc5b8\ud55c \uc778\ud150\ud2b8 \ud544\ud130 \uc911 \ud558\ub098\uac00 \uc77c\uce58\ud558\ub294 \uacbd\uc6b0\uc785\ub2c8\ub2e4.\u00a0<\/p>\n<p>\uc778\ud150\ud2b8 \ud544\ud130\ub294 \ud558\uc704 \uc694\uc18c\ub85c \ub2e4\uc74c\uacfc \uac19\uc740 \uc720\ud615\uc744 \uc9c0\uc815\ud560\uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/p>\n<table border=\"1\" style=\"border-collapse: collapse; width: 100%;\">\n<tbody>\n<tr>\n<td style=\"width: 23.9278%;\">Intent Filter\uc758 \ud558\uc704 \uc694\uc18c<\/td>\n<td style=\"width: 76.0722%;\">\uc124\uba85<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.9278%;\">&lt;action&gt;<\/td>\n<td style=\"width: 76.0722%;\">name \uc18d\uc131\uc5d0\uc11c \ud5c8\uc6a9\ub41c \uc778\ud150\ud2b8 \uc791\uc5c5\uc744 \uc120\uc5b8\ud569\ub2c8\ub2e4. \uc774 \uac12\uc740 \ubb38\uc790\uc5f4 \uac12\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.9278%;\">&lt;data&gt;<\/td>\n<td style=\"width: 76.0722%;\">\ud5c8\uc6a9\ub41c \ub370\uc774\ud130 \uc720\ud615\uc744 \uc120\uc5b8\ud569\ub2c8\ub2e4. \uc774\ub54c \ud558\ub098\uc774\uc0c1\uc758 \uc18d\uc131\uc744 \uc0ac\uc6a9\ud558\uc5ec \ub370\uc774\ud130 URI\uc640 MIME\uc720\ud615\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4.<\/td>\n<\/tr>\n<tr>\n<td style=\"width: 23.9278%;\">&lt;category&gt;<\/td>\n<td style=\"width: 76.0722%;\">name \uc18d\uc131\uc5d0\uc11c \ud5c8\uc6a9\ub41c \uc778\ud150\ud2b8 \uce74\ud14c\uace0\ub9ac\ub97c \uc120\uc5b8\ud569\ub2c8\ub2e4. \uc774 \uac12\uc740 \ubb38\uc790\uc5f4 \uac12\uc774\uc5b4\uc57c \ud569\ub2c8\ub2e4.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4>\uc778\ud150\ud2b8 \ud544\ud130 \uc608\uc2dc<\/h4>\n<pre class=\"lang:xhtml decode:true\">&lt;activity android:name=\"MainActivity\"&gt;\r\n    &lt;!-- This activity is the main entry, should appear in app launcher --&gt;\r\n    &lt;intent-filter&gt;\r\n        &lt;action android:name=\"android.intent.action.MAIN\" \/&gt;\r\n        &lt;category android:name=\"android.intent.category.LAUNCHER\" \/&gt;\r\n    &lt;\/intent-filter&gt;\r\n&lt;\/activity&gt;\r\n\r\n&lt;activity android:name=\"ShareActivity\"&gt;\r\n    &lt;!-- This activity handles \"SEND\" actions with text data --&gt;\r\n    &lt;intent-filter&gt;\r\n        &lt;action android:name=\"android.intent.action.SEND\"\/&gt;\r\n        &lt;category android:name=\"android.intent.category.DEFAULT\"\/&gt;\r\n        &lt;data android:mimeType=\"text\/plain\"\/&gt;\r\n    &lt;\/intent-filter&gt;\r\n    &lt;!-- This activity also handles \"SEND\" and \"SEND_MULTIPLE\" with media data --&gt;\r\n    &lt;intent-filter&gt;\r\n        &lt;action android:name=\"android.intent.action.SEND\"\/&gt;\r\n        &lt;action android:name=\"android.intent.action.SEND_MULTIPLE\"\/&gt;\r\n        &lt;category android:name=\"android.intent.category.DEFAULT\"\/&gt;\r\n        &lt;data android:mimeType=\"application\/vnd.google.panorama360+jpg\"\/&gt;\r\n        &lt;data android:mimeType=\"image\/*\"\/&gt;\r\n        &lt;data android:mimeType=\"video\/*\"\/&gt;\r\n    &lt;\/intent-filter&gt;\r\n&lt;\/activity&gt;<\/pre>\n<pre class=\"lang:xhtml decode:true\">&lt;activity android:name=\"MainActivity\"&gt;\r\n    &lt;!-- \uc560\ud50c\ub9ac\ucf00\uc774\uc158\uc758 \uc9c4\uc785 \uc561\ud2f0\ube44\ud2f0, \ub7f0\ucc98\uc5d0\uc11c \ub098\ud0c0\ub0a9\ub2c8\ub2e4 --&gt;\r\n    &lt;intent-filter&gt;\r\n        &lt;action android:name=\"android.intent.action.MAIN\" \/&gt;\r\n        &lt;category android:name=\"android.intent.category.LAUNCHER\" \/&gt;\r\n    &lt;\/intent-filter&gt;\r\n&lt;\/activity&gt;\r\n\r\n&lt;activity android:name=\"ShareActivity\"&gt;\r\n    &lt;!-- \uc774 \uc561\ud2f0\ube44\ud2f0\ub294 \ud14d\uc2a4\ud2b8\ub370\uc774\ud130\uc640 \ud568\uaed8 SEND \uc561\uc158\uc744 \uc218\ud589\ud569\ub2c8\ub2e4 --&gt;\r\n    &lt;intent-filter&gt;\r\n        &lt;action android:name=\"android.intent.action.SEND\"\/&gt;\r\n        &lt;category android:name=\"android.intent.category.DEFAULT\"\/&gt;\r\n        &lt;data android:mimeType=\"text\/plain\"\/&gt;\r\n    &lt;\/intent-filter&gt;\r\n    &lt;!-- \uc774 \uc561\ud2f0\ube44\ud2f0\ub294 \ubbf8\ub514\uc5b4\ub370\uc774\ud130\uc640 \ud568\uaed8 SEND\uc640 SEND_MULTIPLE\uc744 \uc218\ud589\ud569\ub2c8\ub2e4--&gt;\r\n    &lt;intent-filter&gt;\r\n        &lt;action android:name=\"android.intent.action.SEND\"\/&gt;\r\n        &lt;action android:name=\"android.intent.action.SEND_MULTIPLE\"\/&gt;\r\n        &lt;category android:name=\"android.intent.category.DEFAULT\"\/&gt;\r\n        &lt;data android:mimeType=\"application\/vnd.google.panorama360+jpg\"\/&gt;\r\n        &lt;data android:mimeType=\"image\/*\"\/&gt;\r\n        &lt;data android:mimeType=\"video\/*\"\/&gt;\r\n    &lt;\/intent-filter&gt;\r\n&lt;\/activity&gt;<\/pre>\n<p class=\"\"><span style=\"font-size: 14pt;\">\uccab \ubc88\uc9f8 \uc561\ud2f0\ube44\ud2f0\uc778 MainActivity\ub294 \uc571\uc758 \uc8fc\uc694 \uc9c4\uc785 \uc9c0\uc810\uc785\ub2c8\ub2e4. \uc989 \uc774\uac83\uc740 \uc0ac\uc6a9\uc790\uac00 \uc2dc\uc791 \uad00\ub9ac\uc790 \uc544\uc774\ucf58\uc744 \uc0ac\uc6a9\ud558\uc5ec \uc571\uc744 \ucc98\uc74c \uc2dc\uc791\ud560 \ub54c \uc5f4\ub9ac\ub294 \uc561\ud2f0\ube44\ud2f0\uc785\ub2c8\ub2e4.<\/span><\/p>\n<ul>\n<li>\n<p><span style=\"font-size: 14pt;\"><code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html?hl=ko#ACTION_MAIN\">ACTION_MAIN<\/a><\/code>\u00a0\uc791\uc5c5\uc740 \uc774\uac83\uc774 \uc8fc\uc694 \uc9c4\uc785 \uc9c0\uc810\uc774\uba70 \uc5b4\ub290 \uc778\ud150\ud2b8 \ub370\uc774\ud130\ub3c4 \uae30\ub300\ud558\uc9c0 \uc54a\ub294\ub2e4\ub294 \uac83\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4.<\/span><\/p>\n<\/li>\n<li>\n<p><span style=\"font-size: 14pt;\"><code><a href=\"https:\/\/developer.android.com\/reference\/android\/content\/Intent.html?hl=ko#CATEGORY_LAUNCHER\">CATEGORY_LAUNCHER<\/a><\/code>\u00a0\uce74\ud14c\uace0\ub9ac\ub294 \uc774 \uc561\ud2f0\ube44\ud2f0\uc758 \uc544\uc774\ucf58\uc774 \uc2dc\uc2a4\ud15c\uc758 \uc571 \uc2dc\uc791 \uad00\ub9ac\uc790\uc5d0 \ubc30\uce58\ub418\uc5b4\uc57c \ud55c\ub2e4\ub294 \uac83\uc744 \ub098\ud0c0\ub0c5\ub2c8\ub2e4.\u00a0<a href=\"https:\/\/developer.android.com\/guide\/topics\/manifest\/activity-element.html?hl=ko\"><code>&lt;activity&gt;<\/code><\/a>\u00a0\uc694\uc18c\uac00 \uc544\uc774\ucf58\uc744\u00a0<code>icon<\/code>\uc73c\ub85c \uc9c0\uc815\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0, \uc2dc\uc2a4\ud15c\uc740\u00a0<a href=\"https:\/\/developer.android.com\/guide\/topics\/manifest\/application-element.html?hl=ko\"><code>&lt;application&gt;<\/code><\/a>\u00a0\uc694\uc18c\ub85c\ubd80\ud130 \uac00\uc838\uc628 \uc544\uc774\ucf58\uc744 \uc0ac\uc6a9\ud569\ub2c8\ub2e4.<\/span><\/p>\n<\/li>\n<\/ul>\n<p><span style=\"font-size: 14pt;\">\uc774\ub4e4 \ub450 \uac00\uc9c0\uac00 \uc9dd\uc744 \uc774\ub8e8\uc5b4\uc57c \uc561\ud2f0\ube44\ud2f0\uac00 \uc571 \uc2dc\uc791 \uad00\ub9ac\uc790\uc5d0 \ub098\ud0c0\ub0a0 \uc218 \uc788\uc2b5\ub2c8\ub2e4.<\/span><\/p>\n<p><span style=\"font-size: 14pt;\">\ub450 \ubc88\uc9f8 \uc561\ud2f0\ube44\ud2f0\uc778\u00a0<code>ShareActivity<\/code>\ub294 \ud14d\uc2a4\ud2b8\uc640 \ubbf8\ub514\uc5b4 \ucf58\ud150\uce20 \uacf5\uc720\ub97c \uc6a9\uc774\ud558\uac8c \ud560 \ubaa9\uc801\uc73c\ub85c \ub9cc\ub4e4\uc5b4\uc9c4 \uac83\uc785\ub2c8\ub2e4. \uc0ac\uc6a9\uc790\uac00\u00a0<code>MainActivity<\/code>\uc5d0\uc11c \uc774 \uc561\ud2f0\ube44\ud2f0\ub85c \uc774\ub3d9\ud558\uc5ec \uc9c4\uc785\ud560 \uc218\ub3c4 \uc788\uc9c0\ub9cc, \ub450 \uac00\uc9c0 \uc778\ud150\ud2b8 \ud544\ud130 \uc911 \ud558\ub098\uc640 \uc77c\uce58\ud558\ub294 \uc554\uc2dc\uc801 \uc778\ud150\ud2b8\ub97c \ubc1c\uc0dd\uc2dc\ud0a4\ub294 \ub610 \ub2e4\ub978 \uc571\uc5d0\uc11c\u00a0<code>ShareActivity<\/code>\uc5d0 \uc9c1\uc811 \uc9c4\uc785\ud560 \uc218\ub3c4 \uc788\uc2b5\ub2c8\ub2e4.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>IntentFilter\ub780? Intent\ub294 \uba85\uc2dc\uc801 \uc778\ud150\ud2b8\uc640 \uc554\uc2dc\uc801 \uc778\ud150\ud2b8\ub85c \ub098\ub269\ub2c8\ub2e4. \uadf8\uc911 \uc554\uc2dc\uc801 \uc778\ud150\ud2b8\ub97c \ud1b5\ud574 \uc0ac\uc6a9\uc790\ub85c \ud558\uc5ec\uae08 \uc5b4\ub290 \uc571\uc744 \uc0ac\uc6a9\ud560\uc9c0 \uc120\ud0dd\ud558\ub3c4\ub85d \ud558\uace0\uc790 \ud560\ub54c IntentFilter\uac00 \ud544\uc694\ud569\ub2c8\ub2e4. \uc608\ub97c \ub4e4\uc5b4 \uc0ac\uc6a9\uc790\uac00 \ub2e4\ub978 \uc0ac\ub78c\ub4e4\uacfc \uacf5\uc720\ud588\uc73c\uba74 \ud558\ub294 \ucf58\ud150\uce20\ub97c \uac00\uc9c0\uace0 \uc788\ub294 \uacbd\uc6b0, ACTION_SEND\ub77c\ub294 Action \uc788\ub294 \uc778\ud150\ud2b8\ub97c \uc0dd\uc131\ud55c \ub2e4\uc74c \uacf5\uc720\ud560 \ucf58\ud150\uce20\ub97c \uc9c0\uc815\ud558\ub294 Extra\ub97c \ucd94\uac00\ud558\uba74 \ub429\ub2c8\ub2e4. \ud574\ub2f9 \uc778\ud150\ud2b8\ub85c startActivity()\ub97c \ud638\ucd9c\ud558\uba74 \uc0ac\uc6a9\uc790\uac00 \uc5b4\ub290 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"inline_featured_image":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[26],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/859"}],"collection":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=859"}],"version-history":[{"count":1,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/859\/revisions"}],"predecessor-version":[{"id":860,"href":"https:\/\/charlezz.com\/index.php?rest_route=\/wp\/v2\/posts\/859\/revisions\/860"}],"wp:attachment":[{"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=859"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=859"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/charlezz.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=859"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}