Hi,

My objective:
I want to develop two .apks as .apk#1 and .apk#2. My .apk#1 has one serice 
as serv#1 and .apk#2 has serive as .serv#2. I wanna to invoke the serv#1 
of .apk#1  in serv#2 of .apk#2.   For time being i have created two .apks 
and thinking how to commucate between them, i mean how i should proceed to 
invoke serv# of .apk#1 in my .apk#2.

Can  someone please help me what all steps i need to follow to achive my 
objective? If someone can share a sample example if you had that would be 
really helpful for me.

I have lots of questions in my mind mentioned below  but not sure whether 
all my understanding are correct or not  as per my objective -- 
- As per my knowledge both .apk#1 and .apk#2 will run in different 
process, so i might require the IPC mechanism.
- I also need to expose the interface using AIDL. Is it require to 
generate and compile the AIDL interface for both the .apk#1 and .apk#2.
- How i can include the .apk#1 in .apk#2,  is it like package .apk#1??

Thanks & Regards,
Sunil




Dianne Hackborn <hack...@android.com> 
Sent by: android-developers@googlegroups.com
02/07/2009 01:35 AM
Please respond to
android-developers@googlegroups.com


To
android-developers@googlegroups.com
cc

Subject
[android-developers] Re: How to invoke a service of one APK in  another 
APK






You have to compile the generated AIDL interfaces into each application, 
and make sure the service is exported with android:exported="true" if it 
doesn't declare any intent filters.

You didn't actually say what exact problem you are hitting, though, so I 
can't offer much more help than that.

On Fri, Feb 6, 2009 at 4:44 AM, Android <sunil.mahar...@lntinfotech.com> 
wrote:

Hello All....

I have one query regarding how to use the services of different APK in
my APK. Suppose i have created APK1 having services(serv1, serv2) and
APK2. I want to invoke the serv1 in APK2. I have tried by using aidl
files also.

These my question:
- How we can access services of different .apk.
- How to use the aidl file, is the aidl file should be added in
the .apk whose service we want to use.

I have gone through the below links, but couldn't find any concret
idea of how to impliment.
http://code.google.com/android/reference/aidl.html
http://minicompact.com/mobiletalk/?tag=android-service
http://minicompact.com/mobiletalk/?p=18
http://code.google.com/android/reference/android/os/IBinder.html

 It would be appreciable If someone answer my question.

-Kumar





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

Reply via email to