Questions tagged [aidl]

Android Interface Definition Language is a special language that allows a server and a client to establish interface for Inter Process Communication (IPC).

AIDL - is a special language that allows a client and a server process to establish interface that can be used for Inter Process Communication. This interface is defined in the .aidl files. The syntax of the Android interface is similar to the syntax of Java interfaces but has several peculiarities. Aidl files are compiled into the Java files by a special aidl tool.

By default, for security reasons all applications in Android run with their own uid and in different processes. At the same time, so as Android is a mobile operating system it should provide abilities to maximize the reuse of components of the applications. Thus, the mechanisms for exchanging information have to be implemented. These mechanisms are called Inter Process Communication. For Android there was implemented a special IPC mechanism called Binder.

To communicate with each other Android process have to decompose the information into primitives that can be understood by Binder driver. This driver have to send these primitives to remote process and compose them there into the sent information. The process of decomposing and composing is difficult to write. Thus, OHA has proposed a special tool called aidl to facilitate this process.

Links:

  1. Android developers: aidl
  2. Remote methods and aidl
588 questions
0
votes
0 answers

compile aidl in batch

I try to compile aidl files to java file so that I can import them in eclipse to correct the ugly red warnings. I succeeded to compile an aidl file. But something went wrong when I compiled them in batch.…
user2539662
  • 130
  • 2
  • 10
0
votes
1 answer

Wait for binding to AIDL is complete

I'm calling an AIDL service from within an IntentService. Once binding to the AIDL service is done, the IntentService must pass a parameter to the AIDL service for execution. Now since binding to the AIDL takes takes place asynchornously, I want the…
Abhishek
  • 743
  • 1
  • 15
  • 28
0
votes
2 answers

Android Service Activity Interaction using AIDL

I am trying to make 2 applications which will interact with each other using AIDL. Application 1: Will be a service. Application 2: Will be Activity(with a button) which will show some data which will be fetched by Application 1 service. Now to…
learner
  • 1,095
  • 2
  • 18
  • 41
0
votes
2 answers

How to get know when all services are ready

Currently I have an Activity in Android, In the onCreate() I have a function that creates a list of all available MyServices (using aidl) that i have and insert the names etc in an Arraylist. Still in the Activity in the onStart() I bind all the…
Anaar
  • 3
  • 2
0
votes
1 answer

How to create a file with the .aidl extension in Linux?

I'm currently using a Linux terminal and each time I try to save a aidl file it saves it as a text file. I also tried converting the files but it didn't work for the aidl extension :( mv IRemoteService IRemoteService.html (Converted successfully to…
Ahmed Faisal
  • 4,397
  • 12
  • 45
  • 74
0
votes
2 answers

AIDL interface can't find import for Parcelable class

My issue seems to be similar to this question and this one but it is a bit different. I am making an AIDL service that is in a Library project and using it in my application. I have a class Vehicle that is in my application that I have made…
benzabill
  • 259
  • 1
  • 8
  • 21
0
votes
0 answers

How to wrap third party library as android service?

So I have a library that drives external devices over bluetooth or wifi. The library was written by another party and I cant really change it. There will be multiple android applications controlling the device. Separate APKs and separate processes.…
startoftext
  • 3,846
  • 7
  • 40
  • 49
0
votes
0 answers

How to start the newer version of the AIDL Service and stop the old currently running one

What I need is very similar to the How to properly upgrade AIDL interfaces in Android? question, but I also want a newer version of the AIDL Service to launch after it is installed and the old one to stop. Simply put: I need that the newest version…
VladimirVip
  • 384
  • 3
  • 13
0
votes
0 answers

Android - Is it possible to call unexposed public methods on a remote service's context

I have a remote service, a remote service interface and a client bind to it. I wonder if it is possible to call methods(eg. UnexposedMethod2) in service which are not exposed in interface on service's context. My code is as…
yoarcher
  • 5
  • 1
  • 3
0
votes
1 answer

Android Service Choice

I'm porting an application from C# to Android and I need some help to decide which service type i'd need to use on Android to achieve the same result. Currently theres 2 seperate application. An updater and a client. The updater polls the webserver…
Deejdd
  • 119
  • 1
  • 1
  • 8
0
votes
1 answer

service that gets registered with service manager

I did tried some sample code for service and installed the same on device and started the app. I tried to list this service with adb command, which was running now (could see my logs for the same in logcat) adb shell service list But, above command…
Manju
  • 677
  • 5
  • 13
  • 27
0
votes
1 answer

Binder mechanisam to update UI in android

In my project I am using binder mechanism to communicate to remote service. The remote service class will call JNI function and updates to UI for every 10 seconds. The JNI function has below code static int n = 100; return ++n; This JNI function…
Shiv
  • 43
  • 9
0
votes
1 answer

Custom Parcelables over AIDL shared between Multiple APPs results in ClassNotDefError

I have three Android Projects in Eclipse: App A (hosts a Service) App B (uses Service from A) AIDL (definition and some custom parcelables) APP A launches APP B. APP B uses an Service via AIDL from APP A. Works well so far. The Problem is that…
Kitesurfer
  • 3,438
  • 2
  • 29
  • 47
0
votes
2 answers

Determining if process has died?

Is there a way to determine whether a process has died? I have a system service that stores information on each client that connects to it. When the process that is hosting that client dies, I would like to clean up my cache. I've searched all…
Jon
  • 1,381
  • 3
  • 16
  • 41
0
votes
3 answers

Bundle putIBinder getIBinder deprecated

It seems that Bundle has deprecated putIBinder and getIBinder which I thought was very useful for passing binders (through Bundles) over to my service. Since these are deprecated, is there an alternative to this? I really need to pass an IBinder…
Jon
  • 1,381
  • 3
  • 16
  • 41