If you have questions or if you want to share your opinion about Aware IM post your message on this forum
#53095 by eagles9999
Sun Feb 09, 2020 9:17 am
I have a mobile app and we want to capture the location where users log in from.
If they have Location Services switched on then it works perfectly.

But, if they don't then we are getting this error.

No Location.jpg
No Location.jpg (59.47 KiB) Viewed 1844 times

Is there any way to not show the error or at least capture the error so that we can show a message like.. "Please turn on Location Services"

#53096 by Jaymer
Sun Feb 09, 2020 6:24 pm
in Aware's JS files (probably aware_full.js), there's code to present a dialog box.
you could modify that JS to look for that string (being sent to the msgbox function) and when found, display a "hardcoded" msg to your liking, instead of the passed in details.
#53104 by aware_support
Mon Feb 10, 2020 7:20 am
create your custom JS file (if you don;t already have one) and put it in Custom/JS
The file should have this code:

AwareApp.getLocation = function (objName, objId, enableHighAccuracy, successCallback, errorCallback)
var me = this;

navigator.geolocation.getCurrentPosition (
function (position) {
me.writeLocation (position, objName, objId, successCallback);
function (error) {
alert("Please turn on Location Services");
enableHighAccuracy: enableHighAccuracy
#53105 by eagles9999
Mon Feb 10, 2020 7:35 am
Perfect. Thanx Support.

Who is online

Users browsing this forum: Google [Bot] and 76 guests