Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

ERR_UNKNOWN_URL_SCHEME error appears on device.
Started by fazilreyaz Feb 21 2019 01:02 AM

1 reply to this topic
webview error url device errorcode
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

fazilreyaz

[GLOBAL: userInfoPane.html]
fazilreyaz
  • Enthusiast

  • 67 posts
  • Corona SDK

Hello Everyone,

 

I have a simple web app which is being called inside a webView. It works great on simulator but when I open it on a device (Android) it shows ERR_UNKNOWN_URL_SCHEME error.

 

It also display an alert "This website save tons of data, we recommend installing UC BROWSER".

 

 

It's very weird. Do any of you know what is the cause of this error?

 

 

CODE:

function webListenerForBrowsers( event )
   if event.url then    
     
     if string.find(event.url, "?d=") then
         if string.find(event.url, "lat=") then 
             Runtime:removeEventListener( "location", getUserCurrentLocationAndShowUpMap )
         else
             curUrl = event.url;
             event.target:stop();
             Runtime:addEventListener( "location", getUserCurrentLocationAndShowUpMap )        
          end     
     end

   end
       
       
    if event.type == "loaded" then  
     if welcomeLoaded == false then     
     clearInitialStuff();     
     end
    end
  
    if event.errorCode then
     if tostring(event.errorCode) ~= "-999"  then     
        native.showAlert( "Error!", "Internet Connection Appears To Be Offline." .. event.errorCode.." > "..event.errorMessage, { "OK" }, onComplete )
     end
    end
    return true;
end

 

Any help would be highly appreciated.

 

 

 

Thanks,



[TOPIC: post.html]
#2

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 25,376 posts
  • Enterprise

Is this still an issue? 

 

Have you tried the latest daily build?

 

Rob




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: webview, error, url, device, errorcode