mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-02-21 00:23:00 +08:00
fix(calendar): add new permissions functions for Android 6 (M) devices
closes #156
This commit is contained in:
parent
aa034a2081
commit
ddbd64d19a
@ -33,6 +33,26 @@ export interface Calendar {
|
||||
platforms: ['Android', 'iOS']
|
||||
})
|
||||
export class Calendar {
|
||||
|
||||
/**
|
||||
* This function checks if we have permission to read/write from/to the calendar.
|
||||
* The promise will resolve with `true` when:
|
||||
* - You're running on iOS, or
|
||||
* - You're targetting API level lower than 23, or
|
||||
* - You're using Android < 6, or
|
||||
* - You've already granted permission
|
||||
*
|
||||
* If this returns false, you should call `requestReadWritePermissions` function
|
||||
*/
|
||||
@Cordova()
|
||||
static hasReadWritePermissions(): Promise<boolean> { return; }
|
||||
|
||||
/**
|
||||
* Requests read/write permissions
|
||||
*/
|
||||
@Cordova({sync: true})
|
||||
static requestReadWritePermissions(): void {}
|
||||
|
||||
/**
|
||||
* Create a calendar. (iOS only)
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user