Error when linking to Android Play Store

Welcome! Forums Unity Plugins In-App Web Browser Error when linking to Android Play Store

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #907
    mister_pope
    Participant

    Hi Piotr,

    I need users to be able to follow links to the Android Play Store.

    E.g. they start off on my site, navigate to Fox.com, and Fox links them to their Android app in the Play Store.
    This works OK when using Chrome on Android.

    There’s a special URL and Chrome knows to forward them to the Play Store app.
    In ‘In-App Web Browser’ I instead end up on an error screen:

    Webpage not available
    The webpage at intent://home?cmpid=org=DCG::mc=referral::src=FOXcom::cmp=MobileWebVODPage&af_channel=FOXcom&af_deeplink=true&af_sub2=DCG&campaign=MobileWebVODPage&media_source=referral#Intent;scheme=foxapp;package=com.fox.now;S.browser_fallback_url=market://details?id=com.fox.now&referrer=af_tranid%253DOaLqq-5rufO76_lYLFvLkA%2526af_sub2%253DDCG%2526pid%253Dreferral%2526af_channel%253DFOXcom%2526c%253DMobileWebVODPage%2526af_dp%253Dfoxapp%25253A%25252F%25252Fhome%25253Fcmpid%25253Dorg%25253DDCG%25253A%25253Amc%25253Dreferral%25253A%25253Asrc%25253DFOXcom%25253A%25253Acmp%25253DMobileWebVODPage;S.market_referrer=af_tranid%3DOaLqq-5rufO76_lYLFvLkA%26af_sub2%3DDCG%26pid%3Dreferral%26af_channel%3DFOXcom%26c%3DMobileWebVODPage%26af_dp%3Dfoxapp%253A%252F%252Fhome%253Fcmpid%253Dorg%253DDCG%253A%253Amc%253Dreferral%253A%253Asrc%253DFOXcom%253A%253Acmp%253DMobileWebVODPage;end
    could not be loaded because:

    net::ERR_UNKNOWN_URL_SCHEME

    To see the problem, open the following link in Chrome and then in your browser. I believe this link redirects to the ‘intent’ link when viewed on Android.
    https://foxapp.onelink.me/LHqp?af_sub2=DCG&af_prt=&pid=referral&af_channel=FOXcom&c=MobileWebVODPage&af_sub1=&af_dp=foxapp://home?cmpid=org=DCG::mc=referral::src=FOXcom::cmp=MobileWebVODPage&af_web_dp=http://www.fox.com/fox-now?cmpid=org=DCG::mc=referral::src=FOXcom::cmp=MobileWebVODPage

    Looking up the error online, it seems that the WebView needs some Java code which handles the intent.
    https://stackoverflow.com/questions/41693263/android-webview-err-unknown-url-scheme

    As the code is in a Jar, I don’t think I can modify it. (Also I’m not very familiar with Java/Android/Intents etc.)

    Any ideas?

    Thanks very much,
    Mark

    #1005
    SanketSanket
    Participant

    Hi Piotr,

    I have a similar issue. For developers who have implemented deep links, maybe from firebase or branch.io, the dynamic links have 301 or 302 redirects to the original links. Such dynamic links are not opening in the in-app web browser. It throws net::ERR_UNKNOWN_URL_SCHEME.

    And yes as mentioned by @mister_pope, this maybe can be solved by setting a client in the webview and pass the url to an intent.

    @Piotr, can we get a fix for this?

    Thanks,
    Sanket Kale

    #1006
    PiotrPiotr
    Keymaster

    @sanket.kale I’ve sent a beta version of next version which should address this issue on your email. Let me know if it works for you.

    #1084
    mister_pope
    Participant

    Hi Piotr,

    I don’t know whether your fix for Sanket was also meant to address my issue.
    For what it’s worth, the new v1.7.3 didn’t fix it for me.

    It would be great if you could fix this or point me in the right direction.

    Thanks very much,
    Mark.

    #1093
    PiotrPiotr
    Keymaster

    Hi mister_pope – I’ve checked a link you posted (https://foxapp.onelink.me/LHqp?af_sub2=DCG&af_prt=&pid=referral&af_channel=FOXcom&c=MobileWebVODPage&af_sub1=&af_dp=foxapp://home?cmpid=org=DCG::mc=referral::src=FOXcom::cmp=MobileWebVODPage&af_web_dp=http://www.fox.com/fox-now?cmpid=org=DCG::mc=referral::src=FOXcom::cmp=MobileWebVODPage) – and it redirected me to Google Play Store. Are you sure you are using the latest version? Maybe Unity didn’t import it properly? Can you try with empty project?

    #1114
    mister_pope
    Participant

    Hi Piotr,

    I tried importing fresh with an empty project. The problem still happens.
    I used the sample code, made ‘pageToLoad’ private and used the same foxapp link above. Again it gave an ERR_UNKNOWN_URL_SCHEME error.

    Thanks for checking this. Not sure what’s different between our devices…

    Thanks,
    Mark.

    #1291
    allenvarna
    Participant

    The ERR_UNKNOWN_URL_SCHEME error is commonly because of your browser issue . There’s no application on your device which can handle that particular action. It is a Chromium bug . In Chrome version 40 and up, this bug has resurfaced, but only if you are manually entering the URL of the redirect page in the address bar. The issue is on the chromium issue tracker here

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.