Re: [mono-android] namespace System.Drawing in Xamarin API

2012-03-21 Thread GigaNTes
Thank you. Could help one more :)
I'm trying to estimate such solution.
We have several .net products.
And we need to make porting of these apps to Android applications.
We're considering two ways.
First way - 1)we make porting from .net code to Java and 2) this already
ported application to Android app. 
Second way - 1) we make porting from .net to Xamarin Android API.
Question -what way will take less time and efforts?
It depends on how many classes we need to convert from .net standard API to
Xamarin classes.
For example Xamarin has System.Drawing namespace : Color, KnownColor,point,
PointF, Rectangle, RectangleF, Size, SizeF. These classes are similar to
.net classes (that are presented in our applications of course). Thus can I
directly use these classes ( from my existing code) in Android-Xamarin
application? Or I have to rewrite such classes too (like many other). 
 Generally - how many pacakages and classes I have to rewrite if I want to
run my "standard .net" application inside of Xamarin-Android environment?
How many changes should be done to make porting standard .net application to
Xamarin-Android application?
Thanks in advance

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/namespace-System-Drawing-in-Xamarin-API-tp5578365p5582292.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


Re: [mono-android] namespace System.Drawing in Xamarin API

2012-03-21 Thread Jonathan Pryor
On Mar 21, 2012, at 5:19 AM, GigaNTes wrote:
> I'm trying to estimate such solution.

I think there are too many factors for me to provide much help. :-)

> We're considering two ways.
> First way - 1)we make porting from .net code to Java and 2) this already 
> ported application to Android app. 
> Second way - 1) we make porting from .net to Xamarin Android API.
> Question -what way will take less time and efforts?

Do you have lots of Java developers, or are they largely C# developers? Will 
you continue maintaining your C# codebase? Do you have the resources to 
completely duplicate your codebase across languages and keep them both 
maintained?

I'm biased toward the "keep it in C#" solution. Without knowing more about your 
codebase, I have no idea if it would be more cost effective to completely 
rewrite in Java. Maybe it would be.

> It depends on how many classes we need to convert from .net standard API to 
> Xamarin classes.

Which classes are you using? Mono for Android provides most of the .NET 4.0 
Base Class Library (System, System.IO, System.Linq, System.Net, System.Xml, 
etc.), really lacking only WCF (only the Silverlight-WCF profile is provided), 
WPF, WWF, Linq-to-SQL, and EF. If you have strong dependencies on these, you 
will have problems porting. You might have similar problems if you try porting 
to Metro as well.

In any event, I don't see why it would be impossible to abstract away 
dependencies on e.g. WPF, and for any moderately sized codebase I would assume 
that this would still be cheaper than a port to Java.

> Generally - how many pacakages and classes I have to rewrite if I want to run 
> my "standard .net" application inside of Xamarin-Android environment?

There is no way to answer this without having more information about your code 
base. :-)

I would suggest trying to compile your code against the Mono for Android 
assemblies and see how far you can go.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Creating my own OpenGL bindings?

2012-03-21 Thread Rodrigo 'r2d2rigo' Diaz
I'm currently porting some MonoTouch code over to MonoDroid. It would be
nice if I could use Vertex Array Objects in Android (the target platform
supports the GL_OES_vertex_array_object extension) but there are no
available bindings. I have already made my own bindings in MonoTouch with
DllImport, with code like this:

[DllImport(MonoTouch.Constants.OpenGLESLibrary)]
static extern void glGetProgramInfoLog(uint program, int bufsize, ref
int length, StringBuilder infolog);

But there aren't any references to Mono.Constants or something alike
in MonoDroid. Is this possible?
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Creating my own OpenGL bindings?

2012-03-21 Thread Jonathan Pryor
On Mar 21, 2012, at 11:16 AM, Rodrigo 'r2d2rigo' Diaz wrote:
> But there aren't any references to Mono.Constants or something alike in 
> MonoDroid. Is this possible?

The constant isn't present, so you just need to use a different string. The 
/system/lib/libGLESv2.so file on my Xoom contains a glGetProgramInfoLog() 
export, so this might work:

[DllImport("/system/lib/libGLESv2.so")]
static extern void glGetProgramInfoLog(uint program, int bufsize, ref 
int length, StringBuilder infolog);

However, not all systems may have that library (e.g. it looks like it's in GLES 
v2.0 support, so platforms supporting only GLES v1.1 will fail); attempting to 
call glGetProgramInfoLog() on such a system will result in an exception 
(probably DllNotFoundException).

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Creating my own OpenGL bindings?

2012-03-21 Thread Andreia Gaita
Hi, 

On Wednesday, March 21, 2012 at 3:16 PM, Rodrigo 'r2d2rigo' Diaz wrote: 
> I'm currently porting some MonoTouch code over to MonoDroid. It would be nice 
> if I could use Vertex Array Objects in Android (the target platform supports 
> the GL_OES_vertex_array_object extension) but there are no available bindings.
> 

It looks like these methods aren't exposed publically in the GL bindings class. 
We'll add them there, but in the meantime you should be able to access them 
directly via DllImport
> I have already made my own bindings in MonoTouch with DllImport, with code 
> like this:
> 
> [DllImport(MonoTouch.Constants.OpenGLESLibrary)]
> static extern void glGetProgramInfoLog(uint program, int bufsize, ref int 
> length, StringBuilder infolog);
GetProgramInfoLog is available from the OpenTK.Graphics.ES10[11/20].GL class. 
Many other non-egl calls are available from that class as well (not all 
though). 
> But there aren't any references to Mono.Constants or something alike in 
> MonoDroid. Is this possible?
> 
> 
> 

Yes, it's just that the constant isn't declared. We'll add it, but in the 
meantime, you can use the library name directly, DllImport("libGLESv1_CM.dll") 
or  DllImport("libGLESv2.dll") (egl 1 or 2)



andreia gaita
---
blog.worldofcoding.com
github.com/andreiagaita


___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Creating my own OpenGL bindings?

2012-03-21 Thread Rodrigo 'r2d2rigo' Diaz
Awesome! The library is there (Kindle Fire), and the function is included!
I'm going to try the bindings now, thank you!


2012/3/21 Jonathan Pryor 

> On Mar 21, 2012, at 11:16 AM, Rodrigo 'r2d2rigo' Diaz wrote:
> > But there aren't any references to Mono.Constants or something alike in
> MonoDroid. Is this possible?
>
> The constant isn't present, so you just need to use a different string.
> The /system/lib/libGLESv2.so file on my Xoom contains a
> glGetProgramInfoLog() export, so this might work:
>
>[DllImport("/system/lib/libGLESv2.so")]
> static extern void glGetProgramInfoLog(uint program, int bufsize,
> ref int length, StringBuilder infolog);
>
> However, not all systems may have that library (e.g. it looks like it's in
> GLES v2.0 support, so platforms supporting only GLES v1.1 will fail);
> attempting to call glGetProgramInfoLog() on such a system will result in an
> exception (probably DllNotFoundException).
>
>  - Jon
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Creating my own OpenGL bindings?

2012-03-21 Thread Andreia Gaita
On Wednesday, March 21, 2012 at 3:54 PM, Rodrigo 'r2d2rigo' Diaz wrote:
> Awesome! The library is there (Kindle Fire), and the function is included! 
> I'm going to try the bindings now, thank you!
> 
If you're on the Kindle, be careful when using egl 2.0, a few egl calls seem to 
not be fully implemented there, for some odd reason.

andreia gaita
---
blog.worldofcoding.com (http://blog.worldofcoding.com)
github.com/andreiagaita (http://github.com/andreiagaita)



> 
> 2012/3/21 Jonathan Pryor mailto:j...@xamarin.com)>
> > On Mar 21, 2012, at 11:16 AM, Rodrigo 'r2d2rigo' Diaz wrote:
> > > But there aren't any references to Mono.Constants or something alike in 
> > > MonoDroid. Is this possible?
> > 
> > The constant isn't present, so you just need to use a different string. The 
> > /system/lib/libGLESv2.so file on my Xoom contains a glGetProgramInfoLog() 
> > export, so this might work:
> > 
> >[DllImport("/system/lib/libGLESv2.so")]
> >static extern void glGetProgramInfoLog(uint program, int bufsize, 
> > ref int length, StringBuilder infolog);
> > 
> > However, not all systems may have that library (e.g. it looks like it's in 
> > GLES v2.0 support, so platforms supporting only GLES v1.1 will fail); 
> > attempting to call glGetProgramInfoLog() on such a system will result in an 
> > exception (probably DllNotFoundException).
> > 
> >  - Jon
> > 
> > ___
> > Monodroid mailing list
> > Monodroid@lists.ximian.com (mailto:Monodroid@lists.ximian.com)
> > 
> > UNSUBSCRIBE INFORMATION:
> > http://lists.ximian.com/mailman/listinfo/monodroid
> 
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com (mailto:Monodroid@lists.ximian.com)
> 
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
> 
> 


___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Creating my own OpenGL bindings?

2012-03-21 Thread Rodrigo 'r2d2rigo' Diaz
Done, and it works like a charm! Luckily the implementation of
glGenVertexArrayOES/glBindVertexArrayOES is implemented in libGLESv2.so on
the Kindle.

@Andreia: yes, I know those functions are already in OpenTK. It was an old
binding from when it was broken in MonoTouch.

2012/3/21 Andreia Gaita 

>  On Wednesday, March 21, 2012 at 3:54 PM, Rodrigo 'r2d2rigo' Diaz wrote:
>
> Awesome! The library is there (Kindle Fire), and the function is included!
> I'm going to try the bindings now, thank you!
>
> If you're on the Kindle, be careful when using egl 2.0, a few egl calls
> seem to not be fully implemented there, for some odd reason.
>
> andreia gaita
> ---
> blog.worldofcoding.com
> github.com/andreiagaita
>
>
> 2012/3/21 Jonathan Pryor 
>
> On Mar 21, 2012, at 11:16 AM, Rodrigo 'r2d2rigo' Diaz wrote:
> > But there aren't any references to Mono.Constants or something alike in
> MonoDroid. Is this possible?
>
> The constant isn't present, so you just need to use a different string.
> The /system/lib/libGLESv2.so file on my Xoom contains a
> glGetProgramInfoLog() export, so this might work:
>
>[DllImport("/system/lib/libGLESv2.so")]
> static extern void glGetProgramInfoLog(uint program, int bufsize,
> ref int length, StringBuilder infolog);
>
> However, not all systems may have that library (e.g. it looks like it's in
> GLES v2.0 support, so platforms supporting only GLES v1.1 will fail);
> attempting to call glGetProgramInfoLog() on such a system will result in an
> exception (probably DllNotFoundException).
>
>  - Jon
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] So you want to know about binding via JNI?

2012-03-21 Thread Jonathan Pryor
Behold! One of the larger brain-dumps on the documentation site!

http://docs.xamarin.com/android/tutorials/Binding_Android_Types

Guaranteed to put you to sleep!

On a more serious note, if you want an overview of how Mono for Android 
bindings work, and why you really really want an automated binding tool ( ;-), 
the above tutorial is for you.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] So you want to know about binding via JNI?

2012-03-21 Thread Tomasz Cielecki
Mother of JNI! This is great news, thanks a bunch!
On Mar 21, 2012 5:37 PM, "Jonathan Pryor"  wrote:

> Behold! One of the larger brain-dumps on the documentation site!
>
>http://docs.xamarin.com/android/tutorials/Binding_Android_Types
>
> Guaranteed to put you to sleep!
>
> On a more serious note, if you want an overview of how Mono for Android
> bindings work, and why you really really want an automated binding tool (
> ;-), the above tutorial is for you.
>
>  - Jon
>
> ___
> Monodroid mailing list
> Monodroid@lists.ximian.com
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Testing for a network connection

2012-03-21 Thread Paul Johnson

Hi,

I'm trying to resolve an issue with an app I'm porting from iPhone to 
Android and I'm going through everything bit by bit.


The problem is that whenever the app attempts to the outside world, it 
falls over dead. Works fine on the emulator, dies on a phone. One thing 
I'm looking at is the way I'm connecting to the outside world.


The manifest has INTERNET enabled, so it's not likely to be that.

Next is the test for the outside world connection...

public bool checkForNetwork(bool mobile)
{
ConnectivityManager connectivityManager = 
(ConnectivityManager)Android.App.Application.Context.GetSystemService(Android.Content.Context.ConnectivityService);

NetworkInfo networkInfo =
connectivityManager.GetNetworkInfo(mobile ? 
Android.Net.ConnectivityType.Mobile :


Android.Net.ConnectivityType.Wifi);
if (networkInfo.IsConnected || 
networkInfo.IsConnectedOrConnecting)

return true;
else
return false;
}

I then test for "true" being returned. mobile tests for wifi being 
either mobile or wifi. I know there is a connecting one as well - could 
this be the problem?


Any advice would be appreciated.

Paul
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] profiling support in monodroid?

2012-03-21 Thread mcleodia
Hi Jon/Rodrigo

Good news...  I am hopefully going to be able to give you some form of a
standalone repro.

I remembered that we have a "software" media renderer, which is essentially
a simulator app that can be run on a computer.

So I set up an isolated test network today, consisting of a Mac connected to
an Airport Extreme and I fired up several instances of our software renderer
on the Mac.  
I then fired up a test mono app on the mac which basically consisted of a
while loop that started and stopped our network stack repeatedly.  
Bang!  A near instant sgen crash with 2.10.8...  
So next I tried it with 2.10.9.  Sadly it did not crash even though I left
it running for quite a while.

So I went back and double checked, and found that I must just have been
unlucky before with 2.10.9 and in fact it takes quite a while to make it
crash on our main network (which has an awful lot of devices coming and
going all the time).  However eventually I did get another sgen crash with
2.10.9 back on the main network and will attach this to the bug report when
I file it (I can't get to it right now as it's sitting on my mac and that's
running on the isolated network). 
 
The native stacktrace starts with the following frames if it helps any:

0 mono-sgen  0x000a24bf mono_handle_native_sigsegv +287
1 mono-sgen  0x4fb3 mono_sigsegv_signal_handler +334
2 libsystem_c.dylib 0x9284459b _sigtramp +43
...

So, having ascertained that I was merely unlucky first time around with
2.10.9, I was able to go away and profile on the mac with heapshot and I
managed to iron out the memory leak within our stack on the Mac, which is at
least something constructive for my day...

So next I put my Xoom tablet onto the test network, to see if:

a) I could still reproduce a memory leak on monodroid having now fixed a
leak on the mac
b) I could try to get you an sgen crash on droid.

And the result of doing so was that: 

a) My app is still leaking like a sieve on android :(
b) I got what looks like a hang right in the middle of a GC on droid - it
did not finish doing a major collection, as per the following logcat output:

--
I/mono-gc (25026): Start major collection 17
I/mono-gc (25026): Scanning pinned roots (47360 bytes, 322/7 entries)
I/mono-gc (25026): Finding pinned pointers: 966 in 2081 usecs
I/mono-gc (25026): Root scan: 2 usecs
I/mono-gc (25026): old generation done
I/mono-gc (25026): Finalize queue handling scan for old generation: 5144
usecs 2 ephemeron roundss
D/dalvikvm(21277): GC_EXPLICIT freed 32K, 30% free 14428K/20487K, paused
6ms+2ms
D/dalvikvm(21277): GC_EXPLICIT freed 1K, 30% free 14427K/20487K, paused
2ms+2ms
---

The app threads were never restarted again and an ANR was the result.  This
was MFA v4.0.5 by the way.

So the state of play is that I should be able to put together a standalone
repro that demonstrates:
a) A leak on droid but not on mac
b) An sgen hang on MFA v4.0.5 (it took a while for this to happen, mind...)
c) An sgen crash on the mac running mono 2.10.8 (near instantly).

The only thing I have not managed to replicate today is an sgen crash on the
mac 2.10.9 on the test network with just the software renderers running.
I am going home now but will leave 2.10.9 running overnight on the test
network and hopefully it too will eventually crash  - and hopefully the
crash will be in sgen and not in my code ;)

Tomorrow I will try and put together a runnable copy of all this stuff and
knock together some instructions that will help you to get it working.  I'll
get it across to you as soon as it's in a usable state.

Cheers
Iain

p.s. I believe I had set my DYLD_LIBRARY_PATH correctly, and then when I
examined the exports from libMonoPosixHelper.dylib, I found that the library
was exporting GetNLSocket() instead of CreateNLSocket(), which suggests that
support/nl.c was being built without HAVE_LINUX_NETLINK_H and
HAVE_LINUX_RTNETLINK_H #defined.  Perhaps someone updated that file and
renamed GetNLSocket() to CreateNLSocket() but forgot to rename the function
in the #else branch?  (Just a guess...)


--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/profiling-support-in-monodroid-tp5564284p5583749.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


[mono-android] Sample project Tutorials

2012-03-21 Thread closdesign
Does Xamarin have tutorials on some of the examples they provide for
MonoDroid?  Specifically something like the Contacts or Honeycomb Gallery?  

Right now we are kind of stumbling through the code.  If there were some
good tutorials or video tutorials, that would be great on how these C#
classes tie together, what does what, etc.  

Thanks

--
View this message in context: 
http://mono-for-android.1047100.n5.nabble.com/Sample-project-Tutorials-tp5583501p5583501.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


[mono-android] Equivalent of wget?

2012-03-21 Thread Paul Johnson

Hi,

I'm trying to grab files from a server using this code but it dies.

Any ideas why?

public void grabAFile(string url, Context c)
{
WebClient webClient = new WebClient();

webClient.DownloadFileCompleted += delegate(object s, 
AsyncCompletedEventArgs e) { Completed(s, e, c); };
webClient.DownloadFileAsync(new System.Uri(url), 
Android.OS.Environment.ExternalStorageDirectory + "/OQHRA");

}

private void Completed(object sender, AsyncCompletedEventArgs 
e, Context c)

{
Toast.MakeText(c, "Download completed. Saved to your SD 
Card", ToastLength.Long).Show();

}

Save to external is set in the manifest.

Thanks

Paul
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Equivalent of wget?

2012-03-21 Thread Gonzalo Paniagua Javier
On Wed, Mar 21, 2012 at 2:44 PM, Paul Johnson
 wrote:
> Hi,
>
> I'm trying to grab files from a server using this code but it dies.
>
> Any ideas why?

If you check the properties of 'e' you will certainly find out why.

-Gonzalo
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Sample project Tutorials

2012-03-21 Thread Jonathan Pryor
On Mar 21, 2012, at 12:47 PM, closdesign wrote:
> Does Xamarin have tutorials on some of the examples they provide for
> MonoDroid?  Specifically something like the Contacts or Honeycomb Gallery?  

We have a variety of tutorials at:

http://docs.xamarin.com/android/tutorials

As for the Contacts API, I would strongly suggest that you use the 
Xamarin.Mobile wrapper; it's far saner:

http://xamarin.com/mobileapi
http://blog.xamarin.com/2012/02/15/introducing-xamarin-contacts/
http://betaapi.xamarin.com/?link=root:/Xamarin.Mobile

Our documentation team is also in the process of writing documentation for 
resource handling, fragments, and more.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Testing for a network connection

2012-03-21 Thread Jonathan Pryor
On Mar 21, 2012, at 2:35 PM, Paul Johnson wrote:
> The problem is that whenever the app attempts to the outside world, it falls 
> over dead.

Can you elaborate? Does the Android Debug Log contain anything useful? Stack 
traces? Anything?

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Testing for a network connection

2012-03-21 Thread Paul Johnson

Hi,


The problem is that whenever the app attempts to the outside world, it falls 
over dead.


Can you elaborate? Does the Android Debug Log contain anything useful? Stack 
traces? Anything?


Where would I look on the phone for that? The emulator runs fine - it's 
on a real device it coughs, splutters and keels over


Paul

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Testing for a network connection

2012-03-21 Thread Jonathan Pryor
On Mar 21, 2012, at 3:33 PM, Paul Johnson wrote:
>>> The problem is that whenever the app attempts to the outside world, it 
>>> falls over dead.
>> 
>> Can you elaborate? Does the Android Debug Log contain anything useful? Stack 
>> traces? Anything?
> 
> Where would I look on the phone for that? The emulator runs fine - it's on a 
> real device it coughs, splutters and keels over

It still has the Android Debug Log:

http://docs.xamarin.com/android/advanced_topics/android_debug_log

Please provide any relevant output.

 - Jon

___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Testing for a network connection

2012-03-21 Thread Paul Johnson

Hi,


Where would I look on the phone for that? The emulator runs fine - it's on a 
real device it coughs, splutters and keels over


It still has the Android Debug Log:

http://docs.xamarin.com/android/advanced_topics/android_debug_log

Please provide any relevant output.


The emulator in either release or debug is showing nothing untoward 
other than SQLite going a bit odd...


http://pastebin.com/SKJ6xSKG

Paul
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


[mono-android] Writing to the external SD card

2012-03-21 Thread Paul Johnson

Hi,

I have some very simple code for writing to the SDCard (pruned from 
postings on here and other places). Only problem is that it throws an 
exception when writing the directory.


On closer examination, external contains nothing. Is this what it should 
contain and if it isn't, does anyone have an example of how to set up a 
directory on the SDCard I could have a look-see at?


var external = GetExternalFilesDir(null);
if (!File.Exists(external + "\\myDir"))
{
   System.IO.Directory.CreateDirectory(external + "\\myDir");
}

Thanks

Paul
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid


Re: [mono-android] Writing to the external SD card

2012-03-21 Thread Jonathan Pobst
Not sure if it's your issue, but use Path.Combine instead of manually 
creating paths.  Android is Linux based, so it uses forward slashes 
instead of backwards slashes.


Jonathan

On 3/21/2012 7:19 PM, Paul Johnson wrote:

Hi,

I have some very simple code for writing to the SDCard (pruned from
postings on here and other places). Only problem is that it throws an
exception when writing the directory.

On closer examination, external contains nothing. Is this what it should
contain and if it isn't, does anyone have an example of how to set up a
directory on the SDCard I could have a look-see at?

var external = GetExternalFilesDir(null);
if (!File.Exists(external + "\\myDir"))
{
System.IO.Directory.CreateDirectory(external + "\\myDir");
}

Thanks

Paul
___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid




___
Monodroid mailing list
Monodroid@lists.ximian.com

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid