Access to file

alex-1999

Member
May 2, 2024
5
0
1
Visit site
My application need to create and uploading JSON file. Application definitely created file - I can see it in Android studio, Than I try to read the same file by my application. But I can not access to to files on CD-card.

ShareFileProvider-05312024_003622_1.png

This is my Manifest

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:requestLegacyExternalStorage="true"
android:name="com.tns.NativeScriptApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
android:hardwareAccelerated="true">
<provider
android:name="androidx.core.content.FileProvider"
android:authorities="${applicationId}.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/file_paths" />
</provider>

Additionally I have configured file provider.
For programming I use this module https://github.com/nativescript-community/perms with this file picker https://github.com/AngelEngineering/nativescript-plugins/blob/main/packages/filepicker/README.md
I use Android emulator API 30 (Android 11).
What I need more to receive access to my files?
And what the best extension for my JSON file to minimum permission issues?
 
Last edited:

Members online

Forum statistics

Threads
944,484
Messages
6,922,970
Members
3,159,581
Latest member
EricMcM