Page 2 of 3
Links don't work when built for iOS
Posted: Mon Aug 05, 2013 8:26 pm
by Alena Prykhodko
If links in test app work, but in main - don't, probably you have errors in main app. You have to check service settings and what data (links) crash in test app and in main app. (You can use alert function in mapping)
Links don't work when built for iOS
Posted: Mon Aug 05, 2013 9:20 pm
by Kapow36
I have used alerts. The right links are in place, but the link events just don't get called. So far this is only in android, but when the device is rotated in the horizontal position, links work. That seems really odd and unrelated to me, but that's what happens.
Links don't work when built for iOS
Posted: Mon Aug 05, 2013 9:47 pm
by Alena Prykhodko
On what device/version do you test? Can you make a try on the other device?
If you don't have the possibility, please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a and tell steps to reach, we'll test it.
Links don't work when built for iOS
Posted: Tue Aug 06, 2013 1:24 am
by Kapow36
I'm using a droid Razar. I'll send the info for the test account to a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
Links don't work when built for iOS
Posted: Tue Aug 06, 2013 1:26 am
by Kapow36
I've also modified Katya's code so that it works for iOS and android. The problem with it is that android won't return an empty object.
code
function myNavigate(url) {
try
{
navigator.app.loadUrl(url, { openExternal:true } );
}
catch(err)
{
console.log(err);
}
try
{
var cb;
if (window.plugins)
{
cb = window.plugins.childBrowser;
}
if (cb != null)
{
cb.showWebPage(url);
}
}
catch(err)
{
console.log(err);
}
}
/code
navigator.app.loadUrl only works on iOS, so the try catch makes sure that cb.showWebPage opens.
Links don't work when built for iOS
Posted: Fri Aug 09, 2013 10:01 am
by Kateryna Grynko
Hello,
The problem is that your function returns nothing because you don't call return.
Please share your app with a href="mailto:support@appery.io" rel="nofollow"support@appery.io/a
Links don't work when built for iOS
Posted: Fri Aug 09, 2013 6:30 pm
by Kapow36
Sorry, I should clarify, the window.plugins.childBrowser won't return an empty object on android. I do already have the app shared with appery.io. I've also already sent over the login information. The problem I am having is that android will only click on links (I'm talking about the ui object) if it is in the horizontal position. The above code works fine for most links (e.g. a href="http://" rel="nofollow"http:///a) but I haven't had a chance to test it with mailto: and maps and tel: links.
Links don't work when built for iOS
Posted: Fri Aug 09, 2013 10:17 pm
by Kapow36
The above code works for iOS, I just need to test it on the android when I get back to the office.
Links don't work when built for iOS
Posted: Wed Aug 14, 2013 3:42 pm
by Kapow36
Ok, the code I posted above works for android and iOS perfectly.
Links don't work when built for iOS
Posted: Wed Aug 14, 2013 4:36 pm
by Kateryna Grynko
Thank you for the update! Please tell us if you have any problems.