mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Add RequestPermission to become an Application activity callback like BackPress. (Patch 2/2)
This commit is contained in:
25
application/application.d.ts
vendored
25
application/application.d.ts
vendored
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user