i am implement an android application in java and everything was working perfectly until i install it on an android 13 version . Since then , i can't grant the permission to read file ( specially text file ) . How could i solve it ?
Unable to grant permission to my android app to read a text file on android 13
557 Views Asked by Patrick Renaud At
1
There are 1 best solutions below
Related Questions in ANDROID-PERMISSIONS
- INSTALL_FAILED_DUPLICATE_PERMISSION: Package
- Can not access OTG USB Key after just after Granting ACTION_MANAGE_APP_ALL_FILES_ACCESS_PERMISSION
- Implementing PDF generation and then From Local Notification Open the Pdf that is Saved to Download
- Can't perform CRUD operation using custom content provider
- Permission Denial: not allowed to send broadcast android.intent.action.PHONE_STATE from pid=5646, uid=11219
- Is there any way to get READ_PRECISE_PHONE_STATE permissions on android without manufacturer access?
- Full-screen notification permission revoked when granting/denying other permissions in Android 14
- Android com.google.android.gms.permission.AD_ID permission seems not taken into account?
- Call requires permission which may be rejected by user code should explicitly check to see if permission is available
- google reject apps use sms permissions
- Restrict mainActivity to be accessible by other apps in Flutter
- Requesting permissions for schedule exact alarms and send notifications in Android 14
- Android: How to disable permission popup from webview and show a native permission dialog
- How to Resolve Missing AD_ID Permission Warning in Android Manifest?
- NFC permission required: Neither user 10711 nor current process has android.permission.NFC
Related Questions in ANDROID-VERSION
- Ending Support for Older Android Versions in My App's Free and Paid Versions on Google Play
- How to perform compile-time checks for Android version within a Java library in an Android project?
- Show Android version always on screen on android device or emulator
- Facing Permission Issue in Android version 33
- I can't retrieve the real path for file uploads on Android version 13 phones
- Unable to grant permission to my android app to read a text file on android 13
- Custome textCursorDrawable is not reflected in Android 10 and higher devices
- Download manager code is working in older device and not in latest device
- how to find the reason that my app does not open in android 8 but opens in android 12 (Kotlin Android Studio)
- Notification not showing on Android 10 and above when the app is closed, but works on lower versions
- How to populate Database from path file in API 28 (Android 9)
- Camera not being released on Android 8.1.0 build version 2.8.4 on M3 mobiles
- Verify android version kotlin Android 33
- How to know the Android version remotely
- How to get IMEI Number in Android 10,11,12 Programcally in My Android Application
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
I also had a problem with the lack of access to ExternalStorage for text files from my specified path which was like this:
Until SKD<=12, I was setting my path as :
up to version sdk=12 everything worked without a problem and with sdk=13 it stopped working – permission denied.
MY TEMPORARY SOLUTION
According to the new approach with SDK=13, we can do access to:
So I entered into the manifest file what the new approach requires and I still couldn't read from my specified path. Looking at the above permission, we get access to few directories among others PICTURES.
So put my directory with text files into the PICTURES directory.
I changed the access path to my directory and files to:
So now my directory path looks like
/storage/emulated/0/Pictures/dictfilesBut my snippet code:
which scanned the directory for files, still couldn't find my text files. I think that because Android by default requires graphic files in the Pictures directory and it did, it found .jpg .png .gif but my dicfiles directory with text files was missing. So in all my text files I added .jgp extension to my text files and now the code doesn't skip them.
Until I find another solution, this is how I solve it, but I haven't found another solution on the Internet and I've been looking for a long time.