ȸ¿ø°¡ÀԡžÆÀ̵ð/ºñ¹øã±â
ȨÀ¸·Î

Android À¥ ºê¶ó¿ìÀú ¸µÅ©·Î ¾Û ½ÇÇà ¹æ¹ý
7³â Àü
¾Èµå·ÎÀ̵å ÀÚü ºê¶ó¿ìÀú·Î ƯÁ¤ ¾ÛÀ» ½ÇÇà ÇÏ´Â °ÍÀÌ °¡´ÉÇÏ´Ù.

ÀÌ°ÍÀº ¾Èµå·ÎÀ̵å OS°¡ °¡Áø intentÀÇ Æ¯Â¡À¸·Î °¡´É ÇÑ°Í °°´Ù.

Intent ÀÇ ÀÚ¼¼ÇÑ ³»¿ëÀº ¾Èµå·ÎÀ̵å API Guide¿¡ Àִ  Intents and Intent Filters ¸¦ º¸¸é ¾Ë¼ö ÀÖ´Ù.


1. ¸ÕÀú ½ÇÇà ÇÏ°íÀÚ ÇÏ´Â ¾ÛÀÇ AndroidManifest.xml ÆÄÀÏ¿¡¼­ ½ÇÇàÇÏ°íÀÚ ÇÏ´Â Activity¾Æ·¡¿¡ Intent-filter¸¦ ¼±¾ðÇØÁØ´Ù.


<activity android:name="SearchActionActivity">
             <intent-filter>  
                <action android:name="android.intent.action.VIEW"/>  
                <category android:name="android.intent.category.DEFAULT"/>  
                <category android:name="android.intent.category.BROWSABLE"/>  
                <data android:scheme="callMyApp" android:host="search"/>  
            </intent-filter>
</activity>


2. À¥ ºê¶ó¿ìÀú »ó¿¡¼­ ¸µÅ© ¼³Á¤ ¹æ¹ý
- À¥¿¡¼­ ƯÁ¤ URLÇüÅ·Π¼³Á¤À» ÇØÁà¾ß ÇØ´ç ¾ÛÀÌ È£ÃâµÇ¾î ½ÇÇà µÇ¾î Áø´Ù.

<a href="callMyApp://search"> ³ªÀÇ ¾Û °Ë»ö ½ÇÇà </a>

À§¿Í°°ÀÌ À¥ÆäÀÌÁö¿¡¼­ ¸µÅ©¸¦ ¼³Á¤ÇØ µÎ¸é ÇØ´ç ¾ÛÀÌ ¼³Ä¡µÇ¾î ÀÖÀ¸¸é ÇØ´ç SearchActionActivity°¡ ¹Ù·Î ½ÇÇà µÇ¾îÁö´Â °É ¾Ë¼ö ÀÖ´Ù.

µû¶ó¼­, ´Ù¸¥ ¾×¼ÇÀÇ Activity¸¦ ½ÇÇàÇÏ°í ½Í´Ù¸é ´Ù¸¥ Activity¿¡ intent-filter¸¸ Ãß°¡ÇØÁÖ¸é °¡´ÉÇÏ´Ù.

<activity android:name="TakePhotoActionActivity">
             <intent-filter>  
                <action android:name="android.intent.action.VIEW"/>  
                <category android:name="android.intent.category.DEFAULT"/>  
                <category android:name="android.intent.category.BROWSABLE"/>  
                <data android:scheme="callMyApp" android:host="takePhoto"/>  
            </intent-filter>
</activity>

À¥¿¡¼­ È£Ãâ ¹æ¹ýÀº

<a href="callMyApp://takePhoto"> ³ªÀÇ ¾Û »çÁø Âï±â ½ÇÇà </a>


3. ÇÊ¿ä¿¡ µû¶ó¼­ ¾ÛÀÌ ¼³Ä¡ µÇ¾î ÀÖÀ¸¸é ½ÇÇàÇÏ°í ¼³Ä¡ µÇ¾î ÀÖÁö ¾ÊÀ¸¸é ±¸±Û Ç÷¹ÀÌ ¸¶ÄÏÀ¸·Î À̵¿ ÇÏ°í ½Í´Ù°í ÇÑ´Ù¸é intent Àü´Þ ¹æ½ÄÀ¸·Î È£Ãâ ÇÏ¸é µÈ´Ù.(Android Only)

±âº» Çü½ÄÀº ¾Æ·¡¿Í °°´Ù.

Intent://[host¸í]?ÆĶó¹ÌÅÍ=Æĸ®¹ÌÅÍ°ª
#Intent;scheme=callMyApp;action=android.intent.action.VIEW;category=android.intent.category.BROWSABLE;package=com.test.myapp;end


°£´ÜÇÑ È£Ãâ ¿¹
<a href="Intent://takePhoto#Intent;scheme=callMyApp;package=com.test.myapp;end">
³ªÀÇ ¾Û »çÁø Âï±â ½ÇÇà </a>




3. ¾Û¿¡¼­ ÆĶó¸ÞÅÍ °ª ¹Þ¾Æ¼­ ó¸® Çϱâ
- ¾Û¿¡¼­ È£ÃâµÇ¾îÁø Activity ¿¡¼­ Intent¸¦ ÅëÇؼ­ µé¾î¿Â µ¥ÀÌÅÍ¿¡¼­ ÆĶó¸ÞÅÍ °ªÀ» ¹Þ¾Æ¼­ ó¸® ÇÒ¼öµµ ÀÖ´Ù.

Uri uriData = getIntent().getData();
String photoNumber = uriData.getQueryParameter("photoNumber ");

À¥¿¡¼­ È£Ãâ
<a href="callMyApp://takePhoto?photoNumber=1"> ³ªÀÇ ¾Û 1¹ø »çÁø º¸±â </a>


ÀÌ»óÀ¸·Î À¥¿¡¼­ ¸µÅ©·Î ¾Èµå·ÎÀÌµå ¾ÛÀÇ È£ÃâÀ» ¾Ë¾Æº¸¾Ò½À´Ï´Ù.

ÀÌ°ÍÀÌ µÇ´Â °ÍÀº Android OS»ó¿¡¼­ ±âº»ÀûÀ¸·Î Intent È£Ãâ ¹æ½ÄÀ» Áö¿øÇϱ⠶§¹®¿¡ °¡´ÉÇÏÁö ¾Ê³ª »ý°¢µË´Ï´Ù.



Âü°í »çÀÌÆ®
http://developer.android.com/guide/components/intents-filters.html
http://developer.naver.com/wiki/pages/UrlScheme
ÃßõÃßõ : 283 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
1,346
À©µµ¿ì ¼­¹ö 2019 Ãë¾àÁ¡ Á¡°Ë º¸¾È
1,345
À©µµ¿ì ¼­¹ö 2019 Ãë¾àÁ¡ Á¡°Ë º¸¾È (windows server 2019)
1,344
Windows Ãë¾àÁ¡Áø´Ü º¸¾È°¡À̵å¶óÀÎ
1,343
Windows Admin Center¸¦ ÅëÇÑ ¼­¹ö °ü¸®
1,342
À©µµ¿ì ¼­¹ö¿¡¼­ ½ÇÇàµÇ´Â ¼­ºñ½º È®ÀÎ
1,341
Chrome NET::ERR CERT REVOKED ÇØ°á¹æ¹ý
1,340
cmd ¸í·É¾î (¸í·É ÇÁ·ÒÇÁÆ® ¸í·É¾î) ¸ðÀ½
1,339
Windows10 ƯÁ¤ ÇÁ·Î±×·¥(OCS 2007 R2)¿¡¼­ ÷ºÎÆÄÀÏ µå·¡±×¾Øµå·ÓÀÌ ¾È µÇ´Â Çö»ó
1,338
À©µµ¿ì ·Î±×, °ü¸® À̺¥Æ® »èÁ¦
1,337
Ŭ¸° ºÎÆÃ
1,336
Windows ±¸¼º ¿ä¼Ò ÀúÀå¼Ò¿¡¼­ ÆÄÀÏ ¼Õ»ó °Ë»ç
1,335
Windows Defender °Ë»ç ±â·Ï »èÁ¦Çϱâ
1,334
°£´ÜÇÑ À©µµ¿ì 10 Á¤Ç° ÀÎÁõ (Å©·¢ÇÁ·Î±×·¥ ÇÊ¿ä¾øÀ½)
1,333
¿À·ù³­ Æú´õ °­Á¦»èÁ¦ ¹æ¹ý
1,332
Å©·Ò¿¡¼­ Ç÷¡½Ã Ç×»ó Çã¿ëÇϵµ·Ï ¼³Á¤Çϱâ (·¹Áö½ºÆ®¸®) reg ÆÄÀÏ ¸¸µé±â
1,331
GPT µð½ºÅ©¸¦ MBR µð½ºÅ©·Î º¯È¯
1,330
MBR µð½ºÅ©¸¦ GPT µð½ºÅ©·Î º¯È¯
1,329
±¸±Û °Ë»öÀ» 200% È°¿ëÇÏ°Ô ÇØÁÖ´Â °Ë»ö ¸í·É¾î ÃÑÁ¤¸®
1,328
[Jquery] jQuery·Î ¿ìŬ¸¯ ¹æÁö, µå·¡±× ¹æÁö, ¼±Åà ¹æÁö (IE10, ÆÄÀ̾îÆø½º, Å©·Ò È®ÀÎ)
1,327
php »ç¿ëÀÚ Á¢¼ÓIP, ºê¶ó¿ìÀúÁ¤º¸, osÁ¤º¸, http, https Á¢¼ÓÇÁ·ÎÅäÄÝ ¾Ë¾Æ¿À±â
1,326
[PHP] IE ºê¶ó¿ìÀú Á¢¼Ó °ËÃâÇϱâ
1,325
À©µµ¿ì10 ½Ã½ºÅÛ ¿¹¾à ÆÄƼ¼Ç È®ÀÎ ¹× »èÁ¦
1,324
À©µµ¿ì10 º¹±¸ ÆÄƼ¼Ç »èÁ¦ ¹æ¹ý
1,323
À©µµ¿ì10 ºÎÆÃÁö¿¬ °ËÀºÈ­¸é¿¡¼­ ¸îºÐ°£ ¸Ó¹«´Â Çö»ó ÇØ°á¹æ¹ý
1,322
»ï¼º³ëÆ®ºÏ ¹ÙÀÌ¿À½º ÁøÀÔÀÌ ºÒ°¡´ÉÇÑ °æ¿ì ¹ÙÀÌ¿À½º À缳ġ¿Í NVRAM ÃʱâÈ­
1,321
ÀͽºÇ÷η¯(IE)ÀÇ ±¸±Û °Ë»ö°ø±ÞÀÚ Çѱ۷Πº¯°æ ¹æ¹ý
1,320
À©µµ¿ì 10 ±âº» ¾Û »èÁ¦ ¹× º¹±¸
1,319
meta ÅÂ±× http-equiv ¼³Á¤¹æ¹ý°ú Â÷ÀÌÁ¡
1,318
±¸±Û(Google)°Ë»ö¿¡¼­ °í±Þ¿¬»êÀÚ¸¦ ÀÌ¿ëÇÏ¿© ¸¹Àº Á¤º¸¸¦ ¾ò´Â ¹æ¹ý
1,317
ÇÁ·Î±×·¥ ¾øÀÌ Çϵåµð½ºÅ© º¹»ç ¹× ¹é¾÷Çϱâ
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.