Discussion Forums  >  Uncategorized

Replies: 14    Views: 249

guidoverduci
Lost but trying
Profile
Posts: 68
Reg: Dec 29, 2011
NorCal
680
02/09/12 11:15 AM (12 years ago)

back button after external link

I put together a html page that goes to another site. Basically entering in a zip code will bring up a weather website with weather for the zip code entered. My question is, when your on the external website and you push the back button, it takes you to the home page of the app. Is there anyway to go back from an external site to the previous page where the zip code was entered? thanks.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
02/09/12 11:40 AM (12 years ago)
I have several apps that go back into the app. I'm not sure why mine dot and your's don't. Download my app from my site: www.Myskylla.wordpress.com Send me your apk and I'll try to figure it out. Fred
 
guidoverduci
Lost but trying
Profile
Posts: 68
Reg: Dec 29, 2011
NorCal
680
like
02/09/12 11:47 AM (12 years ago)
I have iOS. It never leaves the app completely, when entering the zip code, it pulls in the weather website page and I can surf there site if I wanted too. But my nav bar is still at the top and when I hit the default back button, it takes me to my homepage of the app. I'm trying to get it to go back to the page where I entered in the zip code. Make sense?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
02/09/12 11:50 AM (12 years ago)
Can't you select the current page with the right bar nav button. Do you have a header on this page? Fred
 
guidoverduci
Lost but trying
Profile
Posts: 68
Reg: Dec 29, 2011
NorCal
680
like
02/09/12 12:00 PM (12 years ago)
I could, and assuming there's a way I could change the text of the right nav bar button (previous or back is not listed as choices) then I'd be left with a left button that I can label anything but essentially closes the current page and returns to the previous (except in this example, it returns me to the home page) and I'd have a right button that would bring me back to whatever page I tell it, in this case my weather page. Clear as mud?
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
02/09/12 12:25 PM (12 years ago)
Use my search engine to find the previous post about changing the labels. I would search on the word label. If successful please post the link. Fred Engine found at www.MySkylla.wordpress.com
 
guidoverduci
Lost but trying
Profile
Posts: 68
Reg: Dec 29, 2011
NorCal
680
like
02/09/12 01:55 PM (12 years ago)
no luck with the search. But assuming I can change the text of the right nav bar to Back and point it to the correct page, I still would have the problem where the left nav bar button would (except on this one page) do the same thing. Ideally, I'd like 1 button that goes back to the previous page. Thats it. Unfortunately, pushing the back button in this case takes me to the home page.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
02/09/12 02:12 PM (12 years ago)
Yes on changing the text, the process is to hack into the Source Code an replace the image that's being displayed with the new image. Could be a simple as just replacing the old image with a new image (use the identical) name. Your ''home'' button may be labeled ''xyz'' in the control panel, but the user never sees that. Fred
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
02/09/12 02:16 PM (12 years ago)
Just a thought, you could replace an image you don't use with MySkylla's icon and link the button to my blog www.myskylla.wordpress.com , Now that would be really cool. Fred
 
guidoverduci
Lost but trying
Profile
Posts: 68
Reg: Dec 29, 2011
NorCal
680
like
02/09/12 02:34 PM (12 years ago)
Thanks for the help Fred, I might have to rethink my approach to find the right solution. I would have thought that a button in the left nav bar that said back was perfect, unfortunately I have three different pages that have external links on them and when the link is pushed the back button takes you home instead of back.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
02/09/12 04:04 PM (12 years ago)
Why not a right nav bar button that says back for just those screen? Fred
 
guidoverduci
Lost but trying
Profile
Posts: 68
Reg: Dec 29, 2011
NorCal
680
like
02/09/12 05:00 PM (12 years ago)
I think that's what I'll end up doing. The left nav bar for those screens only will say home and all the other screens it will say back. Then, for the 3 three with the issue, I'll have a right nav bar button that says back. Now I'll just have to figure out editing the source code like you suggested.
 
Fred@mySkylla com
Android Fan
Profile
Posts: 5259
Reg: Oct 03, 2011
location unknow...
62,560
like
02/09/12 05:38 PM (12 years ago)
Try just switching the image. Fred
 
CodeBuster
I hate code!
Profile
Posts: 26
Reg: Jan 04, 2012
Bedford, TX
10,260
like
02/09/12 05:58 PM (12 years ago)
I use the browser back button at the bottom left of the page when I show a CustomURL page that could go to another page that doesn't return properly. If it's my page, I'll have a Back or Done or Cancel button that takes me back to the original CustomURL page. Also use refresh button sometimes on the bottom right. It's under Document Behavior.
 
ScifiMan
Code is Art
Profile
Posts: 9
Reg: Dec 16, 2011
Auckland, NZ
90
like
02/19/12 03:15 AM (12 years ago)
@guidoverduci Have tried this as a work around.. unchecking this code in btv1.5 gets the 'device' back button mimic the browser back button and goes back one external url page at a time. Depending on whether you are using custom html or custom url change the following in either one or both as necessary; (1) BT_screen_webView.java – handleBackButton() --- reactivate the deactivated code before this (around line 417 -420) (2) BT_screen_customHtml.java – handleBackButton()--- reactivate the deactivated code before this (around line 417 -420) The code after uncommenting should look like this ________________________________________________________________________ public boolean onKeyDown(int keyCode, KeyEvent event){ if ((keyCode == KeyEvent.KEYCODE_BACK) && webView.canGoBack()){ webView.goBack(); return true; } //not the back-key.. return super.onKeyDown(keyCode, event); } _______________________________________________________ post update : Sorry above workaround is for android
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.