Android-如何将数据发送到另一个应用程序而又不将其置于前台? [英] Android - How to send data to another app without bringing it to the foreground?
问题描述
我们正计划将我们的应用程序与另一个人的应用程序链接,我们想知道,我们如何能够在Android中让我们的应用程序将数据发送到另一个人的应用程序而又不将另一个应用程序置于前台?
We are planning to link our app with another person's app, and we would like to know, how would we be able to in Android for our app to send data to that other person's app without bringing the other app to the foreground?
此解决方案行得通吗?: 如何发送BroadCast从一个应用到另一个应用
Would this solution work?: How to Send BroadCast from one app to another app
在继续之前,我想确定一下.
I would like to know for sure before I proceed.
推荐答案
是.使用广播Intent
发送数据,并在接收应用程序上实现BroadcastReceiver
.这不会自动将接收应用程序置于前台.
Yes. Send your data using a broadcast Intent
and implement a BroadcastReceiver
on the receiving app. This will not automatically bring the receiving app to the foreground.
这篇关于Android-如何将数据发送到另一个应用程序而又不将其置于前台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!