public void SaveAsPrivateFile(Context ctx, byte[] data, string filename)
 {
     try
     {
         var fos = ctx.OpenFileOutput(filename, FileCreationMode.WorldWriteable);
         fos.Write(data, 0, data.Length);
         fos.Close();
     }
     catch (Java.IO.IOException ex)
     {
         throw new System.Exception(ex.Message);
     }
 }
Exemple #2
0
 public void SaveCityList(Context context)
 {
     var json = JsonConvert.SerializeObject(CityList);
     using (var stream = new StreamWriter(context.OpenFileOutput("city.json", FileCreationMode.Private)))
         stream.Write(json);
 }