How to invoke a service of one APK in another APK

by Dianne Hackborn » Sat, 07 Feb 2009 04:05:12 GMT


Sponsored Links
 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.






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

--~--~---------~--~----~------------~-------~--~----~



How to invoke a service of one APK in another APK

by Sunil . Maharana » Mon, 09 Feb 2009 13:36:18 GMT


 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> 



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.




______________________________________________________________________


______________________________________________________________________
--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


How to invoke a service of one APK in another APK

by Sunil . Maharana » Tue, 10 Feb 2009 21:24:41 GMT


 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> 



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.




______________________________________________________________________


______________________________________________________________________
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to sync extra info from contacts to android 1.6 (htc tattoo)

I've a htc tattoo (android 1.6) and I can sync easily my contacts from
my google contacts account, however lately I've been adding extra data
to those contacts such as birthday date and that data is never sync'ed
back to the phone. If however I add extra emails or phone numbers
those are added though...

Do I need to do anything extra, or configure it somehow?

--

2. Application to unlock the screen

Hi All,

Can some one please tell me how can we create a custom application to
unlock the screen. Similar to LASS/LAP on win mobile?

Thanks in advance.

Suresh

--

3. Android live translation app

4. GUI on Android

5. SimpleCursorAdapter SQLite field not found in ListActivity

6. Java.net.* problems with Android AVD

7. Android Wardrive database error