Closed efstathiosntonas closed 3 years ago
Hi, I'm using Android 10 and Xiaomi Note 8
using this snippet throws Stream Closed error:
Stream Closed
FileSystem.fetch(imageUrl, { path: Dirs.CacheDir + `/image.jpg` }) .then(() => { return FileSystem.stat(Dirs.CacheDir + `/image.jpg`).then((stat) => { return FileSystem.exists(stat.path).then((e) => { if (e) { return FileSystem.cpExternal( stat.path, "savedImage.jpg", "images" ).catch((er) => console.log(er)); } }); }); }) .catch((e) => console.log(e.message);
build.gradle:
buildscript { ext { buildToolsVersion = "29.0.2" minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 29 supportLibVersion = "29.0.0" googlePlayServicesVisionVersion = "19.0.0" }
AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.BLABLA"> <queries> <intent> <action android:name="android.media.action.IMAGE_CAPTURE" /> </intent> <intent> <action android:name="android.intent.action.GET_CONTENT" /> <data android:mimeType="image/*" /> </intent> <intent> <action android:name="android.intent.action.PICK" /> <data android:mimeType="image/*" /> </intent> <intent> <action android:name="android.intent.action.CHOOSER" /> </intent> </queries> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.ACCESS_MEDIA_LOCATION"/> <uses-permission android:name="android.permission.VIBRATE"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> <application android:name=".MainApplication" android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:theme="@style/AppTheme" android:requestLegacyExternalStorage="true" tools:ignore="GoogleAppIndexingWarning"> <activity android:name=".MainActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode" android:launchMode="singleTask" android:label="@string/app_name" android:screenOrientation="portrait" android:exported="true" android:windowSoftInputMode="adjustResize"/> <activity android:name="com.zoontek.rnbootsplash.RNBootSplashActivity" android:theme="@style/BootTheme" android:launchMode="singleTask"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.DEFAULT"/> <category android:name="android.intent.category.BROWSABLE"/> </intent-filter> </activity> <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" /> <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" /> </application> </manifest>
Image downloading works, the image is stored in app's cache dir and it has full size on disk (not 0 bytes).
Image is being copied to DCIM/Pictures but the size is 0 bytes.
DCIM/Pictures
Logcat logs shows only this error, nothing else.
exact Android version: 10 QKQ1.200114.002
10 QKQ1.200114.002
Hi, I'm using Android 10 and Xiaomi Note 8
using this snippet throws
Stream Closed
error:build.gradle:
AndroidManifest.xml:
Image downloading works, the image is stored in app's cache dir and it has full size on disk (not 0 bytes).
Image is being copied to
DCIM/Pictures
but the size is 0 bytes.Logcat logs shows only this error, nothing else.
exact Android version:
10 QKQ1.200114.002