<activity
android:name="com.prtek.yantest.MainActivity" android:exported="true"
android:screenOrientation="portrait">
<intent-filter >
<action android:name="com.test"/>
<data android:scheme="file"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
在总apk中使用广播来启动分支apk的页面,需要预先安装分支apk。
Intent intent = new Intent("com.test",Uri.parse("file://123456"));
intent.setFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
startActivity(intent);
把分支apk打包成jar包。
1,点击分支apk—右键—Export—Java—JAR file—next—按下图勾选,同时填写路径,到最后finish会生成一个SunApp.jar
3,点击总apk—右键—Properties—Android,取消选中Is Library---Add—SonApp:
或添加lib:
