Permission error in Android Studio [duplicate]

-1

I'm adding a function in the application that I'm developing in android studio, which makes direct calls from the app, but this error is asking for some kind of permission, and I've already added permission on my AndroidManifest.

    
asked by anonymous 11.05.2016 / 02:02

1 answer

0

Add this to your import:

import android.annotation.TargetApi;

String[] perms = {"android.permission.WRITE_EXTERNAL_STORAGE"};
ActivityCompat.requestPermissions(MainActivity.this,perms,permsRequestCode);

and enough.

    
30.04.2017 / 01:56