Example usage for android.app Fragment onRequestPermissionsResult

List of usage examples for android.app Fragment onRequestPermissionsResult

Introduction

In this page you can find the example usage for android.app Fragment onRequestPermissionsResult.

Prototype

public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
        @NonNull int[] grantResults) 

Source Link

Document

Callback for the result from requesting permissions.

Usage

From source file:org.y20k.transistor.MainActivity.java

@TargetApi(Build.VERSION_CODES.M)
@Override//w w  w .  ja  va2  s.  c  o  m
public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions,
        @NonNull int[] grantResults) {
    Fragment fragment = getFragmentManager().findFragmentById(R.id.fragment_main);
    // hand results over to fragment main
    fragment.onRequestPermissionsResult(requestCode, permissions, grantResults);
}