Skip to content

Document onRequestPermissionResult #1780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions framework/src/org/apache/cordova/CordovaPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,13 @@ public boolean hasPermisssion() {
}

/**
* Called by the system when the user grants permissions
* Called when the user grants permissions.
* Forwarded from {@link CordovaActivity#onRequestPermissionsResult(int, String[], int[])}.
*
* @param requestCode
* @param permissions
* @param grantResults
* @see https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[])
* @deprecated Use {@link #onRequestPermissionsResult} instead.
*/
@Deprecated
Expand All @@ -430,11 +432,13 @@ public void onRequestPermissionResult(int requestCode, String[] permissions,
}

/**
* Called by the system when the user grants permissions
* Called when the user grants permissions. Do not use it.
* This is currently not called by {@link CordovaActivity}, just by {@link PermissionHelper}, which is not used currently.
*
* @param requestCode
* @param permissions
* @param grantResults
* @see https://developer.android.com/reference/android/app/Activity#onRequestPermissionsResult(int,%20java.lang.String[],%20int[])
*/
public void onRequestPermissionsResult(int requestCode, String[] permissions,
int[] grantResults) throws JSONException {
Expand Down