Skip to content

Commit ffd8f6f

Browse files
committed
Update Demo
1 parent 197d18d commit ffd8f6f

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

PluginMain/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
android:exported="true">
9090
<intent-filter>
9191
<action
92-
android:name="com.plugin.core.STUB_EXACT" />
92+
android:name="${applicationId}.STUB_EXACT" />
9393
<category
9494
android:name="android.intent.category.DEFAULT" />
9595
</intent-filter>

PluginMain/PluginMain-debug.apk

1.78 KB
Binary file not shown.

PluginMain/src/com/example/pluginmain/MainActivity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ protected void onCreate(Bundle savedInstanceState) {
5656
// 监听插件安装 安装新插件后刷新当前页面
5757
registerReceiver(pluginInstallEvent, new IntentFilter(PluginCallback.ACTION_PLUGIN_CHANGED));
5858

59+
//测试利用Action打开在宿主中唤起插件receiver
60+
Intent intent = new Intent("test.rst2");//两个Receive都配置了这个aciton,这里可以同时唤起两个Receiver
61+
intent.putExtra("testParam", "testParam");
62+
sendBroadcast(intent);
63+
64+
//测试通过宿主service唤起插件service
5965
startService(new Intent(this, MainService.class));
6066
}
6167

0 commit comments

Comments
 (0)