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

别来无恙 提交于 2019-12-02 05:17:36

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.

Try to put this

 Intent intent = getIntent(); // <-- returns null
    Bundle extras = intent.getExtras();

on "onCreate()" method of new activity

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!