从其他程序包启动前台服务

问题描述 投票:0回答:1

我有一个包名为pa的应用程序A和一个包名为pb的应用程序B。 B具有称为fserviceB的前台服务。我想从应用程序A启动此fserviceB。我该怎么办?

android foreground-service
1个回答
0
投票

我认为您可以通过BroadcastReceiver类来做到这一点并收听广播

检查此链接:How to Send BroadCast from one app to another app

© www.soinside.com 2019 - 2024. All rights reserved.