From 62d65a4ae01047e07a9348c91422a2fe92155aab Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Wed, 12 Jun 2024 08:56:03 +0200 Subject: [PATCH 1/2] 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')); } } From c4a0a5c7c8651f50b2556dd0b04ba1fb97c524a3 Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Wed, 12 Jun 2024 08:56:47 +0200 Subject: [PATCH 2/2] MOBILE-4470 plugin.xml: Add NSLocationAlwaysAndWhenInUseUsageDescription --- cordova-plugin-moodleapp/plugin.xml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cordova-plugin-moodleapp/plugin.xml b/cordova-plugin-moodleapp/plugin.xml index eeb956a09..a1a93f296 100644 --- a/cordova-plugin-moodleapp/plugin.xml +++ b/cordova-plugin-moodleapp/plugin.xml @@ -76,6 +76,10 @@ + + We need your location so you can attach it as part of your submissions. + + We need your location so you can attach it as part of your submissions.