Discussion Forums  >  Uncategorized

Replies: 6    Views: 336

ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
06/25/11 09:49 PM (14 years ago)

Open in Safari link ...

Hi Everyone, I've built my first app with Buzztouch and the whole experience has been just just fantastic. I've got a fully functioning app for our weekly podcast! Well done to the buzztouch team on making such great tools available! However, when I link to our website (Custom URL screen) it comes up nicely but when I choose Open in Safari I get redirected to http://www-open-opensocial-googleusercontent.com/gadgets/?.......big_long_url.... And then up comes a google custom search engine. See image here: https://skitch.com/ictguy/fgs8e/dock Is this normal? How can I make it just open the webpage we are looking at? TIA Darrel
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 08:37 PM (14 years ago)
This is strange behavior for sure. If you're using buztouch v1.5, have a look in the console with the app running. The console in Xcode. With the console open, click the link and look to see the output. It should show you want URL it's trying to open. Naturally, this URL should be the same URL you enter in your control panel. If it's not, something's haywire. It sounds to me like you have added the 'open in safari' button in the lower toolbar. Clicking this button should load the same URL the screen is showing. Again, tap the button, look at the console. See if that helps isolate what's happening.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
06/27/11 08:53 PM (14 years ago)
Thanks for getting back to me, Here is what I have in the Buzz Touch App Control Panel (See image below): https://skitch.com/ictguy/fg9gk/manage-buzztouch-app This what the console outputs before I even click on the Open in Safari link. 2011-06-28 13:38:55.096 App name [92159:207] BT_screen_webView: shouldStartLoadWithRequest: URL: http://www-open-opensocial.googleusercontent.com/gadgets/ifr?url=http%3A%2F%2Fwww.google.com%2Fcoop%2Fapi%2F007672287586907941949%2Fcse%2Fgwob1r3lpgk%2Fgadget&container=open&view=home&lang=all&country=ALL&debug=0&nocache=0&sanitize=0&v=9f8f074dd348d9de&source=http%3A%2F%2Fwww.edtechcrew.net%2F&parent=http%3A%2F%2Fwww.edtechcrew.net%2F&libs=core%3Acore.io%3Arpc#st=%25st%25&rpctoken=2072560024 It looks like it loading the site as an iframe. I can't remember ever having used google's open social?? I'm using Buzz touch 1.5 Cheers Darrel
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 09:09 PM (14 years ago)
Interesting...maybe the little Google Gadget on the right side of this page http://www.edtechcrew.net/ has something to do with it? For sure this is strange behavior. The message in the shouldStartLoadWithRequeist method does give some clues. THe open in safari link opens the 'last' URL opened by the web-view. This should be the URL you enter in the control panel, clearly it's not. It looks like the HTML at the page has some strange re-direction, or like you said, iFrame or something loading that you're not aware of. Hmm... This is an interesting situation, thinking about ways to get around it when the Open in Safari link is tapped. One way would be to write some Objective C to to some conditional checks on the URL being loaded to force the Open Safari link to load a URL you entered in the code or something. This is doable but doesn't seem idea. If you're using a bunch of Custom URL screens the code would get complicated real fast. Another idea; a) Create a new screen item in your list of screen, use 'Open Safari' for this item's nickname, choose 'Launch Native App' from the drop down list. Choose Safari for the native app to launch, enter the URL to open in Safari b) Back on the Custom URL screen settings....remove the option to use the bottom tool-bar Open in Safari Button. c) Add a right-side navgiation button to this screen. This will appear in the top-right. For the button type, choose 'Action' or something appropriate for opening a link. d) For the right-side-button screen to load, enter 'Open Safari', the nickname of the launch native app feature you created. Hope this makes sense.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
06/27/11 09:22 PM (14 years ago)
Hello David, Thanks for such a detailed response. I think you might be onto something with the custom google search engine we have on the site (I never thought of that!). I will do some investigation and report back.
 
ictguy
Aspiring developer
Profile
Posts: 564
Reg: Jun 17, 2011
Mildura, Austra...
15,840
like
06/27/11 09:27 PM (14 years ago)
Hello David, Thanks! You were spot on! Once I removed the Google Custom search engine gadget from the website, the URL loaded as expected. Sorry to take up your time with this issue. (Might be a lesson here for me about making sure I know what the code on my website does. I didn't realise it could essentially highjack the URL like that - Do no evil Google? hmmm...) Anyway, I think buzztouch is great and I'm looking forward to trying the Android 1.5 control panel. Cheers
 
David @ buzztouch
buzztouch Evangelist
Profile
Posts: 6866
Reg: Jan 01, 2010
Monterey, CA
78,840
like
06/27/11 09:42 PM (14 years ago)
Whoo hoo. You're very welcome. Google hijacking code, that is an interesting thing to think about. I'm a HUGe google fan but do worry sometimes about all the little 'hooks' they have in us. Glad to help.
 

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.