[mono-android] Passing state from Java activity to monodroid

2012-01-03 Thread consultutah
What's the easiest way to pass a string from a Java Activity that doesn't return to C#? I am using a java activity in my MonoDroid app: var spec = tabHost.NewTabSpec("Spec"); Intent intent = new Intent(this, Java.Lang.Class.ForName("com.whatever.CoolActivity")); spec.SetContent(intent); tabHost.

Re: [mono-android] NotImplemenedException in ObservableCollection

2012-01-03 Thread Jonathan Pryor
On Dec 29, 2011, at 9:44 PM, grauenwolf wrote: > Really I've got two complaints. The first is a simple, "why is > ObservableCollection(IEnumerable) not implemented?" Good question. I have no good answer; it wasn't implemented until Nov 24 2011: https://github.com/mono/mono/commit/a04edc

Re: [mono-android] TypeLoadException for custom type when using shared runtime

2012-01-03 Thread Jonathan Pryor
On Dec 28, 2011, at 1:48 AM, aChrisSmith wrote: > I have two Android devices, a Nexus S (2.3.6) and a Galaxy Nexus (4.0.2). > I've been able to build, test, debug, and have fun using MonoDroid targeting > my Nexus S. However, when I launch my application on the Galaxy Nexus things > crap out. > >

Re: [mono-android] Thread Exceptions Without Stacktrace

2012-01-03 Thread Jonathan Pryor
On Jan 3, 2012, at 5:35 PM, chris@Terrago wrote: > Jonathan, I would like to get you this code ASAP. Where should I send it? > Shall I attempt to zip and email it or do you have an upload site I can use? Please file at bugzilla.xamarin.com, and include instructions on what is needed to trigger th

Re: [mono-android] Thread Exceptions Without Stacktrace

2012-01-03 Thread chris@Terrago
Happy new year everyone! I believe I have a sample app that demonstrates this problem. I isolated the sections of code that caused the problem for me into a smaller demo app that produces the same type of exception immediately after the mono GC runs on the thread. 01-03 16:35:24.570 F/( 46

Re: [mono-android] Java exception error with DatePicker - any advice?

2012-01-03 Thread Jonathan Pryor
On Dec 29, 2011, at 12:18 PM, Paul F. Johnson wrote: > I've implemented a DateTimeListener event which compiles fine, but dies when > the emulator comes to run the code with the following error: Unhandled > Exception ... > with the call in the code looking like this > > DateTime today = DateTime

Re: [mono-android] IsolatedStorage or OpenFileOutput?

2012-01-03 Thread Benjamin Baldacci
Maybe, I didn't try to uninstall the app on the emulator. -- Benjamin Baldacci linkedin Mobile : +33 6 32 45 63 79 On Tue, Jan 3, 2012 at 20:23, Jonathan Pryor wrote: > On Jan 3, 2012, at 3:44 AM, Benjamin Baldacci wrote: > > But an exception occur

Re: [mono-android] Setting the tab while the application is running

2012-01-03 Thread Jonathan Pryor
On Jan 3, 2012, at 4:35 PM, Paul F. Johnson wrote: > I have a particular need for this behaviour. > > What I want to do is when a calculation is complete for the current tab > to change to another tab. I've had a look at TabHost but can't seem to > get that to change the tab. Set the TabHost.Curr

[mono-android] Setting the tab while the application is running

2012-01-03 Thread Paul F. Johnson
Hi, I have a particular need for this behaviour. What I want to do is when a calculation is complete for the current tab to change to another tab. I've had a look at TabHost but can't seem to get that to change the tab. How is this done? Thanks Paul -- Vertraue mir, ich weiss, was ich mache..

Re: [mono-android] How to use Mono.Cairo

2012-01-03 Thread Jonathan Pryor
On Dec 30, 2011, at 7:38 AM, Pritish wrote: > I am trying to using the Mano.Cairo class library in my mono android > application but while loading it gives an error Unfortunately, you don't. Mono.Cairo was included by mistake, and should not be present in Mono for Android. It has a native de

Re: [mono-android] Moonlight on Android

2012-01-03 Thread Joseph Hill
Hello Gabe Unfortunately, Jeff's blog doesn't include the full context of the presentation where those demos were originally shown. You can view the presentation those demos were developed for here: http://channel9.msdn.com/events/MIX/MIX11/EXT03 The MIX 2011 demos were very much a "What is actual

Re: [mono-android] Handling Config Changes

2012-01-03 Thread Jonathan Pryor
On Dec 30, 2011, at 8:45 AM, was wrote: > I want to restart an activity when the user changes the screen orientation. That is the default behavior, unless you set ActivityAttribute.ConfigurationChanges: [Activity(ConfigurationChanges=ConfigChanges.Orientation)] public class Manua

Re: [mono-android] Help with Activity.Finish

2012-01-03 Thread Jonathan Pryor
On Dec 30, 2011, at 12:41 AM, NebulaSleuth wrote: > I have an Activity that starts a second activity using > StartActivityForResult(). > > The second activity starts fine, and then spawns a thread to do some work. This seems like a very strange design. Activities are for the user, e.g. if you w

Re: [mono-android] IsolatedStorage or OpenFileOutput?

2012-01-03 Thread Jonathan Pryor
On Jan 3, 2012, at 3:44 AM, Benjamin Baldacci wrote: > But an exception occured: "System.UnauthorizedAccessException: Access to the > path "/data/data//files/.config" is denied." _Normally_ this is caused by the combination of fast deployment and running on an emulator. This doesn't happen

Re: [mono-android] Why do I NOT need RunOnUIThread?

2012-01-03 Thread Jonathan Pryor
On Jan 3, 2012, at 1:52 PM, Wally McClure wrote: > I've been working on this simple use of the Progress Dialog. I have > everything working, and then it hit me that I am not using RunOnUIThread. In your code, you're using ProgressDialog in two places: the button.Click event registration, and in

[mono-android] Why do I NOT need RunOnUIThread?

2012-01-03 Thread Wally McClure
I've been working on this simple use of the Progress Dialog. I have everything working, and then it hit me that I am not using RunOnUIThread. My code is below. I put in RunOnUIThread in several places and it still works as I would think it would. Is there something magical about the Progres

Re: [mono-android] Mono_UnhandledException in emulator

2012-01-03 Thread Jonathan Pryor
On Jan 3, 2012, at 5:17 AM, Steven Pack wrote: > Now... How do I actually clean up? If I deterministically call GC.Collect(), > the GREF count is stable. If I don't, it just grows and grows (on the > emulator only). No, it grows and grows everywhere, devices just have a higher limit of around 5

Re: [mono-android] problems with streamreader or xdocument?

2012-01-03 Thread Wally McClure
Jon, thanks. I think the problem is on the other end where I load the data from. I'm still investigating on my end. Wally > From: j...@xamarin.com > Date: Mon, 2 Jan 2012 22:28:26 -0500 > To: monodroid@lists.ximian.com > Subject: Re: [mono-android] problems with streamreader or xdocument? >

Re: [mono-android] IsolatedStorage or OpenFileOutput?

2012-01-03 Thread Benjamin Baldacci
Jonathan Pryor andswered me on the IRC chan. For people who encouter the same problem: - Open the Windows cmd. - Locate the file adb (on the plateform-tools for me so C:\Program Files (x86)\Android\android-sdk\platform-tools) - Go to this folder. - Type the command: adb shell ls -l /data/data/@pa

Re: [mono-android] Java reflection with Mono for Android...

2012-01-03 Thread Jonathan Pryor
On Jan 3, 2012, at 9:33 AM, Droider wrote: > Is there any way that this can be achieved using Mono for Android? and if so > how? You can use Android.Runtime.JNIEnv to perform runtime type querying operations. http://docs.xamarin.com/android/advanced_topics/api_design#Java_Native_Interfa

[mono-android] Java reflection with Mono for Android...

2012-01-03 Thread Droider
Hello, I am developing an application that connects via Bluetooth using the SPP protocol. This works on most devices but some has a faulty implementation of SDP witch is used to detect supported protocols. There are workarounds for this posted on the Android issue tracker ( http://code.google.co

Re: [mono-android] Mono_UnhandledException in emulator

2012-01-03 Thread Steven Pack
Version is 2.2. Ah, right you are. W/dalvikvm( 1461): Memory held directly by tracked refs is 92024 bytes E/dalvikvm( 1461): Excessive JNI global references (2001) E/dalvikvm( 1461): VM aborting I/mono( 1461): Stacktrace: Now... How do I actually clean up? If I deterministically call GC.Co

[mono-android] IsolatedStorage or OpenFileOutput?

2012-01-03 Thread Benjamin Baldacci
Hi everyone, I would like to access to the file system (only to store small things like using IsolatedStorage on WP7). If I well understand, to create a file I have to do this: IsolatedStorageFile file = IsolatedStorageFile. GetUserStoreForAssembly(); file.CreateFile(filename); But an exception