Getting your head wrapped around Android can be hard. I know it took me a long to really grok the pieces. I'm still not sure I understand all of it still. We should all be glad that we have Jon and Jonathan to help us. :-) Wally
> From: cta...@opennetcf.com > To: monodroid@lists.ximian.com > Date: Mon, 2 Apr 2012 10:11:44 -0400 > Subject: Re: [mono-android] Services, Activities, Contexts and separation of > concerns > > Jon, > > Thanks again for the detailed info. It certainly helps me understand things. > > Stubbing out the ILocationListener for non-Android platforms is simple (and > par for the course when we're doing cross-platform work). Stubbing out an > interface is less involved than creating actual implementation classes is all > - we've got processes we use for both scenarios, it's just that simple > interface additions are a lot simpler. > > > ----------------- > Chris Tacke > President > OpenNETCF Consulting, LLC > > > > > > > -----Original Message----- > > From: monodroid-boun...@lists.ximian.com [mailto:monodroid- > > boun...@lists.ximian.com] On Behalf Of Jonathan Pryor > > Sent: Saturday, March 31, 2012 7:21 PM > > To: Discussions related to Mono for Android > > Subject: Re: [mono-android] Services, Activities, Contexts and > > separation of concerns > > > > On Mar 30, 2012, at 11:27 AM, Chris Tacke wrote: > > > The problem is in my semantics. I tend to call classes that I have > > back in the model that provide specific functionality "Services" (and > > the get added into my IoC framework's Services collection). It's not a > > Proper Android Service. It's actually just a plain old class that I > > inherited ILocationListener with. Turned out it needed to also be a > > Java.Lang.Object inheritor (this is what was killing me this time) - > > this gives me some heartburn as now that service code is not cross- > > platform compatible. > > > > This confuses me a bit. ILocationListener isn't cross-platform > > compatible either, so why would the addition of Java.Lang.Object > > suddenly kill things? identical cross-platform code was dead as soon as > > you pulled in ILocationListener. > > > > If you want cross-platform code, you'll need to create your own > > interface abstraction for your core assemblies (or use > > Xamarin.Mobile?), then implement your abstraction in an Android- > > specific codebase along with ILocationListener+Java.Lang.Object/etc. Or > > use #if to skip ILocationListener/Java.Lang.Object/etc. so it's > > included only on Android builds. > > > > - 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