Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

268
Views
Window.open() to trigger phone SMS/Call/Email app not working in Chrome on Android on Page Load - Using ReactJS

This is my code snippet.

else if (item.title === 'Text') {
             try {
                     window.open(`sms:${item.link}`,'_self')
             } catch (error) {
                 console.log(error)
             }

When this function is executed on a page load, it does not automatically trigger the SMS app. This issue only occurs on Chrome Android browser. Works for Safari, Mozilla, and Opera. When executed as an onClick, it works perfectly on all browsers, including Chrome on Android. Only facing an issue on page load in Chrome.

The framework I am using is React JS.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

For some strange reason, Andriod doesn't allow dynamically created SMS: links to work! Whereas if you copy a complete link in an anchor link (i.e <a href="sms://1234/?body=body">Click for SMS</a>) or window.open("sms://1234/?body=body") (if the link is correctly formed) it works. It wasted half of my day to find a way around it so far

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!