We have a code like that: private void InitOurFile() { try { Java.IO.File sd = Android.OS.Environment.ExternalStorageDirectory; if (sd != null) {
Java.IO.File folderOur = new Java.IO.File(sd, "ourfolder"); if (folderOur.Exists() || folderOur.Mkdir()) { Java.IO.File fileOur = new Java.IO.File(folderOur, "ourfile.dat"); if (fileOur.CreateNewFile()) { //CRASHES SOMEWHERE HERE using (Stream stmIn = this.Resources.OpenRawResource(Resource.Raw.OurFile)) { using (Stream stmOut = System.IO.File.OpenWrite(fileOur.AbsolutePath)) { CopyStream(stmIn, stmOut); } } } } } } catch (Exception _exc) { //... } } private static void CopyStream(Stream _stmIn, Stream _stmOut) { byte[] arrBuf = new byte[4096]; int read = 0; do { read = _stmIn.Read(arrBuf, 0, arrBuf.Length); if (read > 0) _stmOut.Write(arrBuf, 0, read); } while (read > 0); } It works fine on any device, except Samsung Galaxy Tab with Android 2.1. The raw-resource is *not* compressed. What can it be? Can it be caused by this issue: *Warning: Samsung shipped a broken kernel with Android 2.1, which is not able to support JIT compilation. If you possess a Galaxy-class device with Android 2.1...* -- View this message in context: http://mono-for-android.1047100.n5.nabble.com/Samsung-Galaxy-tp5524694p5524694.html Sent from the Mono for Android mailing list archive at Nabble.com. _______________________________________________ Monodroid mailing list Monodroid@lists.ximian.com UNSUBSCRIBE INFORMATION: http://lists.ximian.com/mailman/listinfo/monodroid