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.
Asked
Active
Viewed 87 times
1 Answers
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