Manifest.xml
<activity
android:name=".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=".MainActivity2"
android:label="@string/app_name" >
<intent-filter>
<action android:name="aaa.bbb.ccc" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
通过Intent实现跳转
Intent intent = new Intent();
intent.setAction("aaa.bbb.ccc");
intent.addCategory("android.intent.category.DEFAULT");
startActivity(intent);
两个工程之间页面的跳转
Intent intent = new Intent();
intent.setClassName("com.example.demo", "com.example.demo.MainActivity");
startActivity(intent);
自定义权限
<permission
android:name="fff.eee"
android:protectionLevel="normal"
></permission>
声明自定义权限
<activity
android:permission="fff.eee"
android:name=".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>