New overload for requestPermissions() method in Fragments

21 views
Skip to first unread message

steelt...@gmail.com

unread,
Mar 21, 2018, 11:01:48 AM3/21/18
to android-platform
I wanted to know everyone's thoughts about this proposal.

When requesting permissions from a Fragment, I find it very annoying and unclean to have to override the
public void onRequestPermissionsResult(int requestCode,
String permissions[], int[] grantResults)
method, to get the results from the permission request, I think it would be a lot cleaner if we would create a overload to the
requestPermissions() method that adds a functional interface as a 3rd argument which would have the signature of the onRequestPermissionsResult method
this would allow much cleaner code since the callback could be implemented using a lambda/ anonymous class which would keep the code in order and clean.

What does everyone think?

Glenn Kasten

unread,
Mar 21, 2018, 12:27:00 PM3/21/18
to android-platform
If you don't get a conclusive answer here, please consider either filing a feature request bug at

or uploading a proposed patch for review at
Reply all
Reply to author
Forward
0 new messages