I'm a long term user of opennetcf code too, so happy to try to give
something back :)

All my code currently is built around mvvm and we use IoC throughout
(actually it's OpenNetCf-based!)

Our android location manager is
https://github.com/slodge/MvvmCross/blob/master/Cirrious/Cirrious.MvvmCross/Android/Platform/Location/MvxAndroidGeoLocationWatcher.cs


In the main app that I've used this, the location manager itself is wrapped
behind another singleton object to prevent multiple instances getting
created and accessed - but I'm afraid I can't share the code for that
project

Stuart

On 30 March 2012 15:57, Jonathan Pryor <[email protected]> wrote:

> On Mar 29, 2012, at 10:57 AM, Chris Tacke wrote:
> > Then I said, “hey, I’d like to get location change notifications”, so I
> implemented ILocationListener in my Presenter.  Bear in mind it derives
> from no other classes.  First, it made me implement a Handle property.
>  That can’t be good
>
> It's not good. Never ever never ever never ever ... implement IJavaObject
> yourself. Just don't.
>
> Inherit from Java.Lang.Object to implement IJavaObject:
>
>        http://androidapi.xamarin.com/?link=T:Android.Runtime.IJavaObject
>
> http://docs.xamarin.com/android/advanced_topics/architecture/android_callable_wrappers#Implementing_Interfaces
>
> As for the "everything needs a Context" problem, there _may_ be a
> solution: the Android.App.Application.Context property:
>
>
> http://androidapi.xamarin.com/?link=P%3aAndroid.App.Application.Context
>
> The Application.Context property is a static property which returns the
> Application context (i.e. Context.ApplicationContext). This isn't
> appropriate for everything (e.g. many things require an Activity context),
> but for things like system services it should work. You might try using it.
>
>  - Jon
>
> _______________________________________________
> Monodroid mailing list
> [email protected]
>
> UNSUBSCRIBE INFORMATION:
> http://lists.ximian.com/mailman/listinfo/monodroid
>
>
_______________________________________________
Monodroid mailing list
[email protected]

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

Reply via email to