kendo mobile external link doesn't work

15 posts, 0 answers
  1. Diane
    Diane avatar
    3 posts
    Member since:
    Apr 2013

    Posted 10 May 2013 Link to this post

    I am using the latest version of icenium (Kendo UI Mobile v2013.1.319).  The external link doesn't work at all
    e.g.
     <a data-rel="external" href="google.com" >Google</a>
    gives "Error -105 when loading url http://local/Simulator/google.com"

    <a data-rel="external" href="tel:1111111111" >1111111111</a>
    gives "Error -302 when loading url tel:1111111111"

    Please advise.
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 10 May 2013 Link to this post

    Hi Diane,

    The problem with the first hyperlink is that you're missing the responsible protocol i.e. it should be:

    <a data-rel="external" href="http://google.com" >Google</a>

    About the second hyperlink, it won't work in the simulator, because this functionality is not implemented inside it yet. However it will work as expected on real devices once you build and deploy to.

    Kind regards,
    Steve
    the Telerik team

    Share feedback and vote for features on our Feedback Portal.
    Want some Kendo UI online training - head over to Kendo UI Dojo.
  3. Diane
    Diane avatar
    3 posts
    Member since:
    Apr 2013

    Posted 10 May 2013 Link to this post

    Thanks Steve for your quick response.
  4. Justin
    Justin avatar
    9 posts
    Member since:
    Sep 2011

    Posted 26 Aug 2013 Link to this post

    Hi Steve,

    Having problems with this as well with the below which is trying to open a PDF document.

    Any ideas?

    <a href='http://lifebuddyadmin.logic1.com.au/images/a%20prophetic%20word.pdf' data-rel='external' target='_blank' >Click Here For Link!</a>

    Thanks,
    Justin
  5. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 27 Aug 2013 Link to this post

    Hi Justin,

    Please clone the following Icenium sample that shows how to open a PDF file using Cordova.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  6. Justin
    Justin avatar
    9 posts
    Member since:
    Sep 2011

    Posted 27 Aug 2013 Link to this post

    Thanks Steve.

    Will this work for other files types like launching an audio or video file that is stored on a web server?
  7. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 29 Aug 2013 Link to this post

    Hello Justin,

    Depends what you want to accomplish - is your goal to copy the audio/video to the user's device first prior to playing it? If not, then you can just use the <audio>/<video> html 5 tags to handle those. You might experience some problems on Android (esp. 2.x), and might consider using the Media Cordova API for audio and the VideoPlayer Cordova plug-in for video instead.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  8. Justin
    Justin avatar
    9 posts
    Member since:
    Sep 2011

    Posted 29 Aug 2013 Link to this post

    Hi Steve,

    The goal is to either open the file from the users device so copy it onto it first or force the file to open through safari. 
    The problem is the file could be a video, audio or PDF file that the client want to be able to open from a hyperlink.

    Let me know what you think.

    Many thanks,
    Justin
  9. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 30 Aug 2013 Link to this post

    Hello Justin,

    In such scenario you might consider using the FileOpener plug-in which as per its description:

    "Simple plugin which allows you to open popular files (PDF, WORD, EXCEL, JPG, GIF, POWERPOINT, VIDEOS, MUSIC etc.) stored locally on your device with Phonegap for Android.
    "

    should do what you need. Apart from not being plugman compatible, the FileOpener plug-in is also not written against recent Cordova version and currently targets Cordova 2.2. I've attached a modified version of the plug-in that works correctly with Cordova 2.7 in Icenium for your convenience. See Import Custom Plugins from Archive help article for integrating it.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  10. Justin
    Justin avatar
    9 posts
    Member since:
    Sep 2011

    Posted 01 Sep 2013 Link to this post

    Thanks Steve. Looks good for Android. What about iOS, is there any plugin for iOS that will do this?
  11. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 03 Sep 2013 Link to this post

    Hello Justin,

    iOS should handle properly the links to the audio/video and pdf files without any need for plugins.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  12. Justin
    Justin avatar
    9 posts
    Member since:
    Sep 2011

    Posted 03 Sep 2013 Link to this post

    Hi Steve,

    Unfortunately it doesn't. We only support iOS devices so this is a problem for us. 

    When you say it should just handle it, are you referring to a normal <a> hyperlink tag?
    If you try using Icenium the link I provided before 
    <a href='http://lifebuddyadmin.logic1.com.au/images/a%20prophetic%20word.pdf' data-rel='external' target='_blank' >Click Here For Link!</a>
    on an App on a iPhone or iPad it doesnt open in Safari.

    Let me know what you think.

    Thanks,
    Justin
  13. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 04 Sep 2013 Link to this post

    Hi Justin,

    I'm not referring to a hyperlink, I think we already clarified that this would not work and you should use InAppBrowser to open the file. To avoid any further confusion, I've prepared and attached a sample project that I've tested with .pdf, docx, pptx, mp3 and mp4 file on iPad Mini. Note that I'm using the Cordova FileTransfer API to copy the file locally on the device and then open it with an app associated with this extension.

    I would like to note that everything we discuss in this thread is not directly related (or specific) to Icenium and is a general PhoneGap/Cordova know-how that is freely available on the net and community forums.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
  14. Justin
    Justin avatar
    9 posts
    Member since:
    Sep 2011

    Posted 04 Sep 2013 Link to this post

    Thanks Steve. No I don't think you did mention that before.

    Its very disappointing that Icenium doesn't work with that out of the box. Its a simple function that I would imagine a lot of people would want to do.

    I will have a look and let you know if I have any problems.
  15. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 05 Sep 2013 Link to this post

    Hello Justin,

    I did not say it in plain text, but the open-pdf-sample I pointed you to uses InAppBrowser and I assumed you have reviewed it to see how it works.

    Again, this is not an Icenium limitation, you would observe the same behavior if you try to create a Cordova project manually.

    Regards,
    Steve
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Share feedback and vote for features on our Feedback Portal.
Back to Top