[android-developers] How to expose methods of an application to another application

2010-06-27 Thread Dantu
Hello,
 Is there any way to expose the methods of one application to
another application in android.
Suppose that I have written a slider for one application and if i want
to use the same slider in some other application, How can I do it
without copying the source.(Both the applications are installed on the
device).

thanks
Dantu

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


Re: [android-developers] How to expose methods of an application to another application

2010-06-27 Thread Mark Murphy
On Sun, Jun 27, 2010 at 2:33 PM, Dantu dantu.swar...@gmail.com wrote:
         Is there any way to expose the methods of one application to
 another application in android.

For pure processing, you can expose a remote service with an AIDL interface...

 Suppose that I have written a slider for one application and if i want
 to use the same slider in some other application,

...however, I know of no way to share UI components between
applications that way.

 How can I do it
 without copying the source.

Option #1: Compile the slider into a JAR, if it just pure Java code

Option #2: If both of the applications are yours, create an Android
library project:

http://developer.android.com/guide/developing/eclipse-adt.html#libraryProject
http://developer.android.com/guide/developing/other-ide.html#libraryProject

Option #3: If you are trying to create a generally reusable UI
component, consider creating a parcel:

http://andparcel.com

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training...At Your Office: http://commonsware.com/training

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