如何在两个 android 应用程序之间发送数据 其中一个是统一游戏

how to send a data between two android app one of them is unity game

我正在尝试制作一款 android 游戏(使用统一游戏引擎),我希望这款游戏具有语音识别功能。 我想使用 android 应用程序进行语音识别,该应用程序使用 google API,但我想将识别结果发送到另一个应用程序,即统一游戏。

我该怎么做?有效吗? P.S.: 我知道 google 提供了一个用于 unity 的插件,但我不想使用它。

您可以使用服务。带有 Messenger 的绑定服务将充当远程和本地进程之间的中介或带有 AIDL 接口。您还可以在远程进程上创建一个接收者来接收获得的服务和一个服务(发送者)。这是一步一步的好 link:http://jeanmeyblum.weebly.com/scripts--tutorials/communication-between-an-android-app-and-unity