[android-developers] Re: Loading DEX files at runtime from SDCARD - Possible?

2009-02-09 Thread Dianne Hackborn
Sorry, this is not currently supported.

And you really really wouldn't want to do this, because it would allow any
other app installed on the device to take over your own and use any of its
permissions for malicious purposes under the guise of being you.

On Mon, Feb 9, 2009 at 5:09 AM, Gav gav.ai...@googlemail.com wrote:


 Hey!

 BACKGROUND

 I would like my users to develop their own routines for image
 manipulation. Lets presume that a third party has written a class
 which implements one of my interfaces;

 public abstract class PixelBinaryFilter extends BinaryFilter{
 ...
protected abstract int generatePixel(int p1, int p2);
 ...
 }

 And hence has a class with one method defined, which could multiply
 pixel values together, subtract them find their lowest common multiple
 basically any routine they can think of.

 This class would be complied and then converted to DEX using the dx
 tool.

 The third party would then download the .dex file to their phones
 SDCARD, probably via my application using a 'Get New Routines' request
 which takes the URL of the file.

 QUESTION

 If I have a .dex file on the SDCARD how can I load it at runtime? The
 class name and path would be known.

 I have been using the Class.forName command for the standard routines
 but I don't know how (if) this will work with classes outside of the
 application.

 Many thanks,

 Gavin

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support.  All such questions should be posted on public
forums, where I and others can see and answer them.

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: Loading DEX files at runtime from SDCARD - Possible?

2009-02-09 Thread Gavin Aiken
Thanks for the response Dianne, I still live in the cotton wool word of
University where third parties are friendly types.
Understood, I did some more searching and found another thread in which you
contributed regarding this topic;

http://groups.google.com/group/android-developers/browse_thread/thread/7ee9248deeacd556/b116df9cffe4e045?lnk=gstr#b116df9cffe4e045

In case anyone else is on this trail.

I will also reply to your message there as I need a little
further clarification on the options available for a plugin style
architecture.

Kind regards,

Gavin

On Mon, Feb 9, 2009 at 8:03 PM, Dianne Hackborn hack...@android.com wrote:

 Sorry, this is not currently supported.

 And you really really wouldn't want to do this, because it would allow any
 other app installed on the device to take over your own and use any of its
 permissions for malicious purposes under the guise of being you.

 On Mon, Feb 9, 2009 at 5:09 AM, Gav gav.ai...@googlemail.com wrote:


 Hey!

 BACKGROUND

 I would like my users to develop their own routines for image
 manipulation. Lets presume that a third party has written a class
 which implements one of my interfaces;

 public abstract class PixelBinaryFilter extends BinaryFilter{
 ...
protected abstract int generatePixel(int p1, int p2);
 ...
 }

 And hence has a class with one method defined, which could multiply
 pixel values together, subtract them find their lowest common multiple
 basically any routine they can think of.

 This class would be complied and then converted to DEX using the dx
 tool.

 The third party would then download the .dex file to their phones
 SDCARD, probably via my application using a 'Get New Routines' request
 which takes the URL of the file.

 QUESTION

 If I have a .dex file on the SDCARD how can I load it at runtime? The
 class name and path would be known.

 I have been using the Class.forName command for the standard routines
 but I don't know how (if) this will work with classes outside of the
 application.

 Many thanks,

 Gavin





 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support.  All such questions should be posted on public
 forums, where I and others can see and answer them.



 


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---