In my app i want to get user permission to read and write data on external storage, i have put permission tag in my manifest as below. But when installing app or running and whe
Clean the damn project, rebuild and run if it still does not work....
Add this code in onCreate method in your activity. Delete the app, clean the project, build and run. Also do not forget to add the permission you want in your manifest. (For a lower API level the code is unnecessary but from 23 and up you also need this code)
private fun requestPermission() {
val permissions = arrayOf(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.WRITE_EXTERNAL_STORAGE)
this.requestPermissions(permissions, 5)
}