A plugin to detect if "Allow Mock Locations" is enabled on Android phones.
Supporting Android API Level 23
cordova plugin add https://github.com/husmen73/cordova-check-mock-locations-enabled-plugin.git
window.plugins.cml.check(function (result) {
if (result == 1) {
console.log("Mock locations is enabled!");
}
else if (result == 2) {
console.log("Mock locations may be enabled on Android API 23!");
}
else {
console.log("Mock locations is disabled!");
}
});