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


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
ÃßõÃßõ : 286 Ãßõ ¸ñ·Ï
¹øÈ£ Á¦¸ñ
157
Android ÀÇ Storage Path ¹× ÄÚµå ±¸Çö ±â¼ú
156
¾Èµå·ÎÀ̵忡¼­ ¶ç¿ï¼ö ÀÖ´Â ¿©·¯°¡Áö ´ÙÀ̾ó·Î±×
155
3°¡Áö ¸Þ¼Òµå·Î ³¡³»´Â ¾Èµå·ÎÀÌµå ¸¶½Ã¸á·Î ±ÇÇÑ È¹µæ
154
ACTIVITY¿¡¼­ Ȩ ¹öÆ° CATCH ÇÏ´Â ÇÔ¼ö
153
ÇöÀç ½ÇÇàÁßÀÎ ACTIVITY¸¦ ¾Ë¾Æ¿À´Â ÇÔ¼ö
152
°­Á¦·Î ȨŰ ´­¸°°Í ó·³
151
¾Èµå·ÎÀ̵å ÀÎÅÙÆ® / intent
150
Android/iOS UserAgent ±¸ºÐ ¹× ¸ð¹ÙÀÏÀ¥ÆäÀÌÁö¿¡¼­ ¾Û ¼³Ä¡ ¿©ºÎ È®ÀÎ
Android À¥ ºê¶ó¿ìÀú ¸µÅ©·Î ¾Û ½ÇÇà ¹æ¹ý
148
WebView File Upload
147
Get RealPath from Uri
146
android.net.conn.CONNECTIVITY_CHANGE
145
Glide ¿¡¼­ Gif ·Îµå°¡ ³Ê¹« ´À·Á¿ä.
144
ImageView¸¦ Width ±æÀÌ¿¡ ¸ÂÃç Height Á¶Àý
143
Media Player¸¦ ÀÌ¿ëÇÑ À½¾Ç Àç»ý ¾îÇø®ÄÉÀÌ¼Ç ¸¸µé¾îº¸±â
142
DataBinding - findViewById ÀÌÁ¦ ¾È³ç~
141
[DataBinding] String Format Àû¿ëÇϱâ
140
[DataBinding] ImageView src¿¡ ¿¬µ¿ Çϱâ (ÇÔ¼ö ¿¬°á)
139
Scheme ¼³Á¤ ½Ã, ¾ÛÀÌ ¾Èº¸ÀÌ´Â Çö»ó
138
WebView¿¡¼­ Javascript Alert âÀÌ º¸ÀÌÁö ¾ÊÀ» ¶§
137
À¥ºäÈ­¸é¿¡¼­ ÀÓÀÇ µµ¸ÞÀÎÀ» Á¦¿ÜÇÑ »çÀÌÆ®´Â ¿ÜºÎ ºê¶ó¿ìÀú·Î
136
android webview url °¡·Îä±â / ³×ÀÌƼºê¿¡¼­ ÀÛ¾÷ | android
135
µð¹ÙÀ̽º ºÎÆýà ¾Û ½ÇÇàÇÏ´Â ¹æ¹ý / ÀçºÎÆà ½Ã ¾îÇà ½ÇÇàÇÏ´Â ¹æ¹ý
134
android | ²¨Áø È­¸é¿¡¼­ ¾Û ½ÇÇàÇϱâ / Àáµç È­¸é ±ú¿ì±â / Àá±Ý È­¸é À§·Î ½ÇÇà/
133
android ÇöÀç WebView¿¡¼­ ¿ÜºÎ ÆäÀÌÁö ºÒ·¯¿À±â / WebView »õâ ¶ç¿ìÁö ¾Ê±â / WebViewClient
132
Activity ¸¦ dialog style·Î ¸¸µé±â
131
webview ¾Æ·¡ button ³Ö±â
130
webview scroll ±â´É ¸·±â(touch´Â µÊ)
129
Service µî·ÏÇϱâ
128
booting ÈÄ¿¡ ÀÚµ¿À¸·Î ½ÇÇà µÇ´Â app ¸¸µé±â
¸ñ·Ï
¹ÂÁ÷Æ®·ÎÆ® ºÎ»ê±¤¿ª½Ã ºÎ»êÁø±¸ °¡¾ßµ¿ ¤Ó °³ÀÎÁ¤º¸Ãë±Þ¹æħ
Copyright ¨Ï musictrot All rights reserved.