在后台运行活动

发布于 2024-11-27 19:47:43 字数 119 浏览 4 评论 0原文

我正在使用一项活动在收到彩信后获取彩信附件。我已经为此完成了 MMS 侦听器,它将调用该活动,该活动将使用 getContentResolver() 来获取附件。我希望该活动在后台运行,而不向用户显示空的 UI。有办法做吗?

I'm using an activity to get MMS attachment once a MMS is received. I have completed the MMS listener for this and it will call the activity, which will use getContentResolver() to grab the attachment. I want the activity to run in the background, without showing the empty UI to the user. Is there anyway to do it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

烂人 2024-12-04 19:47:43

您将需要使用服务来实现这一点。这基本上是一项没有风景的活动。查看下面的链接了解更多信息。

http://developer.android.com/guide/topics/fundamentals/services.html

You will want to use a service to make this happen. It is basically an activity without a view. Check out the link below for more info.

http://developer.android.com/guide/topics/fundamentals/services.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文