I want to add the permissions to access the files and location of user in my android app. Right now when the user open my app, it asks for permissions but if the user deny it my app doesn't work fine due to the downloaded images in his phone. It gives bad impact. Now i want to ask that how i can ask for permission in my app within playstore before downloading my app(Like ES File Explorer File Manager). If the user deny this he can't able to install my app.
From the source: https://developer.android.com/training/permissions/requesting.html
If the device is running Android 5.1 or lower, or your app's target SDK is 22 or lower: If you list a dangerous permission in your manifest, the user has to grant the permission when they install the app; if they do not grant the permission, the system does not install the app at all.
So, i think you can set your target SDK and target API below 22 for using old permission system.