In my mobile application I get this error of ERR_UNKNOWN_URL_SCHEME

Hello, I wanted to know how I can link a message from my app to WhatsApp because I already tried with the button and its external web link, but I get the same error, I also try with a text link and it is the same I get the same error, Someone could help me is for when a client asks for an order and I want that when he asks for his order he can do it on WhatsApp, I don’t know what the error could be, please, someone who can give me a solution, Thank you


1 Like

I’m not expert but no one else responded … the little I know is it is to do with Android and its web browser/webport not allowing URLS that start with things (schemes) like

whatsapp://…

Compare that URL to https://…

You probably need to google something like “How to open whatsapp from a link on an android phone?”

The error ERR_UNKNOWN_URL_SCHEME happens when your app or browser encounters a URL scheme that it doesn’t recognize or doesn’t know how to handle. This is common with schemes other than the standard “http://” or “https://”, and specifically mentions “whatsapp://” as one that might cause this issue if not handled correctly. It is generally a browser-related problem that appears when the browser is able to process a URL that it simply doesn’t know how to handle. URL scheme is the first element of a URL that defines the protocol that is necessary.

The possible solution can be as:-
Implement a handler (Intent) in the app’s code to handle the “whatsapp://” scheme and launch WhatsApp.
Verify the WhatsApp URL scheme’s correct format.
Consider adding the QUERY_ALL_PACKAGES permission for Android 12+ devices.

As, there are many causes for it, I found the helpful resource article in detail at:- https://cheapsslweb.com/resources/how-to-resolve-err_unknown_url_scheme-error. I hope it helps!