Пользователи смартфонов с операционной системой Андроид столкнулись с ошибкой на сайтах «Net::ERR_UNKNOWN_URL_SCHEME». Ошибка появляется когда при клике на активную ссылку, должно запуститься связанное приложение. Например вы хотите присоединится к беседе в Скайпе или к конференции в Зуме, открыть канал в Телеграмме и тп. Вот так ошибка отображается на экране смартфона:
Чаще с данной проблемой сталкиваются пользователи смартфонов линейки Lite от Honor, иногда ошибка выскакивает у пользователей Xiaomi и Huawei. Сегодня расскажем почему такое происходит и как решить проблему.
Причина ошибки Net::ERR_UNKNOWN_URL_SCHEME зачастую кроется в несовместимости протоколов, которые использует ваш браузер(скорее всего Chrome) и программы. Разработчики в последних версиях устраняют эти сбои и для решения иногда достаточно обновить сам Chrome и Скайп(если ошибка выскакивает при клике на приглашение в беседу). Вообще рекомендуем зайти в Play Маркет и обновить все приложения без исключения. В каждой новой версии устраняются различные баги и несовместимости, обновляются протоколы android.permission и тп.
Так же ошибка может появляться при:
- При звонке на номер телефона в приложении или сайте.
- При попытке открыть перенаправляющий URL-адрес(ссылку).
- При нажатии на ссылке, которые должны открываться на новой странице.
- Так же проблема возникает при кликах на ссылки mailto: tel: sms: и geo: внутри iframe(обычно это ссылки с номерами телефонов или имейл адресов, для отправки смс).
- При попытке авторизации на сайте(на этапе открытия страницы или ввода логина, пароля).
Переключаем браузер по умолчанию
Если обновление всех приложений не спасло временно можно переключить браузер по умолчанию.
Браузер по умолчанию – это браузер, который автоматически запускается при клике на любую ссылку. Часто это или встроенный браузер в ваш смартфон или Гугл Хром.
На разных моделях переключить можно разными способами. Для смартфонов Honor пошаговая схема такая:
- Заходим в «Настройки».
- Выбираем пункт «Приложения по умолчанию»
- Далее «Браузер».
- Выбираем Firefox, Opera, UC Browser или любой другой.
Важно! Яндекс.Браузер скорее всего тоже вылетит с ошибкой, т.к. построен на базе chromium. По этому пробуйте во встроенном или смело скачивайте Mozilla Firefox.
Так же, если вы столкнулись с ошибкой Net::ERR_UNKNOWN_URL_SCHEME на смартфоне Xiaomi тут путь такой:
- Заходим в раздел «Настройки», далее «Приложения»;
- Переходим оттуда во «Все приложения»;
- Ищем вручную или через поиск Google Chrome и кликаем на его иконку;
- Откроется меню, где нужно выбрать пункт «Сбросить настройки по умолчанию». Либо деактивировать ползунок напротив строчки «Браузер по умолчанию»;
- Теперь при клике на ссылку, выберите из списка другой браузер и нажмите «Запомнить».
Советы выше помогают избежать ошибки Net::ERR_UNKNOWN_URL_SCHEME на смартфоне. Они помогут обычным пользователям столкнувшимся с проблемой. Если вы являетесь разработчиком и пишете приложения, либо сайты сами, то там есть боле профессиональные решения. В рамках данной статьи мы решили не добавлять эту информацию, что бы не возникло путаницы. По этому, если вам нужно решить ошибку с технической точки зрения – сообщите об этом в комментариях к этой странице. Мы добавим отдельный материал на эту тему.
Евгений Загорский
IT специалист. Автор информационных статей на тему Андроид смартфонов и IOS смартфонов. Эксперт в области решения проблем с компьютерами и программами: установка, настройка, обзоры, советы по безопасности ваших устройств. В свободное время занимается дизайном и разработкой сайтов.
Оценка статьи:
(7 оценок, среднее: 4,57 из 5)
Загрузка…
Самое читаемое:
Ошибка в Роблоксе Error Code: 529 – что обозначает, решение
Если вы столкнулись с ошибкой Error Code: 529 в игре Roblox, знайте, что причин ее возникновения может быть две. Первая —…
Далее
Ошибка 277 в Роблокс – что это, как исправить?
Ошибка Error Code: 277 является одной из самых распространенных, с которой сталкиваются игроки Roblox. Обычно она…
Далее
Ошибка 273 в Роблокс – что значит, как исправить?
Игроки Roblox нередко сталкиваются с ошибкой Error C0de: 273, которая приводит к отключению от серверов и невозможностью…
Далее
Госуслуги произошла неизвестная ошибка – что делать?
«Госуслуги» — это сервис, который пользуется широким спросом среди отечественных пользователей. Кто-то с его…
Далее
Многие владельцы мобильных телефонов, работающих под управлением ОС Андроид, сталкиваются с ошибкой «Net::ERR_UNKNOWN_URL_SCHEME». Чаще всего сбой возникает во время перехода по ссылке, которая должна запустить связанную с ней программу. К примеру, человек пытается присоединиться к чату в Skype, открыть Telegram-канал или онлайн-конференцию в Zoom, но приложение сворачивается, а на экране появляется системное уведомление об ошибке.
Содержание
- 1 Причины, по которым может появиться ошибка Net::ERR_UNKNOWN_URL_SCHEME
- 2 Смена браузера по умолчанию
- 3 Заключение
В переводе на русский язык «ERR_UNKNOWN_URL_SCHEME» означает «Ошибка, связанная с неизвестной URL-схемой». Главной причиной данной ошибки является несовместимость протоколов, используемых браузером и установленными программами. Обычно подобные баги быстро устраняются, поэтому чаще всего для решения проблемы нужно всего лишь обновить браузер или мессенджер (если сбой появляется при попытке пригласить человека в беседу).
Ошибка нередко возникает в следующих случаях:
- Во время авторизации на веб-сайте (при открытии web-страницы, вводе пароля и логина).
- При переходе по ссылкам «mailto», «sms» и «tel» (ссылки, в которых указаны номера телефонов и e-mail адреса).
- При переходе по ссылкам, открывающимся на новых страницах.
- При открытии перенаправляющих URL-адресов.
- При звонках через сайты или приложения.
Ошибка наблюдается преимущественно в браузере Google Chrome. Чаще всего с ней сталкиваются владельцы смартфонов и планшетов от Хуавей, Хонор, Ксяоми и некоторых других китайских производителей.
Смена браузера по умолчанию
Если обновление не помогло исправить ошибку Net::ERR_UNKNOWN_URL_SCHEME, стоит сменить установленный по умолчанию браузер, автозапуск которого происходит при переходе по любой ссылке:
- Открыть раздел настроек.
- Перейти в «Приложения по умолчанию».
- Выбрать пункт «Браузер».
- Установить Firefox, Opera либо другой обозреватель.
Устанавливать Yandex.Browser не рекомендуется, поскольку он работает на свободном движке Blink на базе которого был создан Google Chrome.
Если ошибка наблюдается на смартфоне Ксяоми, для ее устранения нужно проделать следующие шаги:
- Зайти в «Приложения» (находится в разделе настроек).
- Открыть меню «Все приложения».
- Вбить в поисковую строку название браузера или найти его самостоятельно в списке установленных программ.
- Тапнуть по клавише «Сброс действий по умолчанию» или перевести бегунок, расположенный напротив строки «Браузер по умолчанию»
- Кликнуть по ссылке, выбрать из списка другой обозреватель.
- Подтвердить свой выбор нажатием на кнопку «Запомнить».
Вышеописанные инструкции позволяют избавиться от ошибки на большинстве Android-смартфонов. Для разработчиков программного обеспечения существует целый ряд более профессиональных решений, однако рассматривать его в рамках данного текста бессмысленно. Для устранения ошибки альтернативными методами необходимо продвинутое знание HTML и принципов работы JavaScript.
Заключение
Ошибка «Net::ERR_UNKNOWN_URL_SCHEME» уведомляет о несовместимости или несоответствии протоколов, которое может появиться во время авторизации на веб-сайте, при переходе по ссылке, открытии перенаправляющих URL-адресов или звонках, осуществляющиеся через сайт или приложение. Для устранения сбоя нужно обновить обозреватель и программу либо сменить установленный по умолчанию браузер на альтернативный.
Что представляет собой ошибка Net::ERR_UNKNOWN_URL_SCHEME? Многие пользователи телефонов на ОС Андроид получили такое уведомление с ошибкой, когда переходили по ссылке, связанной с запуском определенного приложения. Это мог быть переход в закрытую беседу в Viber, Telegram, Skype или Зум. В переводе на русский — неизвестная URL схема (а точнее неизвестный URL путь сайта). Изображение с сообщением об ошибке выглядит так:
Как правило такое сообщение выскакивало у пользователей смартфонов Хуавей или Хонор, Xiaomi. Как исправить ошибку?
Оглавление
- 1 Почему появляется ошибка Net::ERR_UNKNOWN_URL_SCHEME?
- 2 Ошибка Net::ERR_UNKNOWN_URL_SCHEME. Смена браузера.
- 2.1 Для моделей смартфона Хонор:
- 2.2 Для моделей Хуавей и Xiaomi:
Зачастую, это несоответствие протоколов, используемых браузером и самой программы в которую переходит по ссылке пользователь. Обычно ошибка решается простым обновлением используемого браузера или переустановкой программы мессенджера (Skype, Viber и тд). Просто зайдите в Плей Маркет и обновите все используемые приложения (касаемо данной проблемы). Таким образом вы собственноручно обновите протоколы android.permission.
Кроме того, ошибка может появиться в случае:
- Попытке дозвониться пользователю в приложении.
- Открытия ссылки для перехода на конкретный URL. (Случай описанный выше).
- Если переходить по ссылке, которая в свою очередь должна открыть в новом окне.
- Перехода по ссылкам с номерами телефонов, e-mail, sms-сообщений.
- В момент ввода авторизационных данных, логин и пароль.
Ошибка Net::ERR_UNKNOWN_URL_SCHEME. Смена браузера.
В случае, если после обновления ситуация осталась на прежнем месте, попробуйте сменить браузер на тот, который стоит по умолчанию. Простыми словами это встроенный в телефон браузер (родной), типа интернет эксплорера на ПК.
Как говорилось выше, чаще всего ошибка выскакивает, если пользователь использует браузер Гугл Хром в купе с китайскими смартфонами Huawei, Honor, Xiaomi.
Для моделей смартфона Хонор:
- Меню.
- Настройки.
- Приложения по умолчанию.
- Браузер.
- Выберите браузер который будет работать по умолчанию.
Скорее всего Яндекс Браузер также будет выдавать ошибку в связи с тем, что он сделан на фришном движке Блинк на базе chromium.
Для моделей Хуавей и Xiaomi:
- Меню.
- Настройки.
- Приложения.
- Все приложения.
- Ищем Гугл Хром или другой используемый браузер.
- Сбросить настройки по умолчанию или Браузер по умолчанию.
- В момент открывания ссылки выбираем браузер который будет работать по умолчанию.
Пользуйтесь браузер Mozila FireFox. Также его можно использовать по умолчанию. Т.е. ссылки, открываемые вами, будут открываться автоматически в этом браузере.
Оценка статьи:
(Пока оценок нет)
Загрузка…
Самое читаемое:
01.03.2022
На сайте eruz.zakupki.gov.ru используется неподдерживаемый протокол, как исправить?
Последнее время на портале eruz.zakupki.gov.ru появились сложности с подключением. Что необходимо совершить, в случае…
Далее
01.03.2022
Ошибка 6 в Инстаграм Рилс — как исправить?
В связи с растущей популярностью социальной сети Tik-Tok, конкуренты стали внедрять схожий функционал. Например, VK…
Далее
28.02.2022
Винлайн ошибка 94, 29, 4 – как исправить?
Как и любые другие компании, которые работают с деньгами, Винлайн заключает договор с пользователем. В данном…
Далее
24.02.2022
Как удалить системные приложения на Xiaomi?
Большинство компаний выпускающих свои линейки смартфонов стремятся завоевать хорошую репутацию. Один из таких…
Далее
Пользователям Интернета, далёким от IT, кажется, что работа какого-либо сервиса проста и банальна: ссылки переводят на страницы, страницы отображают контент – ничего особенного. Но на самом деле работу приложений обеспечивают несколько сложных систем. Хостинг с серверами и громоздким программным обеспечением на них, оболочка приложения, в которой используется минимум три языка программирования и другое.
Это сложный механизм. И если хотя бы какая-то одна мелочь в этой системе, какая-то одна строчка кода окажется не правильной, то всё может перестать работать или начнёт работать не так, как нужно. Поэтому пользователям иногда приходится сталкиваться с теми или иными ошибками и проблемами, которые необходимо как-то решать.
В этой статье мы рассмотрим, что означает ошибка Net::ERR_UNKNOWN_URL_SCHEME. А также постараемся разобраться в том, можно ли её исправить со стороны обычного пользователя и что для этого делать.
Содержание
- Что значит ошибка Net::ERR_UNKNOWN_URL_SCHEME?
- Сообщить администратору
- Найти другой способ получить контент
- Попробуйте на другом устройстве
- Отключение антивируса и других блокирующих приложений
- Выполните обновления
Что значит ошибка Net::ERR_UNKNOWN_URL_SCHEME?
Данная ошибка может возникать, когда вы переходите по какой-либо ссылке в браузере или каком-то приложении на компьютере или мобильном устройстве.
Если попытаться перевести фразу «ERR_UNKNOWN_URL_SCHEME», то на русском это будет означать «ошибка: неизвестная схема URL». URL – это ссылка, по которой доступна та или иная страница. Таким образом понятно, что появление данной ошибки свидетельствует о том, что ссылка на сайте или в приложении создана не правильно.
Поэтому, очевидно, что решение этой проблемы является делом специалиста, который данную ссылку создал, и это не доступно обычному пользователю. Но, всё-таки, как посетитель вы можете кое-что попытаться сделать.
Сообщить администратору
Если вы обнаружили ошибку Net::ERR_UNKNOWN_URL_SCHEME, то сообщите об этом администратору сайта или приложения, которым пользуетесь. Любой владелец сервиса заинтересован, чтобы все элементы там работали. Поэтому, сообщая об обнаруженных ошибках и проблемах, вы делаете хорошее дело для улучшения проекта.
Возможно администратор сможет исправить эту проблему в ближайшем времени. Но даже если нет, то тот факт, что администратор в курсе проблемы на его проекте, уже приближает её решение.
Найти другой способ получить контент
Когда вы переходили по ссылке, которая привела вас к ошибке Net::ERR_UNKNOWN_URL_SCHEME, вы, вероятно, хотели увидеть что-то полезное: какой-то нужный вам контент, или воспользоваться какой-либо функцией. И эта ошибка, естественно, не позволяет вам это сделать.
Если вам срочно нужен контент или функция по недоступной ссылке, то попытайтесь найти его другим способом. Например, если вы нажали на ссылку, которая ведёт на номер телефона, чтобы позвонить по нему, и получили Net::ERR_UNKNOWN_URL_SCHEME. То попробуйте позвонить по другому номеру телефона или воспользоваться другим каналом связи, или просто набрать этот номер вручную. Если вы увидели эту ошибку при переходе, допустим, к интерактивной карте, то попробуйте найти нужный адрес другим способом.
Вам может быть это интересно: Ошибка при получении данных с сервера DF-DFERH-01 в Play Market как исправить.
Попытайтесь найти альтернативный вариант для того, чтобы решить свою задачу, если ссылка оказалась недоступной. Даже если вы ранее сообщили об этом администратору проекта, вряд ли он решит проблему моментально.
А далее рассмотрим ещё пару способов, которые вы могли бы попробовать реализовать со своей стороны, если проблема, всё-таки, не в сервисе, которым вы пользуетесь, а в вашем устройстве.
Попробуйте на другом устройстве
Если есть возможность, то попробуйте перейти по ссылке, выдающей ошибку, на другом устройстве. Есть определённая вероятность, что что-то на локальном уровне в вашем устройстве может быть причиной этой проблемы.
Если действительно так, то на другом устройстве вы сможете успешно перейти по ссылке. Если же на другом устройстве тоже такая же проблема, то значит причина в самом сервисе и нужно просто ждать решения проблемы его администратором. Тогда, скорее всего, все способы ниже вам тоже не помогут.
Отключение антивируса и других блокирующих приложений
Антивирусы и разнообразные приложения, которые блокируют контент, являющийся, по их мнению, вредоносным, могут заблокировать и что-то полезное. Поэтому попробуйте отключить эти приложения.
Если речь о компьютере, то это, в первую очередь антивирус, а также расширения браузера, которые блокируют рекламу. Если ошибка появляется на мобильном, то также отключите или удалите антивирус и разнообразные оптимизирующие приложения.
Выполните обновления
Возможно, что на сайте или приложении, где вы видите такую ошибку, проблемы на самом деле нет, а вы её видите только из-за того, что пользуетесь устаревшим программным обеспечением. Поэтому для решения данной проблемы вы можете попробовать сделать обновления.
- Проверьте, нет ли обновления для операционной системы – Android, iOs или Windows.
- Если ошибка возникает в приложении на мобильном устройстве, то проверьте, не вышло ли обновление для самого приложения. Увидеть это можно в магазинах приложений – Play Market, App Store и других.
- Если проблема появляется на сайте в браузере, то попробуйте обновить браузер.
-
Partition Wizard
-
Partition Magic
- Top 4 Solutions to ERR_UNKNOWN_URL_SCHEME Error
By Amy | Follow |
Last Updated March 19, 2021
When a received application or site does not obtain specific information from the device, the err_unknown_url_scheme error might occur. How to fix err_unknown_url_scheme? If you are bothered by it, this post of MiniTool probably is what you need.
An Overview of ERR_UNKNOWN_URL_SCHEME
The net err_unknown_url_scheme error often results from the browser issue. But there’s no application on your computer can cope with it. In addition, you can notice that the error screen can be interrupted by multiple lines of code.
According to user reports, the err_unknown_url_scheme error can happen in various places. Here, we list them as follows.
- You may encounter the error when you try to open a redirected URL.
- The error occurs at the time of calling the Android phone number.
- The error pops up when you click this link.
- You can receive the error in mailto, SMS, e geo, etc.
- The err_unknown_url_scheme error happens when you try to utilize OAuth with a custom Chrome card.
How to fix err_unknown_url_scheme? The section below will provide you with 4 solutions. Now, let’s explore them one by one.
Solution 1: Disable Chrome Extensions Temporarily
If you receive the err_unknown_url_scheme error when browsing disguise, disable the feature directly. If this doesn’t work, try disabling all Google Chrome extensions. Here are detailed steps.
Step 1: Open a new tab on the Chrome.
Step 2: Click on the gears button at the upper right corner of the page and then click om Settings.
Step 3: Click on the Extension option in the left pane.
Step 4: In the extension page, disabling extensions one after another by clicking on their status button until the net err_unknown_url_scheme error disappears. After finding the root of the error, disable or remove it.
Solution 2: Close Hardware Acceleration
You can also try closing hardware acceleration to fix the err_unknown_urk_scheme error. Here’s how to do.
Step 1: Repeat the Step 1 and Step 2 of Solution 2 to open the Settings of the browser.
Step 2: In the Settings page, click on the Advanced option to expand it.
Step 3: Click on System option under Advanced.
Step 4: Then move to the right side of the page, turn off hardware acceleration by clicking on its status button.
Solution 3: Turn off Firewall
The err_unknown_url_scheme can also occur due to incorrect Windows Firewall configuration. If so, you should turn off Windows Firewall with the steps below.
Step 1: Type control in the search box and then click on Control Panel from the listed search results.
Step 2: In the Control Panel window, click Windows Defender Firewall. Then click the Turn Windows Defender Firewall on or off option in the left pane.
Step 3: At this window, click on the Turn off Windows Defender Firewall (not recommended) option in both Private/Public network settings section and click OK to save the changes.
Solution 4: Delete Browser Cache and Cookies
Cache and cookies on the browser may also lead to net err_unknown_url_scheme. Given to that fact, you should try deleting browser cache and cookies to solve the problem. Here’s a step-by-step guide for you.
Step 1: Move to the Settings of Chrome by following the Step 1 and Step 2 of Solution 1.
Step 2: Scroll down the content in the page to find Clear browsing data as shown in the picture below. Then click on it.
Step 3: In the pop-up window, choose the content you want to delete and click on the Clear data button. Then the selected content will be deleted automatically.
About The Author
Position: Columnist
Having writing articles about computer tech for a long time, I am rather experienced especially on the aspect of computer optimization, PC enhancement, as well as tech terms explanation. The habit of looking through tech forums makes me a great computer issues collector. And then, many articles related to these issues are released, which benefit plenty of users. Professional, effective, and innovative are always the pursuit of an editing worker.
-
Partition Wizard
-
Partition Magic
- Top 4 Solutions to ERR_UNKNOWN_URL_SCHEME Error
By Amy | Follow |
Last Updated March 19, 2021
When a received application or site does not obtain specific information from the device, the err_unknown_url_scheme error might occur. How to fix err_unknown_url_scheme? If you are bothered by it, this post of MiniTool probably is what you need.
An Overview of ERR_UNKNOWN_URL_SCHEME
The net err_unknown_url_scheme error often results from the browser issue. But there’s no application on your computer can cope with it. In addition, you can notice that the error screen can be interrupted by multiple lines of code.
According to user reports, the err_unknown_url_scheme error can happen in various places. Here, we list them as follows.
- You may encounter the error when you try to open a redirected URL.
- The error occurs at the time of calling the Android phone number.
- The error pops up when you click this link.
- You can receive the error in mailto, SMS, e geo, etc.
- The err_unknown_url_scheme error happens when you try to utilize OAuth with a custom Chrome card.
How to fix err_unknown_url_scheme? The section below will provide you with 4 solutions. Now, let’s explore them one by one.
Solution 1: Disable Chrome Extensions Temporarily
If you receive the err_unknown_url_scheme error when browsing disguise, disable the feature directly. If this doesn’t work, try disabling all Google Chrome extensions. Here are detailed steps.
Step 1: Open a new tab on the Chrome.
Step 2: Click on the gears button at the upper right corner of the page and then click om Settings.
Step 3: Click on the Extension option in the left pane.
Step 4: In the extension page, disabling extensions one after another by clicking on their status button until the net err_unknown_url_scheme error disappears. After finding the root of the error, disable or remove it.
Solution 2: Close Hardware Acceleration
You can also try closing hardware acceleration to fix the err_unknown_urk_scheme error. Here’s how to do.
Step 1: Repeat the Step 1 and Step 2 of Solution 2 to open the Settings of the browser.
Step 2: In the Settings page, click on the Advanced option to expand it.
Step 3: Click on System option under Advanced.
Step 4: Then move to the right side of the page, turn off hardware acceleration by clicking on its status button.
Solution 3: Turn off Firewall
The err_unknown_url_scheme can also occur due to incorrect Windows Firewall configuration. If so, you should turn off Windows Firewall with the steps below.
Step 1: Type control in the search box and then click on Control Panel from the listed search results.
Step 2: In the Control Panel window, click Windows Defender Firewall. Then click the Turn Windows Defender Firewall on or off option in the left pane.
Step 3: At this window, click on the Turn off Windows Defender Firewall (not recommended) option in both Private/Public network settings section and click OK to save the changes.
Solution 4: Delete Browser Cache and Cookies
Cache and cookies on the browser may also lead to net err_unknown_url_scheme. Given to that fact, you should try deleting browser cache and cookies to solve the problem. Here’s a step-by-step guide for you.
Step 1: Move to the Settings of Chrome by following the Step 1 and Step 2 of Solution 1.
Step 2: Scroll down the content in the page to find Clear browsing data as shown in the picture below. Then click on it.
Step 3: In the pop-up window, choose the content you want to delete and click on the Clear data button. Then the selected content will be deleted automatically.
About The Author
Position: Columnist
Having writing articles about computer tech for a long time, I am rather experienced especially on the aspect of computer optimization, PC enhancement, as well as tech terms explanation. The habit of looking through tech forums makes me a great computer issues collector. And then, many articles related to these issues are released, which benefit plenty of users. Professional, effective, and innovative are always the pursuit of an editing worker.
The err_unknown_url_scheme error usually comes up during Android WebView app development when a developer has chosen links to have mailto://, whatsapp://, or any other intent that’s not the basic http:// or https://. Specific URL coding needs to be added to handle these difference URL schemes to prevent this error.
The discussion and solutions for this article are directed towards Android developers. If you are a user and run into this error, there’s nothing you can do to immediately solve the problem. Your best course of action would be to contact the app developer to make sure they are aware of this bug.
Android Dominance
Android is the dominant operating system (OS) for mobile devices. Android boasts a 71% market share, followed by Apple’s iOS with 27% market share. Google bought Android Inc. in 2005 in order to have control over Android’s future development and to load Android OS on all of its mobile devices. All other major mobile device manufacturers, besides Apple, use Android. Samsung, OnePlus, Huawei, Motorola, Nokia, LG, and Sony devices all come preloaded with the Android OS. It’s also significantly easier to develop and host an app on Google’s Play Store than on Apple’s App Store.
These factors have contributed to a robust Android developer community. Android developers use meetups and conferences, slack and Reddit, blogs and forums, and Stack Overflow to communicate and learn from each other. Many developers are self-taught and rely on the insights of the Android community to overcome persistent programming errors and bugs.
Android Studio is the only official development environment for Android. Android Studio was built using JetBrains’ software, the same company responsible for a variety of other popular IDEs (integrated development environments) for languages like Python (Pycharm), PHP (PhpStorm), and Java (IntelliJ IDEA).
Native apps live in the Google Play Store or App Store. They are fully developed applications that are installed directly onto the mobile device. Native apps will maintain most of their functionality even when not connected to the internet or mobile networks. These differ from web apps, which are simply websites. Web applications are easier to develop but don’t have access to any system features like GPS.
As a developer you may want to build a native app but still provide access to web content. This is done using WebView. WebView is a special class that allows web content to be displayed within your native app. For example, if you have the native Facebook app on your phone and click an external link, the webpage will load within the app. You can navigate around on the loaded webpage, access other parts of the webpage, shop, and interact. The embedded browser will not have an address bar for your user to search with. This provides the developer a way to have both the benefits of a web app and a native app.
WebView is set to handle certain URL schemes. If you try to use a special URL scheme outside the standard https:// and http://, WebView can throw the err_unknown_url_scheme error. A few of the non-standard URL schemes that WebView isn’t set to recognize are:
- mailto://
- whatsup://
- file://
- telnet://
- intent://
- market://
- app://
3 ways to fix the err_unknown_url_scheme error
To solve this error, you can go one of two routes: either disable those schemes and only develop your app using http:// and https:// schemes, or you can edit your code to be able to handle these specific URL schemes. The first option is not an absolute solution but can fix the problem in some use cases. The second solution shows examples of how to add new intents for URL schemes, and the third solution involves disabling any non-standard URL schemes.
1. Open In New Window
A quick and easy stopgap solution is editing your URL href code. By adding target=”_blank” you are able to solve the problem in a roundabout way. Now adding this snippet of code can have an undesirable development effect because this link will now open in a new window.
Development best practice is to avoid opening extra browser windows. This is because a new browser can bother or confuse your user. By removing the ‘back’ button, users find it more difficult to navigate and get back to their previous page in your app. The standard is target=”_self”, which opens the link in the same browser page.
Below is an example of URL href code with target=”_blank” added in:
<a href= “tel:555-111-5555” target=”_blank”> Contact Me </a>
Or:
<a href=”mailto:myname@gmail.com” target=”_blank”> Email Me </a>
2. Add New Intent to Load in External App
In Android development, intents are used to tell Android what you want the app to do, essentially allowing you to call a specific action or component. Some scheme errors can be fixed by adding an intent to load in an external app. For example, loading mailto:// in an external app should cause the email link to open in your default email application. Another example is maps:// which should open in your default maps application.
In the code snippet below, you will be using an IF statement to handle this. Any URL that starts with http:// or https:// is ignored and opened as usual. Otherwise, if the URL involves a special scheme such as:
- tel://
- sms://
- mailto://
- geo://
- maps://
then a new intent is added to load the action in an external app. If the activity cannot be successfully started because no associated external app exists on that system, an error will appear to the user.
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url == null || url.startsWith("http://") || url.startsWith("https://")) {
return false;
}
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
view.getContext().startActivity(intent);
return true;
} catch (Exception e) {
Log.i(TAG, "shouldOverrideUrlLoading Exception:" + e);
return true;
}
}
Another code snippet is included below to show that you can tackle this problem in a variety of ways. This method overrides URL loading like seen above and should open a related app to carry out the protocol. If the associated application, in this case Whatsapp is not installed, a message is displayed for your user. This message is called a toast message and gives the user an idea on what went wrong and how to fix it. The toast message for this scheme was ‘Whatsapp has not been installed’.
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
if (url.startsWith("whatsapp://")) {
webview.stopLoading();
try {
Intent whatsappIntent = new Intent(Intent.ACTION_SEND);
whatsappIntent.setType("text/plain");
whatsappIntent.setPackage("com.whatsapp");
whatsappIntent.putExtra(Intent.EXTRA_TEXT, webview.getUrl() + " - Shared from webview ");
startActivity(whatsappIntent);
} catch (android.content.ActivityNotFoundException ex) {
String MakeShortText = "Whatsapp has not been installed";
Toast.makeText(WebactivityTab1.this, MakeShortText, Toast.LENGTH_SHORT).show();
}
};
};
3. Disable any non-standard URL schemes
By disabling URL schemes other than the standard https:// and http:// you are bypassing this problem completely. You won’t be able to use any custom schemes like the ones listed earlier in the article.
If your app has one of these schemes or a user somehow navigates to a link using these schemes, a toast message will appear. The message “Error: Unknown link type” will tell the user they can’t proceed. Below is an example of this method:
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
if (url.startsWith("http") || url.startsWith("https")) {
return true;
}else {
webview.stopLoading();
webview.goBack();
Toast.makeText(MainActivity.this, "Error: Unknown link type", Toast.LENGTH_SHORT).show();
}
return false;
}
WebView Has Great Benefits, But Some Creative Coding Is Needed
Android WebView really provides the best of both worlds for Android developers, but creative workarounds are needed for some situations. By using WebView to display an embedded browser within your native app, you gain all the benefits of both the native app and a web app. You will be able to use the native system APIs in your web code which is usually constrained.
If you are developing an app and want to include special URLs, outside of http:// and https:// you will need to add some intents or fall back URLs, otherwise your our users will experience the error “err_unknown_url_scheme”. When a URL like mailto:// or maps:// is called, your code needs to open an associated external app that can complete that action. Otherwise you can disable these other URLs and set a specific error message to any users that stumbles upon a link with one of these URL schemes.
You need override the method shouldOverrideUrlLoading
of WebViewClient in which you can control link transfer by yourself.
Because html links that starts with mailto: whatsapp: and tg: (Telegram).
is not common url start with «http://» or «https://», so WebView cannot parse it to right place, we should use intent to redirect the url.
For example:
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url == null || url.startsWith("http://") || url.startsWith("https://")) return false;
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
view.getContext().startActivity(intent);
return true;
} catch (Exception e) {
Log.i(TAG, "shouldOverrideUrlLoading Exception:" + e);
return true;
}
}
then setWebViewClient to your WebView, like this:
public class MainActivity extends Activity {
private WebView mWebView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mWebView = (WebView) findViewById(R.id.activity_main_webview);
// Force links and redirects to open in the WebView instead of in a browser
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url == null || url.startsWith("http://") || url.startsWith("https://")) return false;
try {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
view.getContext().startActivity(intent);
return true;
} catch (Exception e) {
Log.i(TAG, "shouldOverrideUrlLoading Exception:" + e);
return true;
}
}
});
// Enable Javascript
WebSettings webSettings = mWebView.getSettings();
webSettings.setJavaScriptEnabled(true);
// Use remote resource
mWebView.loadUrl("http://myexample.com");
}}
I am building a hybrid mobile app with Visual Studio Tools for Apache Cordova that is able to make phone calls, send text message or emails, view a location on a map, etc. These are all handled with external applications (for instance use Gmail to send an email or Maps to pinpoint a location). They are placed in an anchor tag in HTML, such as <a href=»tel:12345678″>, <a href=»sms:12345678″>, <a href=»mailto:name@domain.com»> or <a href=»geo:…»>. These work fine except that when you execute one of these actions and the system opens another app you see for a short time a webview with an error: “Web page not available”. Then the external app opens, you take the action and then go back to the app. At that point you again see this webview with the error as shown below.
This seem to be a known issue as I found many references of it on the web. Here are several for reference:
- Android WebView “tel:” links show web page not found
- Getting net::ERR_UNKNOWN_URL_SCHEME while calling telephone number from HTML page in Android
- Android Webview ERR_UNKNOWN_URL_SCHEME Error
- Webview shouldoverrideurlloading doesn’t work
I am using the InAppBrowser plugin to open links in external apps. In order for this to work the schemes must be white-listed in Cordova’s config.xml file and the launch-external attribute should be set to true (which was already set in my case).
<access origin="mailto:*" launch-external="true" /> <access origin="tel:*" launch-external="true" /> <access origin="sms:*" launch-external="true" /> <access origin="geo:*" launch-external="true" /> <access origin="maps:*" launch-external="true" />
The indicated solution is to override WebView.shouldOverrideUrlLoading method.
I added the following in pluginscordova-plugin-inappbrowsersrcandroidInAppBrowser.java in the plugin’s WebView extension, but that did not work as the code did not even execute.
@Override public boolean shouldOverrideUrlLoading(WebView view, String url) { if( url.startsWith("http:") || url.startsWith("https:") ) { return false; } // Otherwise allow the OS to handle it Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); cordova.getActivity().startActivity(intent); return true; }
Looking for a solution I have noticed that this was only working OK for tel: and for others it was exhibiting this behavior. Then I found the following code in the InAppBrowser plugin class, in the execute() method.
//Load the dialer else if (url.startsWith(WebView.SCHEME_TEL)) { try { Log.d(LOG_TAG, "loading in dialer"); Intent intent = new Intent(Intent.ACTION_DIAL); intent.setData(Uri.parse(url)); cordova.getActivity().startActivity(intent); } catch (android.content.ActivityNotFoundException e) { LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString()); } }
I have changed that to include the other schemes and that fixed the problem.
else if (url.startsWith(WebView.SCHEME_TEL) || url.startsWith("sms:") || url.startsWith(WebView.SCHEME_MAILTO) || url.startsWith(WebView.SCHEME_GEO) || url.startsWith("maps:")) { try { Log.d(LOG_TAG, "loading in external app"); Intent intent = new Intent(Intent.ACTION_VIEW); intent.setData(Uri.parse(url)); cordova.getActivity().startActivity(intent); } catch (android.content.ActivityNotFoundException e) { LOG.e(LOG_TAG, "Error opening external app " + url + ": " + e.toString()); } }
With this in place, the web page error no longer shows up for any URL scheme.
I’m not sure if this is the best solution, but it is the only one that I managed to implement.