Add RequestPermission to become an Application activity callback like BackPress. (Patch 2/2)

This commit is contained in:
Nathanael Anderson
2016-03-16 21:45:31 -06:00
parent 12a82eb5bb
commit 6e6247335e
3 changed files with 39 additions and 0 deletions

View File

@@ -278,6 +278,26 @@ declare module "application" {
bundle: any /* android.os.Bundle */;
}
/**
* Data for the Android activity onRequestPermissions callback
*/
export interface AndroidActivityRequestPermissionsEventData extends AndroidActivityEventData {
/**
* The request code.
*/
requestCode: number,
/**
* The Permissions
*/
permissions: Array<String>,
/**
* The Granted.
*/
grantResults: Array<Number>
}
/**
* Data for the Android activity result event.
*/
@@ -440,6 +460,11 @@ declare module "application" {
*/
on(event: "activityBackPressed", callback: (args: AndroidActivityBackPressedEventData) => void, thisArg?: any);
/**
* This event is raised on the back button is pressed in an android application.
*/
on(event: "activityRequestPermissions", callback: (args: AndroidActivityBackPressedEventData) => void, thisArg?: any);
/**
* String value used when hooking to activityCreated event.
*/