Fix geth logs on Android 10
From now on geth logs are stored at `/storage/emulated/0/Android/data/im.status.ethereum.debug/files/Download/geth.log` because app cant write to `sdcard/Download/geth.log`
This commit is contained in:
parent
cb78293db7
commit
89535ea8fc
|
@ -159,7 +159,10 @@ class StatusModule extends ReactContextBaseJavaModule implements LifecycleEventL
|
|||
}
|
||||
|
||||
private File getLogsFile() {
|
||||
final File pubDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);
|
||||
final Context context = this.getReactApplicationContext();
|
||||
// Environment.getExternalStoragePublicDirectory doesn't work as expected on Android Q
|
||||
// https://developer.android.com/reference/android/os/Environment#getExternalStoragePublicDirectory(java.lang.String)
|
||||
final File pubDirectory = context.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);
|
||||
final File logFile = new File(pubDirectory, gethLogFileName);
|
||||
|
||||
return logFile;
|
||||
|
|
Loading…
Reference in New Issue