mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-07 23:03:19 +08:00
bugfix: add response type to permission checking (#3149)
This commit is contained in:
parent
73493e222f
commit
3a5c790a56
@ -204,20 +204,20 @@ export class AndroidPermissions extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* Check permission
|
* Check permission
|
||||||
* @param {string} permission The name of the permission
|
* @param {string} permission The name of the permission
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<AndroidPermissionResponse>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
checkPermission(permission: string): Promise<any> {
|
checkPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request permission
|
* Request permission
|
||||||
* @param {string} permission The name of the permission to request
|
* @param {string} permission The name of the permission to request
|
||||||
* @return {Promise<any>}
|
* @return {Promise<AndroidPermissionResponse>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
requestPermission(permission: string): Promise<any> {
|
requestPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -234,10 +234,14 @@ export class AndroidPermissions extends IonicNativePlugin {
|
|||||||
/**
|
/**
|
||||||
* This function still works now, will not support in the future.
|
* This function still works now, will not support in the future.
|
||||||
* @param {string} permission The name of the permission
|
* @param {string} permission The name of the permission
|
||||||
* @return {Promise<any>} Returns a promise
|
* @return {Promise<AndroidPermissionResponse>} Returns a promise
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
hasPermission(permission: string): Promise<any> {
|
hasPermission(permission: string): Promise<AndroidPermissionResponse> {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface AndroidPermissionResponse {
|
||||||
|
hasPermission: boolean;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user