Add plugin
cordova-plugin-mock-location
Add this code in your index.js file
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.plugins.mocklocation.check(successCallback, errorCallback);
}
function successCallback(result) {
console.log(result); // true - enabled, false - disabled
}
function errorCallback(error) {
console.log(error);
}
cordova-plugin-mock-location
Add this code in your index.js file
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
window.plugins.mocklocation.check(successCallback, errorCallback);
}
function successCallback(result) {
console.log(result); // true - enabled, false - disabled
}
function errorCallback(error) {
console.log(error);
}
Not working
ReplyDelete