fix(calendar): add new permissions functions for Android 6 (M) devices

closes #156
This commit is contained in:
Ibrahim Hadeed 2016-05-12 21:54:52 -04:00
parent aa034a2081
commit ddbd64d19a

View File

@ -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)
*