标签: android
Android会在启动时调用我的活动onCreate()。
onCreate()
在我的活动的onCreate()中,我能说出启动我的活动的意图吗?
谢谢。
答案 0 :(得分:3)
简单 - 使用getIntent()。您还需要覆盖onNewIntent(Intent intent)。我通常会编写一个名为HandleIntent(Intent intent)的方法,并从onCreate()和onNewIntent()调用它。
getIntent()
onNewIntent(Intent intent)
HandleIntent(Intent intent)
onNewIntent()