App Lab Back Button


#1

One of my groups was working on their app in app lab and had incorporated a back button but are not sure how to code this. Has anyone tried this or know how to code this?


#2

Could you post the link to the project to see what they have so far? Might be easier to help.


#5

https://studio.code.org/projects/applab/aiswwZ2D-FsnpVixRdRXebZK2PKNF0DmI6s74F6afZs

So far they have the app coded to go to all of the other pages from the home screen but are working to get those screens coded to come back to the home screen. They already have the “map” and “Settings” pages set this way. However we aren’t sure how to make the app realize what screen they were on previously for the “go back” button. I hope that makes sense!


#6

I think I understand what the student is trying to do. Most of the pages do not need the back button because the Home page is the previous screen which can be accessed with the “Home Button”.
But when you click on the Question Mark, you go to a screen where you can click on “Survey”. In order to get back to the previous screen the student needs to add this code to the Survey code:

image