From 62d65a4ae01047e07a9348c91422a2fe92155aab Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Wed, 12 Jun 2024 08:56:03 +0200 Subject: [PATCH] MOBILE-4470 Diagnostic.ts: Fix microphone and location usage --- cordova-plugin-moodleapp/plugin.xml | 12 ++++++++++-- .../src/ts/plugins/Diagnostic.ts | 12 +++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/cordova-plugin-moodleapp/plugin.xml b/cordova-plugin-moodleapp/plugin.xml index 18afcc715..eeb956a09 100644 --- a/cordova-plugin-moodleapp/plugin.xml +++ b/cordova-plugin-moodleapp/plugin.xml @@ -17,10 +17,18 @@ - + + + + + + + + + @@ -45,7 +53,7 @@ - + diff --git a/cordova-plugin-moodleapp/src/ts/plugins/Diagnostic.ts b/cordova-plugin-moodleapp/src/ts/plugins/Diagnostic.ts index 34c17739d..df446b68f 100644 --- a/cordova-plugin-moodleapp/src/ts/plugins/Diagnostic.ts +++ b/cordova-plugin-moodleapp/src/ts/plugins/Diagnostic.ts @@ -62,11 +62,12 @@ export class Diagnostic { } isLocationEnabled(): Promise { - return new Promise((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic', 'isLocationEnabled')); + return new Promise((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic_Location', 'isLocationEnabled')); } switchToLocationSettings(): Promise { - return new Promise((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic', 'switchToLocationSettings')); + return new Promise((resolve, reject) => + cordova.exec(resolve, reject, 'Diagnostic_Location', 'switchToLocationSettings')); } switchToSettings(): Promise { @@ -75,16 +76,17 @@ export class Diagnostic { getLocationAuthorizationStatus(): Promise { return new Promise((resolve, reject) => - cordova.exec(resolve, reject, 'Diagnostic', 'getLocationAuthorizationStatus')); + cordova.exec(resolve, reject, 'Diagnostic_Location', 'getLocationAuthorizationStatus')); } requestLocationAuthorization(): Promise { - return new Promise((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic', 'requestLocationAuthorization')); + return new Promise((resolve, reject) => + cordova.exec(resolve, reject, 'Diagnostic_Location', 'requestLocationAuthorization')); } requestMicrophoneAuthorization(): Promise { return new Promise((resolve, reject) => - cordova.exec(resolve, reject, 'Diagnostic', 'requestMicrophoneAuthorization')); + cordova.exec(resolve, reject, 'Diagnostic_Microphone', 'requestMicrophoneAuthorization')); } }