On May 13, 11:49 am, Mark Murphy <[email protected]> wrote:
> Manfred Moser wrote:
> > My hunch is
> > that the android.jar implementation classes are pretty tightly coupled
> > to the underlying archticture and libraries (e.g. via jni to opencore,
> > opengl and so on and son) and it would be a pretty difficult task to
> > unbundle this all and make it run on the jvm rather then the android
> > stack with the dalvik vm.
>
> I'd substitute "utterly impossible" for "pretty difficult".

So I guess that my suspicions is pretty correct then..

> > Can somebody confirm it I am right or totally wrong? Is there a chance
> > that at least some stuff can be tested outside if I create a android
> > jar that contains the actual implementations by building android open
> > source or is this all going to end in a huge  misery for myself?
>
> If you have pure Java logic that you want to test outside of Android,
> put it in a separate JAR and test it using JUnit.
>
> If you have mostly-pure Java logic that you want to test outside of
> Android, write interfaces to isolate the Android-specific bits, and test
> it using JUnit and an Android-free mock of the interface.
>
> If you have code that is heavily dependent on Android, test it in the
> emulator. If the emulator is not running fast enough for you, get a
> faster PC, or perhaps load android-x86 on some box so you get out of the
> emulation environment. I have not tried the android-x86 strategy, but in
> principle it should be faster than the emulator (assuming the hardware
> you install it on is not crazy slow).

All that makes sense and is not a problem, but what if I would like to
write a bunch of tests that use org.apache.http and org.json classes
that would be supplied by android in the emulator. Could I run them
against stock apache and json jars (of which I would have to find the
corresponding version) outside of the android stack but then at
runtime just have them using the android ones.It boils down to "how
compatible are the packaged copies of source with upstream" in a
way..

manfred

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to