On Sep 15, 2011, at 3:44 AM, Maik wrote:
> I would be interessted in a quick fix for this. Could you please post a
> sample Java file?
You can see the GoogleMaps sample, which has a .java file included in the build:
https://github.com/xamarin/monodroid-samples/tree/master/GoogleMaps
> Can I write my javascript interface code in the appropriate .net class as it
> has to interact with other stuff within my app. So for my understanding, all
> we need here is a java type for it?
You need a java type, with the appropriate java methods, and the implementation
of the java method will need to "call into" managed code.
Unfortunately the mechanism to call into managed code is fairly limited at the
moment: you're restricted to the Android Callable Wrappers:
http://android.xamarin.com/Documentation/Architecture/Android_Callable_Wrappers
Furthermore, Android Callable Wrappers only declare constructors, overridden
methods, and interface methods, so this places a constraint on the methods that
your custom Java code can invoke.
To see what the Android Callable Wrappers look like, view the e.g.
obj\Debug\android\src directory after a package operation (.apk is created).
- Jon
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid