Creating a GO BACK functionality in Native app

Hi guys. In native app design, how would I create a go back function like in a web page design, which has the option to go to previous page.
So far I have been able to just send the user to a certain destination after pressing the GO BACK button which is more like static, but I was wondering how do I make it responsive and dynamic.

1 Like

What I think should work is if you make it so that a new element shows up ontop of the last, then when you hit the back button it hides the current layer revealing the previous one! Tell me if that works!!

In NativeApp Bubble, I guess you don’t have different “page” but they are groups you hide and show .

on way to achieve what you want is to put all thoses group “page” in one group “main”,

then create a custom state for the main group vuegroup# which will be a number,
for each group “page” on condition , “if Main status vuegroup# is 1” then element visiblle… if Main status View# is not 1, then element not visible

you do that each group with different number …then in the workflow to show a group, you set the state of maingroup to 1 …then the group 1 show …if maingroup status to 2 …group 1 will hide and group 2 will show. etc…

to make the back button, and the next if you want it is easy …when you click to the button next you set in the workflow the state maingroup = Currentstate+1
when you click to the button back , you set in the workflow the sate maingroup = currrentstate-1

Just wondering do you think my way would work?

if you are using different pages it won’t be very dynamic if you use the way I explained, same page different group, it much dynamic.

I had done it before like you said. My only problem was, if there are two ways to come into one page then how do i go back to where I originally came from. Your idea works if there is only one way to come to that place.
e.g. if I can go to group B from group A and group C, how would i go back to either one.

I guess it could work using states, but Im not sure about dynamic!
Thanks for your response.

In my native apps, I refer to pages as stages, as in, profile stage, which is what a user would consider his/her profile page.

I set a state on the native Bubble page (i.e. index) called current_stage. When I need to switch stages, I set a different value to the state. For example, when someone clicks a link to view their “profile page”, I set the state of current_stage to profile. Then I create 2 conditions on the group that holds all the “profile page” elements. The first is that when current_stage is profile, this element is visible. The second is the opposite: when current_stage is not profile, this element is not visible.

To accomplish a “back” function, add a second state called previous_stage. When someone navigates within your app, set the value of the previous_stage to be the formerly visual stage. If the back button is pressed, simply swap the current_stage with the previous_stage value. The conditions on each group (stage) will take care of the rest. NOTE the value of the state has to remain constant. “profile” and “Profile” aren’t the same.

Thank you.!

I am having a small problem with this. How can I establish this condition.
If user A has already sent user B a message before, and now when user A wants to send a new message to user B again, instead of it creating a new conversation how do I go about adding this new message to the previous conversation if there is any.
I tried using the yes/no state, but that would trigger in general and not specific to the particular user.
All this is happening when user A is trying to contact user B in a listings page and not directly in the messaging section. Is it possible to send data to a repeating group directly and to a specific row.
Thanks!

I’m confused. Is this a part of the back button functionality?

No its not. But I Just wanted to clarify that. Sorry!

For the back functionality I created a custom state (type=text). I had to set the groups value as say 1 and next page value as 2, and when the user is in group 2 and wants to go back to group 1, I created the workflow, set state to go back to 1.

Please help me with the messaging part! thanks

I can have a back button and when clicked, I can assign it to go to only one specific page. For eg. from 2 to 1. How about if there are more than one way of coming to a certain page. How do I create the back functionality.
in this case, I have a custom state show (type=text). from B I can go to C and from C only back to B.
Please help. Thanks

This topic was automatically closed after 70 days. New replies are no longer allowed.