Hi,

I'm trying to achieve the following:

- class A (in application A) derives from class B.
- application A loads a dex dynamically (using DexClassLoader).
- application A wants to have the *definition* of class B to come from
this newly loaded dex.

Something similar does happen for the Google Maps API (and for the
inbuilt APIs) - however, the dex implementing these are picked up from
under /system and pre-loaded before any classes of the current
application.

I want to achieve something similar - however, the OS doesn't seem to
provide a mechanism to pre-load arbitrary dex files in a way that any
newly required classes (e.g. when class A is instantiated, a
definition of class B would be required) are resolved against those in
the loaded dex.

Could someone please let me know if it's possible to achieve what I
want to?

If not, would it be possible to inject new methods in the definition
of an existing class? It seems like some Java reflection related
methods are not implemented on Android (e.g.
ClassLoader.resolveClass() or the "resolve" argument to
ClassLoader.loadClass()).

Thanks,
Ashutosh

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

Reply via email to