gpt4 book ai didi

Flutter - Reference Service file from another plugin into the app's manifest file(Ffltter-将服务文件从另一个插件引用到应用程序的清单文件中)

转载 作者:bug小助手 更新时间:2023-10-25 12:23:34 26 4
gpt4 key购买 nike



I made the plugin in flutter which defines a service for the app. for e.g. MyFirebaseMessagingService.

我在flutter中做了一个插件,它为应用程序定义了一个服务。例如MyFirebaseMessagingService。


As we all know we need to reference it from AndroidManifest.xml.
I tried to define the service inside the plugin's AndroidManifest and included this plugin into the application, when I built the application this does not invoke.

众所周知,我们需要从androidManifest.xml中引用它。我试图在插件的androidManifest中定义服务,并在构建不会调用的应用程序时将该插件包含到应用程序中。


<service android:name=".MyFirebaseMessagingService" android:exported="false" android:directBootAware="true">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT" />
</intent-filter>
</service>

Other than that I tried to reference .MyFirebaseMessagingService from the application's AndroidMainfiest like so: com.example.myPlugin.MyfirebaseMessagingService but it can't see it.

除此之外,我尝试从应用程序的androidMainfiest中引用.MyFirebase MessagingService,如下所示:com.example.myPlugin.MyfirebaseMessagingService,但它看不到它。


So THE QUESTION IS, if there is a way to make application use the services from the plugin ?

所以问题是,是否有一种方法可以让应用程序使用插件中的服务?


更多回答
优秀答案推荐
更多回答

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com