Why is getCallingActivity always returning null?

后端 未结 6 1267
被撕碎了的回忆
被撕碎了的回忆 2021-01-20 19:06

I have a welcome screen that can be started as the first activity in my app, or it can be started by the main activity that the user spends their time in. I want it to act s

6条回答
  •  臣服心动
    2021-01-20 19:35

    Pass an extra in the Intent used with startActivityForResult(), indicating which mode you want. Read that extra via getIntent().getXXXExtra() (XXX depends on what data type you choose) in onCreate() of the newly-started activity.

提交回复
热议问题