MmMm ftMmxmmmkr iiiS mmm mmwmmuA

MjfctfcP. Android ^nf (^/jufrlft action, data/type^ category ^jtaiif+iSW.

was® ft (r J > -J' w ra & £ ® ir # L m * & if. m ift 4/J* i i fi m,

9.1.4 Android Mtir Intent ft&JH'K mm^m^^A^im Intent.

• fiffc Intent: tn'/k i" component KffcfKj Intent setComponent(ComponentName)£X# setClass(Context, Class)

• fam Intent: comonent Mttfft Intent• && Intent j&tff

«SSU&JH: Intent Wffiffo Intent, Android >I<JIS® ¿«WtFf. M*/ M "MfJ, Android XStf#rl)<j£

flP^Mg Intent, MH'Iftfr, $ Intent flfcfrtifr "i Wfttiffillt Intent (fj Activity> Receiver »3c Service, Intent «ffi^Lr^Ji^iiMiil^iicLlffiflffi AndroidManifest.xml 'I'MWW IntentFilter Intent,

Android JiliMJi Intent fft action, type, category 3

• inife Intent j' action, RiJU^ftlffffr IntentFilter tfj action action, timstfcmto

• ifflS Intent type, data ^UM&ffilfc^io #1 action ft, Hteiftfl'-W» »{^«Wiiti&SKjifr Intent ffljRJ8^gffl, gW^ffiWIE.

• ill!« Intent URI «Affiii- M"J«fttl« Intent 'I'&ffiM scheme ({ill http: mailto: ) jffiif P^-Sio (nj k, Intent (ft scheme ifciBUJiSWk scheme

• iai« Intent f tidecategory. o Oil Intent «|Jlaft TW'HS»]: LAUNCHER CATEGORY ill ALTERNATIVE CATEGORY, (WtTr^SJ

WHfiKfflfti&ais^fi^aw^is»].

ftffJW fScfJa»if;",i8l11W AndroidManifest.xml MH f> ifttf^W^. fWjttl

<?xrnl version="l. 0" encoding-"utf-8"?>

<manifest xml ns : android="http: //schemas . android. com/apk/res/android" package="com.douban .android" android: versionCode " " android:versionName="l.G.G">

cuses-permission android: name="android-.permission . INTERNET" />

<appli cat ion a nd r o id:i con^"@dr awable/i con"

android:label="@string/app_name">

<activity android:name=".ActivityMain"

android:iabel="@string/app name">

<intent-filter>

<ac:t.ion android:name="android. intent. action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" />

</activity>

<activi ty android:name-".ActivityAuth"

android: 1 abel~"@string/app name"> </activity>

<activity android:name-".Activi. tyShowSaying" andrord:label -"@string/app name"> </activity>

<activity android:name ".ActivityAuthSuccess" android:label="0string/app name"> <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="haiyang" />

</activity>

</application>

</manifest>

t&m r + Activity & Activity Main, t'MfflMAP , Action) ^"android, intent, action.MAIN" , ActivityMain % ^ JS W ltJ ftj % — \ Activity o 9J ( category ) % "android.intent.category.LAUNCHBR"&/j<Sfil/t')lIij)fftIN'M, ActivityMain 3$) Activity

"^h Activity ActivityAuthSuccess, Action)^/"android.intent.action.VIEW"« (category) ft)J'J^JSfeti"android.intent.category.DEFAULT" , android.intcnt.category. BROWSABLE" mi ¿tmiUW Activity AuthSuccess i>IWiffi H »J «U'Wjo ffiffj fc&M&J*. j'ftiK^MWttfid^^^ scheme="haiyang", tfeMftiftSSift^ "haiyang://" tfWflW i'j Activity AuthSuccess Activity

Was this article helpful?

0 0

Post a comment