AndroidManifest.png
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.elly.myapplication">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".BActivity" android:exported="false">
<!--//export 是否导出(导出就可以被其它应用调用访问 false 不能被外部应用访问 true 能被外部应用访问)-->
<intent-filter>
<action android:name="com.example.elly.myapplication.intent.action.BActivity"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
</manifest>
图片.png
public final static String ACTION = "com.example.elly.myapplication.intent.action.BActivity";
//
startActivity(new Intent(BActivity.ACTION));
网友评论