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

make jar file from .aidl file

I am working with IPC mechanism and handling it through bound service and using .adil file with custom object... i.e. my structure of adil fileis something like this : Obj.aidl: package com.example.demo.A; parcelable Obj; IMyService.aidl: package…
SweetWisher ツ
  • 7,296
  • 2
  • 30
  • 74
0
votes
1 answer

Android, Service and client (activity) are running on different process. two-way communication using aidl

I am using aidl interface for IPC communication. After binding to service, I am able to call a API call from client to server. But how do I send event from server to client using aidl? Service and client are running on different process.
0
votes
1 answer

Get instance of Android system service(for example, AudioService)

I know that AudioManager provides API for AudioService. However, that I want is to get instance of AudioService class. Studying the source showed that AudioManager makes a call to class in remote service. I know that AudioManager have a field…
0
votes
1 answer

communicate two android applications

I have two applications but I need you to push a button on the application to the button that has the same application B that change happen.   I would greatly appreciate if you give me an idea of ​​how to do it.
0
votes
1 answer

how to access an enum from a library on the aidl server side

I have a library from a third party vendor. This library has an enum that I can access on the aidl server side. This enum (and the library it resides in) is inside an AIDL service. Now, the problem is: on the client side, how do I access this…
minh hoang
  • 81
  • 4
0
votes
1 answer

AIDL access through filter application list

The AIDL service is able to access for accessing different information and as AIDL service can be able to access through other application. So, in the mean time I am very much feel the security issue of accessing that AIDL service by other…
kamal_tech_view
  • 4,235
  • 4
  • 28
  • 49
0
votes
2 answers

Transferring parcelables between two processes using AIDL

Here is the only thing I didn't get about AIDL and couldn't find anything on Google or Stackoverflow: I have an activity and a service, each in different processes, and they tightly communicate via IPC using AIDL. One of the methods in AIDL…
Makks129
  • 576
  • 5
  • 20
0
votes
4 answers

how to create a file with .aidl extension?

I have following questions Do i need to create a simple file with .aidl extension ? I read that a corresponding .java file will be created, but in my case when i created a .aidl file;i couldn't find any such .java file is there any particular…
0
votes
2 answers

Options for distributing AIDL interface

What options do developers have for distributing their AIDL interfaces for other projects to use? So far, I have only been able to get a client project to work by copying the AIDL file from the service project into the client project. That works…
spaaarky21
  • 6,524
  • 7
  • 52
  • 65
0
votes
2 answers

Binding fails to remote service defined in Android library

I've defined a remote service in an Android Library project using AIDL. The service is supposed to simply increment an int. I try to bind to it from another project, an application using the library. The application's call to bindService(...) always…
Linus
  • 3,254
  • 4
  • 22
  • 36
0
votes
3 answers

Android : SharedPreferences not updated

My 2 android applications communicate throught a AIDL file : Application A <== AIDL ==> Application B (service) Application A calls methods of Application B (service) that returns some JSON information. However, If user is not logged in…
johann
  • 1,115
  • 8
  • 34
  • 60
0
votes
1 answer

android service aidl method put data to LinkedBlockingQueue ,take data from workerthread wrong

I'm using android aidl. I have a method to put data into a queue, and a read thread to take data from it. private static LinkedBlockingQueue mWriteQueue = new LinkedBlockingQueue(); private final ISendService.Stub mBinder = new…
ctcwri
  • 1
  • 1
0
votes
1 answer

Android AIDL StartProcess not working

I have an activity in which I call Service on background, I am quite new to AIDL my codes are as follows: on Activity //declaration private Intent mIntentInvenueService; private IInvenueService mIInvenueService; protected void onCreate(Bundle…
Androyds
  • 391
  • 1
  • 3
  • 20
0
votes
1 answer

android remote service running in a separate process and call methods from onserviceconnected()

I'm writing a service using AIDL to invoke methods remotely. I'm able to connect to the service successfully and also, invoke methods on it. However, if I try to invoke a method in onServiceConnected(), I get null pointer exception. Snippet of the…
pree
  • 2,297
  • 6
  • 37
  • 55
0
votes
1 answer

Using Context inside aidl service implementation

I'm trying to access sqlite DB (that is filled on diffrent part of the package) on AIDL stub implementation but - there is no context there. how can I get the context? there are 2 projects (applications) - A,B. Project A contains keeps records on…
yossico
  • 3,421
  • 5
  • 41
  • 76