Android的:如何获得由服务收到的意图是什么? [英] Android: how to get the intent received by a service?

查看:81
本文介绍了Android的:如何获得由服务收到的意图是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始一个服务,意图在那里我把额外的信息。

I'm starting a service with an intent where I put extra information.

我怎样才能在我服务的code的意图是什么?

How can I get the intent in the code of my service?

没有像 getIntent()。getExtras()服务就像活动的功能。

There isn't a function like getIntent().getExtras() in service like in activity.

推荐答案

覆盖 ONSTART() - 您收到意图作为一个参数。

Override onStart() -- you receive the Intent as a parameter.

这篇关于Android的:如何获得由服务收到的意图是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆