MOBILE-4470 Diagnostic.ts: Fix microphone and location usage
parent
21e6b789f0
commit
62d65a4ae0
|
@ -17,10 +17,18 @@
|
||||||
</config-file>
|
</config-file>
|
||||||
|
|
||||||
<config-file target="res/xml/config.xml" parent="/*">
|
<config-file target="res/xml/config.xml" parent="/*">
|
||||||
<feature name="Diagnostic" >
|
<feature name="Diagnostic">
|
||||||
<param name="android-package" value="com.moodle.moodlemobile.Diagnostic"/>
|
<param name="android-package" value="com.moodle.moodlemobile.Diagnostic"/>
|
||||||
<param name="onload" value="true" />
|
<param name="onload" value="true" />
|
||||||
</feature>
|
</feature>
|
||||||
|
<feature name="Diagnostic_Microphone">
|
||||||
|
<param name="android-package" value="com.moodle.moodlemobile.Diagnostic"/>
|
||||||
|
<param name="onload" value="true" />
|
||||||
|
</feature>
|
||||||
|
<feature name="Diagnostic_Location">
|
||||||
|
<param name="android-package" value="com.moodle.moodlemobile.Diagnostic_Location"/>
|
||||||
|
<param name="onload" value="true" />
|
||||||
|
</feature>
|
||||||
</config-file>
|
</config-file>
|
||||||
|
|
||||||
<source-file src="src/android/Diagnostic.java" target-dir="src/cordova/plugins" />
|
<source-file src="src/android/Diagnostic.java" target-dir="src/cordova/plugins" />
|
||||||
|
@ -45,7 +53,7 @@
|
||||||
<header-file src="src/ios/SecureStorage.h" />
|
<header-file src="src/ios/SecureStorage.h" />
|
||||||
<source-file src="src/ios/SecureStorage.m" />
|
<source-file src="src/ios/SecureStorage.m" />
|
||||||
|
|
||||||
<config-file target="config.xml" parent="/*">
|
<config-file target="config.xml" parent="/*">
|
||||||
<feature name="Diagnostic">
|
<feature name="Diagnostic">
|
||||||
<param name="ios-package" value="Diagnostic" />
|
<param name="ios-package" value="Diagnostic" />
|
||||||
<param name="onload" value="true" />
|
<param name="onload" value="true" />
|
||||||
|
|
|
@ -62,11 +62,12 @@ export class Diagnostic {
|
||||||
}
|
}
|
||||||
|
|
||||||
isLocationEnabled(): Promise<boolean> {
|
isLocationEnabled(): Promise<boolean> {
|
||||||
return new Promise<boolean>((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic', 'isLocationEnabled'));
|
return new Promise<boolean>((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic_Location', 'isLocationEnabled'));
|
||||||
}
|
}
|
||||||
|
|
||||||
switchToLocationSettings(): Promise<void> {
|
switchToLocationSettings(): Promise<void> {
|
||||||
return new Promise<void>((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic', 'switchToLocationSettings'));
|
return new Promise<void>((resolve, reject) =>
|
||||||
|
cordova.exec(resolve, reject, 'Diagnostic_Location', 'switchToLocationSettings'));
|
||||||
}
|
}
|
||||||
|
|
||||||
switchToSettings(): Promise<void> {
|
switchToSettings(): Promise<void> {
|
||||||
|
@ -75,16 +76,17 @@ export class Diagnostic {
|
||||||
|
|
||||||
getLocationAuthorizationStatus(): Promise<unknown> {
|
getLocationAuthorizationStatus(): Promise<unknown> {
|
||||||
return new Promise<unknown>((resolve, reject) =>
|
return new Promise<unknown>((resolve, reject) =>
|
||||||
cordova.exec(resolve, reject, 'Diagnostic', 'getLocationAuthorizationStatus'));
|
cordova.exec(resolve, reject, 'Diagnostic_Location', 'getLocationAuthorizationStatus'));
|
||||||
}
|
}
|
||||||
|
|
||||||
requestLocationAuthorization(): Promise<void> {
|
requestLocationAuthorization(): Promise<void> {
|
||||||
return new Promise<void>((resolve, reject) => cordova.exec(resolve, reject, 'Diagnostic', 'requestLocationAuthorization'));
|
return new Promise<void>((resolve, reject) =>
|
||||||
|
cordova.exec(resolve, reject, 'Diagnostic_Location', 'requestLocationAuthorization'));
|
||||||
}
|
}
|
||||||
|
|
||||||
requestMicrophoneAuthorization(): Promise<string> {
|
requestMicrophoneAuthorization(): Promise<string> {
|
||||||
return new Promise<string>((resolve, reject) =>
|
return new Promise<string>((resolve, reject) =>
|
||||||
cordova.exec(resolve, reject, 'Diagnostic', 'requestMicrophoneAuthorization'));
|
cordova.exec(resolve, reject, 'Diagnostic_Microphone', 'requestMicrophoneAuthorization'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue