[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-23 Thread Jeff
You can See my solution at http://code.google.com/p/androidonthespot/ I didn't make any source archives so if you want to see the source, its in the repository. On Apr 22, 3:12 am, tu <[EMAIL PROTECTED]> wrote: > See tips in >http://blog.luminis.nl/luminis/entry/osgi_on_google_android_us

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-22 Thread tu
See tips in http://blog.luminis.nl/luminis/entry/osgi_on_google_android_using I got the idea from this blog. 在08-4-22,Macro <[EMAIL PROTECTED]> 写道: > > > There are none code at SVN? > I want to reference how to use DexFile correctly... > > > > On 4月21日, 下午6时31分, tu <[EMAIL PROTECTED]>

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-21 Thread Macro
There are none code at SVN? I want to reference how to use DexFile correctly... On 4月21日, 下午6时31分, tu <[EMAIL PROTECTED]> wrote: > I have a solution based on android.dalvik.DexFile. see my > projecthttp://code.google.com/p/rcpandroid/ > > 2008/4/21, frankl <[EMAIL PROTECTED]>: > > > > > > > Hi

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-21 Thread tu
I have a solution based on android.dalvik.DexFile. see my project http://code.google.com/p/rcpandroid/ 2008/4/21, frankl <[EMAIL PROTECTED]>: > > > Hi chris.p, > > Have you resolved the issue of classloader.getResource? I met the same > problem. Please let me know if any updates. that will be high

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-21 Thread frankl
Hi chris.p, Have you resolved the issue of classloader.getResource? I met the same problem. Please let me know if any updates. that will be highly appreciated. Thanks Frank On Apr 13, 10:23 pm, "chris.p" <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I've already managed to load a single clas

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-13 Thread Macro
Thanks, I can get Class with the code now, but there is another problem while execute Class.newInstance(); For example, I load a class named: project.plugin.PluginClass, the class implements a interface named project.plugininterfaces.PluginInterface. Then, I use PluginInterface to hold the objec

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-13 Thread chris.p
Hello everyone, I've already managed to load a single class from anothers application context: --- code --- Context foreignContext = context.createPackageContext(packageName, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY); Class c = foreignContext.getClassLoader().loadClass(quali

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-10 Thread hackbod
If you want to load a package already installed in the system, it is much easier to use Context.createApplicationContext(). On Apr 10, 2:05 am, "Carl H." <[EMAIL PROTECTED]> wrote: > Hi, > > You can use Dex file to load a class dynamically: > >                 DexFile df = new DexFile(new File(ap

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-10 Thread Ben Dodson
Hi, I and a few others have gotten this working successfully. Check this thread for details: http://groups.google.com/group/android-developers/browse_thread/thread/fe0978b471d4bef4/72507bfb7586aded?hl=en&lnk=gst&q=installer#72507bfb7586aded Ben On Apr 10, 5:28 am, "David Welton" <[EMAIL PROTEC

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-10 Thread David Welton
> I believe there are lots of limits with script in android, such as > OpenGL. > And Hecl is a language for J2ME but not Android, I'm afrade it doesn't > compatible? An Android port of Hecl is going to be my entry into the ADC, actually. The code is all in Hecl's subversion, and of course op

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-10 Thread Carl H.
Hi, You can use Dex file to load a class dynamically: DexFile df = new DexFile(new File(appDir)); ClassLoader cl = getClassLoader(); Class clazz = df.loadClass(dynClass, cl); appDir can be found using PackageManager if you wish so (eg: /data/app/

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-10 Thread Macro
I believe there are lots of limits with script in android, such as OpenGL. And Hecl is a language for J2ME but not Android, I'm afrade it doesn't compatible? Suddenly, I found C/C++ are so powerful... On 4月10日, 下午3时36分, "David Welton" <[EMAIL PROTECTED]> wrote: > > I want to develop an applicat

[android-developers] Re: Load a class from another .apk file dynamic?

2008-04-10 Thread David Welton
> I want to develop an application, it was form by plugins. > Then I need to load a class from plugin. > Use Class.forName() to load a class from the same apk file, it's > successful, but if the class is in another apk file, the method throw > ClassNotFoundException. > How to load the class