Skip to content
Advertisement

Java Android String Intent displaying null when moving to previous screen

So I have a screen where a user enters their name, on button click they are redirected to a menu where it displays their name.

In the menu screen I have a button that takes me to another screen (About Me), on that screen I have a button with an Intent to go back to the Menu Activity.

The issue is that when I click the button with the Intent to go back, the name displays as null instead of what the User entered.

This does not happen when I use the actual android navigation buttons to go to the previous screen, only the Button i created to go back to the Menu Activity.


Launcher Activity where user enters their name

JavaScript

Menu activity where it displays the users name

JavaScript

About me activity, when I click the button to back to Menu, i get “Dear null”

JavaScript

Advertisement

Answer

Your problem is in About me activity screen

JavaScript

This time you are not passing an extra field, so you are getting null

Answer 1

JavaScript

Answer 2

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement