I wrote a test Android app in Xamarin, where sample data was stored in a file. Somehow I copied test data file to emulator, successfully run the app and forgot about the project for couple of months.
Now I am resuscitating the project and – I can’t find the file in Android Device Manager although it is still accessible in the emulator. It drives me nuts, I need to edit it!
Perhaps someone can point me to the right way to locate the file. Thanks!
Following is the code fragment that reads the file. I added debug output in the comments after each relevant line
var fileName = "NursePurse.jobjson1.txt"; var assembly = typeof(pageJobs).GetTypeInfo().Assembly; //assembly.base.CodeBase = "file:///storage/emulated/0/Android/data/NursePurse.Droid/files/.__override__/NursePurse.dll" String fname = assembly.FullName; //fname = NursePurse, Version=1.0.6504.22050, Culture=neutral, PublicKeyToken=null Stream stream = assembly.GetManifestResourceStream(fileName); List<String> t = assembly.GetManifestResourceNames().ToList(); // there are two entries // "NursePurse.AppResources.resources","NursePurse.jobjson1.txt" // here is my file! But I don't see neither of these files in the android device manager.
Question – where is it?