After reinstalling the project my package is not visible in the sdCard folder in android studio device explorer. Prior to uninstalling this wasn't the issue and I have never made any changes as to the permissions in the manifest or the runtime permissions request. When I use windows explorer and navigate to the /android/data folder my package is not present. Yet my app runs in the device normally. I am on android studio 4.0
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.example.package.MyService"
android:exported="true"/>
I can see the storage permission is granted in my device.
Just turn off USB storage, and with the correct permissions, you'll have the problem solved.
You can try to use the android:preserveLegacyExternalStorage="true" tag in the manifest file in the application tag. This tag is used to access the storage in the android 11 devices. And for more detail follow this link it will explain you more as per your requirement.
In Android Studio, /storage/emulated/0
is symbolically linked from /sdcard
, as this directory is for external storage. You can access the data you're looking for at /sdcard/Android/data/<app_package>
You should also be able to access these files on the SD card via My Files
on the android device, assuming the device has an SD card inserted.
See this question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With