Android学习之Intent中显示意图和隐式意图的用法实例分析

2019-12-10 19:55:43王冬梅
  • package="net.loonggg.intent"  android:versionCode="1" 
  • android:versionName="1.0" >   <uses-sdk 
  • android:minSdkVersion="8"  android:targetSdkVersion="17" />  
  • <application  android:allowBackup="true" 
  • android:icon="@drawable/ic_launcher"  android:label="@string/app_name" 
  • android:theme="@style/AppTheme" >   <activity 
  • android:name="net.loonggg.intent.MainActivity"  android:label="@string/app_name" >  
  • <intent-filter>   <action android:name="android.intent.action.MAIN" />  
  • <category android:name="android.intent.category.LAUNCHER" />   </intent-filter>  
  • </activity>   <activity android:name="net.loonggg.intent.SecondActivity" >  
  • <intent-filter>   <!-- 自定义的动作 --> 
  • <action android:name="net.loonggg.xxx" />   <!-- 自定义的scheme和host --> 
  • <data  android:host="www.baidu.com" 
  • android:path="/person"  android:scheme="loonggg" />  
  • <!-- 自定义的类型 -->  <data android:mimeType="person/people" />  
  • <!-- 附加信息 -->  <category android:name="android.intent.category.DEFAULT" />  
  • </intent-filter>   </activity>  
  • </application>   </manifest>