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
143
votes
13 answers

how can I add the aidl file to Android studio (from the in-app billing example)

I am currently migrating an Eclipse app to Android Studio. This app was using the in app billing. My main problem is to compile the project and the aidl file (I guess you all use this file) I get this error message: Gradle: error: cannot find…
Waza_Be
  • 39,407
  • 49
  • 186
  • 260
68
votes
14 answers

Execution failed for task ':app:compileDebugAidl': aidl is missing

I installed Android Studio on my computer. I created a new project but that got me the error below. What can I do? Error:Execution failed for task ':app:compileDebugAidl'. > aidl is missing My Android Studio version is 1.1.0. This is my…
user4813855
60
votes
5 answers

Example of AIDL use

to understand the AIDL in android, i want one real life example, means the at what scenario of development we need to use AIDL. by reading the Android Docs ... It puts me in confusion and so many question, so it is hard to read whole doc for me,…
Nixit Patel
  • 4,435
  • 5
  • 30
  • 57
43
votes
7 answers

aidl is missing android studio

Environment: Mac OS 10.10.3 Android studio:1.2.11 grandle:2.2.1 the log: Information:Gradle tasks [:generateDebugSources, :generateDebugTestSources] :preBuild :preDebugBuild :checkDebugManifest :prepareDebugDependencies :compileDebugAidl…
user2580278
  • 631
  • 1
  • 5
  • 8
39
votes
2 answers

"In/out/inout" in a AIDL interface parameter value?

I'm programming a radio streaming app. I run the "radio playing" as a remote Service by using AIDL interface technique to communicate with the Service. But I don't really understand one thing. What is the "out" in a AIDL interface parameter…
Theepan Karthigesan
  • 583
  • 2
  • 6
  • 10
37
votes
3 answers

Android RemoteExceptions and Services

So I've written a Service and an Activity for the Android OS. My service is running in it's own process, so all the communication between my Activities and the Service happens via IPC. I use the standard Android .aidl mechanism for this. So far…
Nils Pipenbrinck
  • 83,631
  • 31
  • 151
  • 221
36
votes
3 answers

What is " Stub " and "AIDL" for in java?

Question 1: I am studying Android service and often see code like this: private ISampleService.Stub sampleServiceIf = new ISampleService.Stub(){} What is .Stub ? Question 2: I checked "AIDL", but I want to know why we have to use that instead of…
AmyWuGo
  • 2,315
  • 4
  • 22
  • 26
32
votes
2 answers

Why ITelephony.aidl works?

I saw some SO posts which discussed about how to end a phone call programmtically, for example, this one. Yep, people focus on the result but no one actually explain the reason why it works? I tried the code, it works well. But I would like to know…
Mellon
  • 37,586
  • 78
  • 186
  • 264
29
votes
2 answers

Communicate with foreground service android

First question here, but I've been around for a while. What do I have: I'm building an Android app which plays audio streams and online playlists. Everything is working fine now, but I'm having issues in communicating with my service. The music is…
ores
  • 423
  • 1
  • 4
  • 6
24
votes
2 answers

Implement signature-level security on Android services with more than one allowed signature

I'm developing on an application at the moment which contains quite a lot of personal user information - things like Facebook contacts, etc ... Now, one of the things I want to be able to do (and have done, quite effectively) is open up parts of the…
jelford
  • 2,625
  • 1
  • 19
  • 33
22
votes
5 answers

Share library project's manifest services and permissions

I want to develop a library project which consists of a GCMIntentService and it performs GCM registration process and receives messages sent over GCM. I have used AIDL to expose my library project service to host application,but I need to declare…
21
votes
3 answers

RxJava and Cached Data

I'm still fairly new to RxJava and I'm using it in an Android application. I've read a metric ton on the subject but still feel like I'm missing something. I have the following scenario: I have data stored in the system which is accessed via…
Donn Felker
  • 9,553
  • 7
  • 48
  • 66
19
votes
5 answers

Android Studio does not detect .aidl files

I have found a sample from the Internet (https://github.com/manishkpr/Android-AIDL-Example) and ran on Android Studio and it worked fine. But now when I am trying to recreate the project, the Android Studio fails to recognize the .aidl file no…
Code_Yoga
  • 2,968
  • 6
  • 30
  • 49
14
votes
2 answers

How to run a singleton (shared) service in a library for multiple applications?

I've written a library starting a service in the background. It runs perfectly in all applications. In order to reduce the RAM usage, I want to avoid running multiple services for different applications. Actually, it's pretty enough to use only one…
14
votes
6 answers

Android Aidl Compile Error: couldn't find import for class

(I know there're multiple questions on stackoverflow and elsewhere (like google group) about adding parcelable for NetworkInfo but this is not about that.) My work is under $(AOSP_ROOT)/device/ and involves multiple aidl files. one of it is…
Chundong Wang
  • 478
  • 1
  • 5
  • 13
1
2 3
39 40