0

Is there any other argument to use instead of checkSelfPermission(). I want to compile my code in API 22. But checkSelfPermission() is only support API levels 23 and higher.

Poo
  • 143
  • 4
  • 19

1 Answers1

0

Step 1: Import package

import android.support.v4.app.ActivityCompat;

Step 2: Check permission

ActivityCompat.requestPermissions(Class.this, new String[]permission},requestCode);

Step 3: After permission is granted, you can invoke

@Override
public void onRequestPermissionsResult() {
}
Son Truong
  • 13,661
  • 5
  • 32
  • 58