在我的活动的oncreate()中,我可以告诉我的活动是什么意图吗?

时间:2010-09-30 05:00:36

标签: android

Android会在启动时调用我的活动onCreate()

在我的活动的onCreate()中,我能说出启动我的活动的意图吗?

谢谢。

1 个答案:

答案 0 :(得分:3)

简单 - 使用getIntent()。您还需要覆盖onNewIntent(Intent intent)。我通常会编写一个名为HandleIntent(Intent intent)的方法,并从onCreate()onNewIntent()调用它。