Android intent bundle always null?

后端 未结 3 676
悲&欢浪女
悲&欢浪女 2020-12-21 18:28

I am running the below code. There are two snippets. The first is how I am setting the bundle and the second how I am retrieving it. For some reason every time i check the b

3条回答
  •  情书的邮戳
    2020-12-21 19:03

    When you are creating your intent, just put the extras right in there. you are trying to access the wrong bundle in your code above. Something like this should work.

        Intent intent = new Intent(this, com.hom.app.Hom.class);
        intent.putExtras("WELL", "yes");
        startActivity(intent);
    

提交回复
热议问题