Click here to Skip to main content
15,882,017 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: JavaScript Uncaught ReferenceError: WScript is not defined Pin
Afzaal Ahmad Zeeshan24-Dec-16 8:08
professionalAfzaal Ahmad Zeeshan24-Dec-16 8:08 
AnswerRe: JavaScript Uncaught ReferenceError: WScript is not defined Pin
ZurdoDev27-Dec-16 9:14
professionalZurdoDev27-Dec-16 9:14 
Questiondocument.referrer help Pin
sc1311118-Dec-16 22:17
sc1311118-Dec-16 22:17 
AnswerRe: document.referrer help Pin
Richard Deeming19-Dec-16 2:42
mveRichard Deeming19-Dec-16 2:42 
QuestionFunction to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Sathiya moorthi17-Dec-16 1:55
Sathiya moorthi17-Dec-16 1:55 
AnswerRe: Function to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Richard MacCutchan17-Dec-16 1:57
mveRichard MacCutchan17-Dec-16 1:57 
AnswerRe: Function to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Kornfeld Eliyahu Peter17-Dec-16 6:03
professionalKornfeld Eliyahu Peter17-Dec-16 6:03 
AnswerRe: Function to get location its not working in Android . How to find user device is gps is on or off Android or ios using js? Pin
Afzaal Ahmad Zeeshan17-Dec-16 6:04
professionalAfzaal Ahmad Zeeshan17-Dec-16 6:04 
Quote:
How to find user device is gps is on or off Android or ios using js?
You are aware of the fact that GPS is a system feature in Android and not a browser feature, right? You can get the location, but to detect or determine you will have rely on the user, as browser won't be able to trigger changes itself.

Offline devices will return the most recent locations, not accurate or live locations. If you mean to say that location APIs are available then read here,
Common sources of location information include Global Positioning System (GPS) and location inferred from network signals such as IP address, RFID, WiFi and Bluetooth MAC addresses, and GSM/CDMA cell IDs, as well as user input. No guarantee is given that the API returns the device's actual location.
So, you can simply request the users to enable GPS for better results.

Also, you should try to check for navigator.geolocation to be set to null or not, otherwise results may be generated.
JavaScript
if (navigator.geolocation) {
   //  code here.
} else {
   // API not supported, does not mean GPS off. 
}

For more,
javascript - how capturing geolocation with device offline - cordova - Stack Overflow[^]
Accessing GPS data with JavaScript in real time - Geographic Information Systems Stack Exchange[^]
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

QuestionTwo way binding in AngularJS Pin
Member 1110597416-Dec-16 4:50
Member 1110597416-Dec-16 4:50 
AnswerRe: Two way binding in AngularJS Pin
Nathan Minier21-Dec-16 3:54
professionalNathan Minier21-Dec-16 3:54 
GeneralRe: Two way binding in AngularJS Pin
Member 1110597421-Dec-16 4:30
Member 1110597421-Dec-16 4:30 
GeneralRe: Two way binding in AngularJS Pin
Nathan Minier21-Dec-16 4:44
professionalNathan Minier21-Dec-16 4:44 
GeneralRe: Two way binding in AngularJS Pin
Member 1110597421-Dec-16 4:57
Member 1110597421-Dec-16 4:57 
GeneralRe: Two way binding in AngularJS Pin
Nathan Minier21-Dec-16 5:12
professionalNathan Minier21-Dec-16 5:12 
GeneralRe: Two way binding in AngularJS Pin
Member 1110597422-Dec-16 4:40
Member 1110597422-Dec-16 4:40 
GeneralRe: Two way binding in AngularJS Pin
Nathan Minier23-Dec-16 1:01
professionalNathan Minier23-Dec-16 1:01 
Questionnpm install is giving error that project.json file doesn't exist even it exists Pin
indian1435-Dec-16 7:35
indian1435-Dec-16 7:35 
AnswerRe: npm install is giving error that project.json file doesn't exist even it exists Pin
John C Rayan30-Dec-16 4:38
professionalJohn C Rayan30-Dec-16 4:38 
QuestionSend as .pdf email attachment, job application form with asp.net Pin
TaRoshka3-Dec-16 0:43
TaRoshka3-Dec-16 0:43 
AnswerRe: Send as .pdf email attachment, job application form with asp.net Pin
Nathan Minier3-Dec-16 3:49
professionalNathan Minier3-Dec-16 3:49 
Questionweb developer Pin
Member 1284786913-Nov-16 6:37
Member 1284786913-Nov-16 6:37 
AnswerRe: web developer Pin
Richard MacCutchan13-Nov-16 21:43
mveRichard MacCutchan13-Nov-16 21:43 
AnswerRe: web developer Pin
ZurdoDev16-Nov-16 1:15
professionalZurdoDev16-Nov-16 1:15 
QuestionVimeo Sample code to fetch private videos using REST/ JSON/ JQuery Pin
Elena200612-Nov-16 0:03
Elena200612-Nov-16 0:03 
AnswerRe: Vimeo Sample code to fetch private videos using REST/ JSON/ JQuery Pin
ZurdoDev15-Nov-16 2:00
professionalZurdoDev15-Nov-16 2:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.