Ujjwala

Ujjwala

I'm not getting permission to access full storage, although I added all permission requirements in manifest file. I'm using android 14 version(API 34)

I’m developing an Android application in which I need to add functionality to automatically read a CSV file from a file manager, parse it, and store the data in a database.

I have added all permissions but it says permission denied.

private void requestPermission() {
ActivityCompat.requestPermissions(this, new String{Manifest.permission.READ_EXTERNAL_STORAGE}, REQUEST_CODE_READ_EXTERNAL_STORAGE);
}

@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
    super.onRequestPermissionsResult(requestCode, permissions, grantResults);
    if (requestCode == REQUEST_CODE_READ_EXTERNAL_STORAGE) {
        if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
            Toast.makeText(this, "Permission Granted", Toast.LENGTH_SHORT).show();
        } else {
            Toast.makeText(this, "Permission Denied", Toast.LENGTH_SHORT).show();
        }
    }
}

Most Liked

johnfisher

johnfisher

Starting with Android 14, READ_EXTERNAL_STORAGE is replaced by READ_MEDIA_* for media files. For non-media files, use the Storage Access Framework (SAF) or request MANAGE_EXTERNAL_STORAGE. Add it to your manifest and guide users to enable it via Settings.ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION. Note: Google Play restricts MANAGE_EXTERNAL_STORAGE.

Where Next?

Popular Android topics Top

Exadra37
I am in the process of research for my next technical blog about bypassing certificate pinning with Frida, thus I need to find some open ...
New
big_f
I am making an app with Nativescript-vue and I would like to have an event where I click on an icon and then a new box appears. For the i...
New
ciger
I want to get a clone of Instagram APK But with a difference I want to define in this clone that, for example, it is not possible to acc...
New
Apoorv
I have made my version of browser on android platform.I have used chromium as base. I have build it successfully & but the logo or i...
New
cve60069
Hello I am starting the tearning curve to writing an app for my galaxy phone. Me and my friens play a lot of “Texas Hold-Em” and, for t...
New
tunelabguy
I have an expensive app ($160) in the Play Store that I would like to update. I would like to do a beta test of the update with potentia...
New
vsiPr
I am trying to develop an app which will make your smartphone act as a “keyboard”. I need it to send different symbols to another devices...
New
sonit
Display is not working properly in landscape mode when projection given by pixel 7 version 13 in case of video play by youtube app after ...
New
Ujjwala
I’m developing an Android application in which I need to add functionality to automatically read a CSV file from a file manager, parse it...
New
Garrett
I’m stuck trying to understand how to get a variable initialised, and later updated, in kotlin to update in Jetpack Compose and cause a c...
New

Other popular topics Top

Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
New
AstonJ
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face: Perhaps if there’s enough peop...
New
New
PragmaticBookshelf
Author Spotlight James Stanier @jstanier James Stanier, author of Effective Remote Work , discusses how to rethink the office as we e...
New
PragmaticBookshelf
Author Spotlight Mike Riley @mriley This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
PragmaticBookshelf
Author Spotlight: Tammy Coron @Paradox927 Gaming, and writing games in particular, is about passion, vision, experience, and immersio...
New
sir.laksmana_wenk
I’m able to do the “artistic” part of game-development; character designing/modeling, music, environment modeling, etc. However, I don’t...
New
AnfaengerAlex
Hello, I’m a beginner in Android development and I’m facing an issue with my project setup. In my build.gradle.kts file, I have the foll...
New
AstonJ
This is a very quick guide, you just need to: Download LM Studio: https://lmstudio.ai/ Click on search Type DeepSeek, then select the o...
New
Fl4m3Ph03n1x
Background Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New