Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does confirm() work in android mobile on chrome?

I have a confirm request embedded in my .js file which requires user confirm before answering a call. Although it works fine in desktop Chrome but nothing happens in Mobile chrome (android)? This is the website http://webtest1.parseapp.com/ , but you need to create a login and add a friend and click on their name on the left to be able to call them if you need to test. This might be as simple as this only works on desktop as I am new to Mobile chrome. It is also a peer to peer services if you need to know.

 if (confirm("Answer call?") == true) {
    call.answer(window.localStream);
     step3(call);
     audioElement.pause();
} else{audioElement.pause();}
like image 324
Amir Avatar asked Oct 11 '15 09:10

Amir


1 Answers

1. Yes. Android chrome does support confirm().

It is as simple as this to test:

From my android chrome I visited the W3Schools Try it site.

HERE

This is the screenshot from my android device.

I found it no different from the desktop chrome.

2. My suggestion is to debug step by step: Why don't you try something obvious like this to test.

if(confirm("Answer call?") == true)alert("Inside if");
else alert("Inside else");  

Most likely, the issue is with call.answer(window.localStream). You may think in this terms or provide more info for us to understand.

like image 140
Yesh Avatar answered Nov 15 '22 18:11

Yesh