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
4
votes
2 answers

Conversion to Dalvik format failed with error 1 - Why?

I only added to an existing fully working project, the file com/android/vending/billing/IMarketBillingService.aidl (I didn't add anything else (from the market_billing sample) yet, since I am not even trying to use the service yet) It compiles and…
Bill The Ape
  • 3,261
  • 25
  • 44
4
votes
1 answer

AIDL and Messenger at the same time

I try to write a demo about how to use the AIDL and the Messenger at the same time, but I have an error, and I don't know the reason. MessengerDEMOActivity.java public class MessengerDEMOActivity extends Activity { /** Called when the activity…
Forro Istvan
  • 307
  • 2
  • 6
  • 11
4
votes
2 answers

AIDL interface between Java and C++

I am a new to AIDL interface. I would like to implement AIDL interface between Java(Application layer) which is build using gradle and C++(Native layer) which is build using cmake. I need to pass a chunk of data between these two processes using…
Srinivas
  • 41
  • 1
  • 4
4
votes
1 answer

How to send data to an IPC client from a remote service in different processes

There are an IPC client and an IPC server(remote service) belonging to different processes. I need to start to send data continuously to the client after it binds to the remote service. I can bind to the service and call AIDL methods from the…
Perihan Mirkelam
  • 526
  • 1
  • 5
  • 18
4
votes
1 answer

Android: Custom Object in AIDL

I have an application which interacts with a custom service via two aidl implementations. When the service is ran, I am running into the following exception: ERROR/AndroidRuntime(9435): FATAL EXCEPTION: main ERROR/AndroidRuntime(9435):…
user456236
4
votes
2 answers

Does Kotlin supports AIDL?

I have a simple AIDL definition and I want to use in Kotlin code but when it builds shows Unresolved reference error for all variables that uses the interface. but the same AIDL has no problem in Java code. does Kotlin support it? how to solve here…
Rebe
  • 127
  • 2
  • 8
4
votes
0 answers

Android AIDL with annotations

I would like to use a custom annotation in order to include more code to the AIDL's generated code. In the android documentation, there is a reference saying we can use annotations like @nullable, but when i add that annotation, it gives a compile…
Fábio Costa
  • 41
  • 1
  • 2
4
votes
0 answers

JavaBinder: Uncaught remote exception! (Exceptions are not yet supported across processes?

when i try to print paper with the aidl class the exception is thrown in my fragment class com.iposprinter.iposprinterservice E/JavaBinder: *** Uncaught remote exception! (Exceptions are not yet supported across…
4
votes
2 answers

aidl file couldnt find import for class with Android.mk

I have a project that uses AIDL interfaces and everything is building just fine in android studio with gradle. however, im only using android studio for the convenience of an IDE for developing my android applications, i have to actually use Android…
Aaron Czajka
  • 147
  • 2
  • 10
4
votes
1 answer

Kivy- Aidl cannot be exectuted even after installing 32bit libs

Im new to kivy. When im trying to build my app for android using buildozer, i get the following error # Check that aidl can be executed # Search for Aidl # Run '/home/khishorebsk/.buildozer/android/platform/android-sdk-20/build-tools/0/aidl' # Cwd…
BSK
  • 61
  • 1
  • 4
4
votes
2 answers

AIDL interface between two applications

I've stuck a total wall with the AIDL interfacing. I've an app which has to be controlled via 3rd party application (I've enough control over this so I can ask them to implement what ever I need into their activity) Originally my app was also an…
4
votes
0 answers

Binding to an AIDL service in ReactNative

We have developed a ReactNative android application and we want to bind to an AIDL service in one of our .aar dependencies. How can I bind to an AIDL service in reactnative for Android ?
Farhad
  • 12,178
  • 5
  • 32
  • 60
4
votes
2 answers

Android:Eclipse won't recognize AIDL file

I've looked and looked, but Eclipse (3.6, with the 2.2 Android SDK) just won't do anything with the AIDL file I created. The AIDL file is in the same place as the other source, following the Java style. I've read that Eclipse should just generate…
jmzorko
  • 51
  • 2
  • 4
4
votes
1 answer

How to pass SurfaceHolder via AIDL?

I have 2 separate Android app (apk). App 1 creates SurfaceView inside it and should provide AIDL methods for other apps to obtain an instance of SurfaceHolder for such SurfaceView. So the other apps will be able to draw on that view, displayed…
Andrey Suvorov
  • 511
  • 3
  • 17
4
votes
7 answers

Error:Execution failed for task ':app:compileDebugAidl ProcessException

I am not able to build Aidl Library. Error: Error:Execution failed for task ':app:compileDebugAidl'. java.lang.RuntimeException: com.android.ide.common.process.ProcessException: Error while executing …
AskQ
  • 4,215
  • 7
  • 34
  • 61