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. Instal hampir semua program ke SD card tanpa root (2.2)

Iya
Confirm dari terminal juga begitu bro. 
Kalo di custom rom rodri misalnya,dia nambahin icon berbentuk sdcard untuk set 
install location dimana. 

@yopiesuryadi
The Next Big Thing is Coming....

-----Original Message-----
From: "yuk...@gmail.com" <yuk...@gmail.com>
Sender: id-android@googlegroups.com
Date: Fri, 16 Jul 2010 03:02:25 
To: id-android<id-android@googlegroups.com>
Reply-To: id-android@googlegroups.com
Subject: [id-android] Instal hampir semua program ke SD card tanpa root (2.2)

INi tadi baru iseng coba2 buka shell
dan nemu:

jalankan perintah

pm setInstallLocation 2

di shell (pake adb shell, atau mungkin bisa juga pake terminal emulator
seperti connectbot? tapi belum ngetes)

Maka, kalau ke settings -> applications -> manage applications,
app2 yang tadinya "Move to SD Card"nya ga nyala, sekarang jadi nyala!

Asik, tadinya sisa 30 MB skarang jadi 60 MB lebih (pake n1).

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

2. FileNotFound Exception on Device not Emulator using URLConnection

I"m doing a basic HTTP Get. Works fine a bagillion times in the
emulator.

Fails with this on the Device. I can load the URL fine in the browser
on the device.

W/System.err( 4576): java.io.FileNotFoundException: http://gotfanz.com/v1/join
W/System.err( 4576):    at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:
1061)

Odd
?

-- 

3. Windows unable to recognize the HTC evo device

4. cannot install USB drivers for HTC Slide, Android 2.1, Windows Vista 32 bit

5. Help: service auto restarts on breakpoint when debugging a service

6. Building Android Library Projects from the Command Line

7. Widget problems after application update.