hello Guys i Try to do a phone call Frome browser on mobile ,So i code This line of code in a Button With an click évent listener,
window.open(`tel:\*${numberPhone.value}#`, "_self"`)
the result is initiating a phone call , then i have to press the button call on my phone to do so.
i dont know how to do that
the probleme is, i want the call to pass automatically when i press the button on my browser . how can i do that
This is not possible as the browser cannot control the native phone app. The user will always need to opt in to actually make the call.
Related
I am writing a Javascript which runs in the browser using Tampermonkey.
The logic in the script is as follows.
1. Do some checks.
2. If a certain condition is met, then trigger an alert box in the browser.
Currently the alert box is shown in the browser tab, but amidst multiple tabs, the user does not notice the alert box till they navigate to the tab.
I am trying to figure out one or both of the following.
1. Bring the tab to the front i.e. focus on that tab.
2. Do something more aggressive than the alert box to catch user's attention. I thought of things such as playing sounds etc but it requires on user's speakers being on etc.
Any ideas on how to make this work would be greatly appreciated.
Looks like this cannot be done and the easiest option would be to write some data to the browser's local storage and then open a new window, fetch the data and display it.
I want to run psns: after my code has executed as a link. psns: will close the PlayStation 4 browser and is designed to be clicked on, but I want to automatically run it without having the user click on it.
This is what I have:
if(alert('The browser will now close.')) window.location.href='psns:';
I do get the alert, but for some odd reason the browser does not close, even though when you click a link with psns: as a href, it does. How can I make it so it runs psns: after the alert?
I am making a Windows 10 Web App (Project Westminster). There is a page that requires user to input something, and there's a 'save' button, and another button that leads to another page of the app.
To prevent user clicking the wrong button and lost his/her data before saving, I implement the JavaScript confirm() method to ask users to confirm before leaving.
This is working on iOS, Android, or Edge browser on Windows 10, but not on the Windows 10 app. The prompt does not show up but the page also does not exit, as if the user has already pressed the "stay here" button.
How can I make this work as expected? Thanks!
Windows will not let you prevent the closing of an app of the user chooses to, so the best way to handle this would be to save the data on the Suspending event and load it again when the app resumes.
Here's a sample that might help you get going.
How do I do that? Required: when I click on the number, it must make a call automatically(redirect to dialer).
As you are talking about the default android browser I assume you have a site that you want to allow the user to contact you from.
2125551212
A click on the number will open the dialer (but you still need to press the dial button).
Possible duplicate of: Can I make a phone call from HTML on Android?
I am developing a web-app in iOS using PhoneGap. I need to make a javascript function call when the application goes into the background.
I am calling the function from "applicationWillResignActivity" method, but its not executing till the app comes to the foreground next time. Any other non-javascript code is getting executed. This happens only when I press home button. In other cases, like pressing power button when the app is running, and pressing the home button twice, the javascript function gets executed.
Is there some constraint over UIWebView of such kind? Can someone please tell if there is a way to make javascript work when user presses Home button?
It seems there is no way to capture such event. So just to self-answer this question, that there indeed is no delegate method to run JS code when app goes into background.