I want to save my logs to a folder which I can access with windows explorer. For example I want to create my log in the following path
This PC\\Galaxy A5 (2017)\\Pho
You are looking for the root of GetExternalFilesDir
, just pass a null:
var externalAppPathNoSec = GetExternalFilesDir(string.Empty).Path;
Note: This is a Context
-based instance method, you can access it via the Android application context, an Activity, etc... (see the link below to the Android Context docs)
Shared storage may not always be available, since removable media can be ejected by the user. Media state can be checked using Environment.getExternalStorageState(File).
There is no security enforced with these files. For example, any application holding Manifest.permission.WRITE_EXTERNAL_STORAGE can write to these files.
re: https://developer.android.com/reference/android/content/Context#getExternalFilesDir(java.lang.String)