Android getIntent on new activity is NULL when calling activity is destroyed

后端 未结 2 1731
盖世英雄少女心
盖世英雄少女心 2021-01-25 02:42

Do you guys have a workaround for the following problem?

In the onDestroy of a registration activity (when the user presses the back button) I call a new activity so the

2条回答
  •  被撕碎了的回忆
    2021-01-25 02:54

    Actually, I think I know what your problem is. I believe you are making this call:

     public AksProductionNumbers()
    

    in your activity constructor (as you state in your question) when you should be making it in the activity's onCreate method. getIntent will return null in the constructor.

提交回复
热议问题