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

Hello,

I got my wpa_supplicant running and I can connect to different wireless
networks. But I keep seeing the following message in the logs:

wpa_driver_priv_driver_cmd failed

I have been google'ing, but only found people with the same problem, but no
solution.

Can someone explain to me what the message means? And is this a problem that
I need to solve?

Kind regards,

Peter

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: 

2. Setting manual buat email yahoo....

Sore all....

As subject kalo ga salah harus disetting dulu yaa smtpnya ? Saya lupa nih
settingannya.... ada yang bisa bantu ?

Thanx before....

-- 
"Indonesian Android Community [id-android]" 

3. AlarmManager - Listening to Alarms set/cancel method

4. AlarmManager - Listening to Alarms set/cancel method

5. Tarif Three Unlimited Naik

6. detikinet - Google Mulai Serbuan Joke 1 April

7. First person shooter pertama utk android