commit
1934993d8c
|
@ -17,10 +17,18 @@
|
|||
</config-file>
|
||||
|
||||
<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="onload" value="true" />
|
||||
</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>
|
||||
|
||||
<source-file src="src/android/Diagnostic.java" target-dir="src/cordova/plugins" />
|
||||
|
@ -45,7 +53,7 @@
|
|||
<header-file src="src/ios/SecureStorage.h" />
|
||||
<source-file src="src/ios/SecureStorage.m" />
|
||||
|
||||
<config-file target="config.xml" parent="/*">
|
||||
<config-file target="config.xml" parent="/*">
|
||||
<feature name="Diagnostic">
|
||||
<param name="ios-package" value="Diagnostic" />
|
||||
<param name="onload" value="true" />
|
||||
|
@ -68,6 +76,10 @@
|
|||
|
||||
<framework src="CoreLocation.framework" />
|
||||
|
||||
<config-file target="*-Info.plist" parent="NSLocationAlwaysAndWhenInUseUsageDescription" comment="Default usage descriptions: override as necessary in .plist">
|
||||
<string>We need your location so you can attach it as part of your submissions.</string>
|
||||
</config-file>
|
||||
|
||||
<config-file target="*-Info.plist" parent="NSLocationWhenInUseUsageDescription" comment="Default usage descriptions: override as necessary in .plist">
|
||||
<string>We need your location so you can attach it as part of your submissions.</string>
|
||||
</config-file>
|
||||
|
|
|
@ -62,11 +62,12 @@ export class Diagnostic {
|
|||
}
|
||||
|
||||
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> {
|
||||
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> {
|
||||
|
@ -75,16 +76,17 @@ export class Diagnostic {
|
|||
|
||||
getLocationAuthorizationStatus(): Promise<unknown> {
|
||||
return new Promise<unknown>((resolve, reject) =>
|
||||
cordova.exec(resolve, reject, 'Diagnostic', 'getLocationAuthorizationStatus'));
|
||||
cordova.exec(resolve, reject, 'Diagnostic_Location', 'getLocationAuthorizationStatus'));
|
||||
}
|
||||
|
||||
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> {
|
||||
return new Promise<string>((resolve, reject) =>
|
||||
cordova.exec(resolve, reject, 'Diagnostic', 'requestMicrophoneAuthorization'));
|
||||
cordova.exec(resolve, reject, 'Diagnostic_Microphone', 'requestMicrophoneAuthorization'));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue