[android-developers] Re: For modular requirement

2008-12-03 Thread Louis

Thanks a lot also

On Nov 30, 5:28 pm, Xiaoliang Ding [EMAIL PROTECTED] wrote:
   Thanks Dianne. Your approaches are very helpful. We will try them both.

   Thanks
   Ding

 2008/11/30 Dianne Hackborn [EMAIL PROTECTED]

  A good way to do this is publish it as a service in another .apk, which you
  can query the package manager for and bind to.  This isn't really a true
  plug-in though (a service is a global singleton in the system, and you'll
  nee to define a .aidl interface to it so it can run in another process).

  Another approach is to put your plug-in into another .apk, publish it in
  the manifest however you want, find the .apk with the Package Manager, and
  then use Context.createApplicationContext() with the flag to load the code.
  From there you can get the ClassLoader for the other .apk and instantiate
  classes.

  If you do the latter though you really need to be aware of what you are
  doing: this has all kinds of security implications for you, can have
  problems if code ends up running as different uids, etc.  This is best for
  the situation where you provide all of the plug-ins, so you can sign them
  with the same certificate and use a shared user ID for all of them as well
  as the main application.

  On Fri, Nov 28, 2008 at 2:39 AM, Xiaoliang Ding [EMAIL PROTECTED]wrote:

   Hi, Ludwing, Louis

      But how about a new added application. If we want to a new
  plug-in added into the main application, how can do it ?

  Thanks
  Ding

  2008/11/28, Louis [EMAIL PROTECTED]:

  Thanks Ludwig. And by the way, could we download a Jar file and put it
  into the basic application, then the basic application can call it
  through some interfaces?

  On Nov 27, 8:28 pm, Ludwig [EMAIL PROTECTED] wrote:
   Think about Intents and split your application into multiple
  applications
   (perhaps running under the same userid), each serving a bunch of
  intents.
   Then you can upgrade each application (which might just respond to one
   intent) separately and Android will at run-time find the best-matching
   intent (or give the user the choice which one to use if there are
  multiple
   good matches).

   Ludwig

   2008/11/26 Louis [EMAIL PROTECTED]

Hi, All:

Our products which running in other platform are using the modular
approach, which means if user want to add a new feature, he/she only
need to download a new plug-in, but not reinstall the who
  application.
And we used COM library base ideas to do that before, is there anyway
to do it in Android?

Welcome any help for it.

Best regards,
Louis.

  --
  Dianne Hackborn
  Android framework engineer
  [EMAIL PROTECTED]

  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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: For modular requirement

2008-11-30 Thread Xiaoliang Ding
  Thanks Dianne. Your approaches are very helpful. We will try them both.

  Thanks
  Ding

2008/11/30 Dianne Hackborn [EMAIL PROTECTED]

 A good way to do this is publish it as a service in another .apk, which you
 can query the package manager for and bind to.  This isn't really a true
 plug-in though (a service is a global singleton in the system, and you'll
 nee to define a .aidl interface to it so it can run in another process).

 Another approach is to put your plug-in into another .apk, publish it in
 the manifest however you want, find the .apk with the Package Manager, and
 then use Context.createApplicationContext() with the flag to load the code.
 From there you can get the ClassLoader for the other .apk and instantiate
 classes.

 If you do the latter though you really need to be aware of what you are
 doing: this has all kinds of security implications for you, can have
 problems if code ends up running as different uids, etc.  This is best for
 the situation where you provide all of the plug-ins, so you can sign them
 with the same certificate and use a shared user ID for all of them as well
 as the main application.


 On Fri, Nov 28, 2008 at 2:39 AM, Xiaoliang Ding [EMAIL PROTECTED]wrote:

  Hi, Ludwing, Louis

 But how about a new added application. If we want to a new
 plug-in added into the main application, how can do it ?

 Thanks
 Ding


 2008/11/28, Louis [EMAIL PROTECTED]:


 Thanks Ludwig. And by the way, could we download a Jar file and put it
 into the basic application, then the basic application can call it
 through some interfaces?

 On Nov 27, 8:28 pm, Ludwig [EMAIL PROTECTED] wrote:
  Think about Intents and split your application into multiple
 applications
  (perhaps running under the same userid), each serving a bunch of
 intents.
  Then you can upgrade each application (which might just respond to one
  intent) separately and Android will at run-time find the best-matching
  intent (or give the user the choice which one to use if there are
 multiple
  good matches).
 
  Ludwig
 
  2008/11/26 Louis [EMAIL PROTECTED]
 
 
 
   Hi, All:
 
   Our products which running in other platform are using the modular
   approach, which means if user want to add a new feature, he/she only
   need to download a new plug-in, but not reinstall the who
 application.
   And we used COM library base ideas to do that before, is there anyway
   to do it in Android?
 
   Welcome any help for it.
 
   Best regards,
   Louis.




 --
 Dianne Hackborn
 Android framework engineer
 [EMAIL PROTECTED]

 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: For modular requirement

2008-11-29 Thread Dianne Hackborn
A good way to do this is publish it as a service in another .apk, which you
can query the package manager for and bind to.  This isn't really a true
plug-in though (a service is a global singleton in the system, and you'll
nee to define a .aidl interface to it so it can run in another process).

Another approach is to put your plug-in into another .apk, publish it in the
manifest however you want, find the .apk with the Package Manager, and then
use Context.createApplicationContext() with the flag to load the code.  From
there you can get the ClassLoader for the other .apk and instantiate
classes.

If you do the latter though you really need to be aware of what you are
doing: this has all kinds of security implications for you, can have
problems if code ends up running as different uids, etc.  This is best for
the situation where you provide all of the plug-ins, so you can sign them
with the same certificate and use a shared user ID for all of them as well
as the main application.

On Fri, Nov 28, 2008 at 2:39 AM, Xiaoliang Ding [EMAIL PROTECTED] wrote:

  Hi, Ludwing, Louis

 But how about a new added application. If we want to a new
 plug-in added into the main application, how can do it ?

 Thanks
 Ding


 2008/11/28, Louis [EMAIL PROTECTED]:


 Thanks Ludwig. And by the way, could we download a Jar file and put it
 into the basic application, then the basic application can call it
 through some interfaces?

 On Nov 27, 8:28 pm, Ludwig [EMAIL PROTECTED] wrote:
  Think about Intents and split your application into multiple
 applications
  (perhaps running under the same userid), each serving a bunch of
 intents.
  Then you can upgrade each application (which might just respond to one
  intent) separately and Android will at run-time find the best-matching
  intent (or give the user the choice which one to use if there are
 multiple
  good matches).
 
  Ludwig
 
  2008/11/26 Louis [EMAIL PROTECTED]
 
 
 
   Hi, All:
 
   Our products which running in other platform are using the modular
   approach, which means if user want to add a new feature, he/she only
   need to download a new plug-in, but not reinstall the who application.
   And we used COM library base ideas to do that before, is there anyway
   to do it in Android?
 
   Welcome any help for it.
 
   Best regards,
   Louis. 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: For modular requirement

2008-11-28 Thread Ludwig
You can include jar files into your apk, in eclipse just add them to your
build path and they will be included automagically.The one thing you have to
be aware of, however, is that Android is not Java, but quite a cut-down
version of it, so dependencies in your jar files that work on standard JME
or so might not work on Android.

HTH
Ludwig

2008/11/28 Louis [EMAIL PROTECTED]


 Thanks Ludwig. And by the way, could we download a Jar file and put it
 into the basic application, then the basic application can call it
 through some interfaces?

 On Nov 27, 8:28 pm, Ludwig [EMAIL PROTECTED] wrote:
  Think about Intents and split your application into multiple applications
  (perhaps running under the same userid), each serving a bunch of intents.
  Then you can upgrade each application (which might just respond to one
  intent) separately and Android will at run-time find the best-matching
  intent (or give the user the choice which one to use if there are
 multiple
  good matches).
 
  Ludwig
 
  2008/11/26 Louis [EMAIL PROTECTED]
 
 
 
   Hi, All:
 
   Our products which running in other platform are using the modular
   approach, which means if user want to add a new feature, he/she only
   need to download a new plug-in, but not reinstall the who application.
   And we used COM library base ideas to do that before, is there anyway
   to do it in Android?
 
   Welcome any help for it.
 
   Best regards,
   Louis.
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: For modular requirement

2008-11-28 Thread Xiaoliang Ding
 Hi, Ludwing, Louis

But how about a new added application. If we want to a new plug-in added
into the main application, how can do it ?

Thanks
Ding


2008/11/28, Louis [EMAIL PROTECTED]:


 Thanks Ludwig. And by the way, could we download a Jar file and put it
 into the basic application, then the basic application can call it
 through some interfaces?

 On Nov 27, 8:28 pm, Ludwig [EMAIL PROTECTED] wrote:
  Think about Intents and split your application into multiple applications
  (perhaps running under the same userid), each serving a bunch of intents.
  Then you can upgrade each application (which might just respond to one
  intent) separately and Android will at run-time find the best-matching
  intent (or give the user the choice which one to use if there are
 multiple
  good matches).
 
  Ludwig
 
  2008/11/26 Louis [EMAIL PROTECTED]
 
 
 
   Hi, All:
 
   Our products which running in other platform are using the modular
   approach, which means if user want to add a new feature, he/she only
   need to download a new plug-in, but not reinstall the who application.
   And we used COM library base ideas to do that before, is there anyway
   to do it in Android?
 
   Welcome any help for it.
 
   Best regards,
   Louis.
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: For modular requirement

2008-11-27 Thread Ludwig
Think about Intents and split your application into multiple applications
(perhaps running under the same userid), each serving a bunch of intents.
Then you can upgrade each application (which might just respond to one
intent) separately and Android will at run-time find the best-matching
intent (or give the user the choice which one to use if there are multiple
good matches).

Ludwig

2008/11/26 Louis [EMAIL PROTECTED]


 Hi, All:

 Our products which running in other platform are using the modular
 approach, which means if user want to add a new feature, he/she only
 need to download a new plug-in, but not reinstall the who application.
 And we used COM library base ideas to do that before, is there anyway
 to do it in Android?

 Welcome any help for it.

 Best regards,
 Louis.
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: For modular requirement

2008-11-27 Thread Louis

Thanks Ludwig. And by the way, could we download a Jar file and put it
into the basic application, then the basic application can call it
through some interfaces?

On Nov 27, 8:28 pm, Ludwig [EMAIL PROTECTED] wrote:
 Think about Intents and split your application into multiple applications
 (perhaps running under the same userid), each serving a bunch of intents.
 Then you can upgrade each application (which might just respond to one
 intent) separately and Android will at run-time find the best-matching
 intent (or give the user the choice which one to use if there are multiple
 good matches).

 Ludwig

 2008/11/26 Louis [EMAIL PROTECTED]



  Hi, All:

  Our products which running in other platform are using the modular
  approach, which means if user want to add a new feature, he/she only
  need to download a new plug-in, but not reinstall the who application.
  And we used COM library base ideas to do that before, is there anyway
  to do it in Android?

  Welcome any help for it.

  Best regards,
  Louis.
--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---