What is the most effective and reliable method of detecting an application in a telephone conversation or just in a browser for mobile / desktop computers with JavaScript? I am trying to fix any problems that prevent me from testing / debugging my telephone applications in any browser (desktop or mobile) and creating a truly universal code base for my applications.
I intend to structure my functions using special phonebook calls:
if (phonegapisrunning) {
}
else {
}
When searching for a solution, I ran into this problem:
PhoneGap: detection on startup in a desktop browser .
Although this thread discusses this issue, I do not see a clear answer to the question of which method is the most efficient / reliable. Should I bind to the onDeviceReady () event? Should I check window.device? Is there a more efficient or reliable way to check if the application is running on the phone through JavsScript?
And this thread that mentions the Ripple Chrome plugin:
Phonegap web app in regular desktop browsers
Ripple tools look like this can be a valuable testing tool. But I'm trying to make my phone call applications run in a desktop browser without a plugin.
, , useragent sniffing, , , , .