SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
06/12/13 11:10 PM (12 years ago)

Linking to another screen

Hi there, I'm using a Custom HTML / Text document and I would like to make a link to another Custom HTML / Text document. Basically linking a screen to another screen. I can make a hyperlink, but I can only choose the target and not another screen. Is this possible ? If not in the BT control panel, maybe while compiling the code ?? For now I only publish my app for Android, but in the future maybe to IOS too. Hope someone has an answer. // Edwin.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/12/13 11:26 PM (12 years ago)
You could easily do this if you used the HTML screen instead of the Custom HTML/Text screen, and supplied the document via local document. Then you could just link to another document, and it would work perfectly. Or, you could use the HTML Pro plugin from the plugin market, and insert hyperlinks to any other screen in your app! Mark
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/12/13 11:57 PM (12 years ago)
GoNorthWest, The second option is what I need !! To bad it isn't possible with the default plugin.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/13/13 12:00 AM (12 years ago)
Well, here's one thing to consider. Each Custom HTML/Text screen actually has a URL for it. You can find the URL by opening up the BT_Config.txt file in an editor, and searching for that screen. If you have multiple of those types of screens, each one would have a different URL. You could try to link, from within one screen, to another, using those URLs. I haven't tried it, but I suspect it would work. Mark
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/13/13 12:35 AM (12 years ago)
Bummer, it doesn't work. In the configurationdata I found: loadScreenWithItemId":"5A5D7858DB1934E6523FF40" In my Custom HTML screen I've put a hyperlink of the type "other" (http doesn't work also). I click on "code" and it shows: <a href="5A5D7858DB1934E6523FF40">Another screen</a></strong></p> Then I open my app, click on the link, but I've got an error that the webpage (5A5D7858DB1934E6523FF40) isn't available.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/13/13 04:13 AM (12 years ago)
I seem to be reading things wrong lately, but if I'm close, then maybe this post can assist? https://www.buzztouch.com/forum/thread.php?tid=693B9A5E1C045FB47EA7F4D&fid=A00805FCC9962ECBA15A891&sortColumn=FT.id&sortUpDown=DESC&currentPage=6 You're basically looking to link one screen to another, but they're both HTML Screens right? And you can't really hyperlink them? It's also possible that Chris1's plugin might help, I dunno... https://www.buzztouch.com/plugins/plugin.php?pid=77049F441E270A6C7AD4433 Cheers! -- Smug
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/13/13 04:47 AM (12 years ago)
Smug, The plugin from Chris1 would probably does the trick, but I was hoping that it was possible by using the normal HTML5 (custom HTML) screens, since "loadScreenWithItemId" can also be found in the BT_config file. The plugin makes it easier to locate the screenid, but there must be somtething in the plugin that makes it so the hyperlink works. The post you mentioned is, for the most part, IOS. I'm developing for Android now, but maybe making the app available for IOS also. I think the best option is to use the plugin from Chris1 as it will work on both Android as IOS.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/13/13 05:02 AM (12 years ago)
Well, if 'loadScreenWithItemId' is available, it stands to reason that 'loadScreenWithNickname' would be available as well... Have you tried using that? Cheers! -- Smug
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/13/13 05:23 AM (12 years ago)
Smug, I've tried the itemid and nickname, both aren't working. In the BT_config I can find a https link about the page. If I put this into a link, the page opens, but when I go back, the previous page is empty (when actually it's not). I have to refresh the page to show the content again. The best solution in this is using the plugin from Chris1. If you have another solution I wil definitely test it. // Edwin
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
06/13/13 06:03 AM (12 years ago)
I'm just throwing darts, hoping something would stick... Chris always puts together an elegant solution, so I'm sure it'll do what you need it to. I just like trying things out :) Cheers! -- Smug
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/13/13 08:30 AM (12 years ago)
Edwin, My plugin is almost certainly what you need. In fact, I created it for the specific reason to do this very thing, knowing that the 'free' plugin didn't have the capability.
 
GoNorthWest
buzztouch Evangelist
Profile
Posts: 8197
Reg: Jun 24, 2011
Oro Valley, AZ
1,000,000
like
06/13/13 09:27 AM (12 years ago)
Here's what I get when I create a Custom HTML/Text Screen: { "itemId": "C31D2CA283B724275A61CA0", "itemType": "BT_screen_customHTML", "itemNickname": "Custom Baby", "navBarTitleText": "Custom Baby", "dataURL": "https://www.buzztouch.com/applications072212/JA862606BF7265F7XXXXXX/documents/customHTML_C31D2CA283B724XXXXXX.html" }, Notice the dataURL portion of this. Let's assume you create a couple Custom HTML/Text screens. Each one of these would have a dataURL associated with it. In order to move from one screen to another via hyperlink, I was thinking you would use this link, instead of the itemID. I haven't tried it, so I'm not sure it would work, but that was my thought. Mark
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/13/13 10:03 AM (12 years ago)
Mark, I have also tried the dataURL. On a Custom HTML page i've inserted the link and it works and opens another screen with content, but when I use the back button on my phone, it only shows an empty page and not the page with the link. I have to force a refresh of the page before it's visable again. Chris, is it possible with your plugin to go back to the original screen from where I linked by using the back button on my phone without refreshing the page ?
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/13/13 10:30 AM (12 years ago)
You should be able to - but then again, you should be able to using the Custom HTML page too. What kind of link are you pointing to in the Custom HTML page? Is it a URL to an online document?
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/13/13 10:49 AM (12 years ago)
It's no document but an URL. In the BT_config I found the url of the screen like this: https://www.buzztouch.com/applications020113/JA8ADBFDFAF83C1B320AE459E/documents/customHTML_3E43CBBBD402A1F226371D0.html In a custom HTML screen I simply link to this URL and it's showing the content. So far so good, but when I hit the back button on my Android device I assume it will open the previous page. Unfortunately I only see a blank page and not the content. When I manually refresh the page (I have to enable that in document behavior) it shows the content.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/13/13 01:19 PM (12 years ago)
I'm guessing my plugin will cause the same behavior then. You're not actually leaving the screen (or activity). Instead, it's all happening within a web browser. You're just following a link and then going back in history. Are you trying this on an actual device or an emulator? Have you tried a different html document with a different link? What happens when you load "www.google.com" into a custom URL screen, do a search, then press the back button?
 
SGB
Android Fan
Profile
Posts: 56
Reg: Mar 26, 2013
Goes
1,160
like
06/13/13 11:19 PM (12 years ago)
It's on an actual device. Also I've made a custom URL screen, linking to Google. After I do a search for "buzztouch" I got the results. Then, on my phone, I use the back button and I got redirected to my app screen from where I load the custom URL screen. I'm not going back to the Google Search screen.
 

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.