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
1 answer

Data that persist between activity and service (aidl)

I have spent 6 hours trying to solve this issue without success. I have 2 applications which communicate through a AIDL service. Here is the source code: Application A : protected void onCreate(Bundle savedInstanceState) { ... Intent i = new…
johann
  • 1,115
  • 8
  • 34
  • 60
0
votes
2 answers

AIDL -- primitives as output parameters

In the AIDL guide (http://developer.android.com/guide/components/aidl.html) it mentions that all primitives are "in" parameters. However, I'd like to create a parameter that is a primitive and it is an "out" variable i.e. the server will set it for…
Jon
  • 1,381
  • 3
  • 16
  • 41
0
votes
1 answer

Deploying in necessitas?

I have the following problem: when I try to deploy from necessitas on an actual device, I can't get through the .apk creation phase. Ant stops with error after finding .aidl files. Here is the output that I get from ant(I added an echo to see aidl…
Ivan
  • 5,803
  • 2
  • 29
  • 46
0
votes
1 answer

Android runtime exception - Could not find class XXX referenced from method XXX.

I have a few android projects that i'm trying to put together, but i'm facing some runtime exceptions that i can't understand. The projects are built like this: C/C++ Project ProjCore (has .c and .h files) Android Project ProjB -> uses ->…
taciosd
  • 211
  • 4
  • 14
0
votes
3 answers

Unable to run the Android project in Eclipse: .aidl error

I am trying to run a particular Android project in Eclipse 4.2.1(Juno). And it is giving following error when I try to compile it. Failed to run com.android.ide.eclipse.adt.internal.build.AidlProcessor. Check workspace log for…
meetpd
  • 9,150
  • 21
  • 71
  • 119
0
votes
1 answer

Is there equivalent of AIDL on other platforms (iOS, Blackberry, Windows Mobile)

Is there equivalent of Android Interface Definition Language (AIDL) on BlackBerry mobile? We have developed an Android application using AIDL, and we would like to develop the same application on BlackBerry, iPhone and Windows Mobile. Is there any…
Adilmo
  • 117
  • 1
  • 9
0
votes
1 answer

Change package name of java and aidl files

Basically I have lots of files in some packages, I want to add some other text in package name, But in the same time i want all the files should also change their package names and import statement automatically for both JAVA and AIDL files, as…
AAnkit
  • 27,299
  • 12
  • 60
  • 71
0
votes
2 answers

Using AIDL in Android: Check if the activity has bound the service

I'm using AIDL. I have a service and an activity. In the function onCreate I bind the service and I want update the UI: private ServiceConnection conn = null; public void onCreate(Bundle savedInstanceState) { …
jesuslinares
  • 146
  • 3
  • 11
0
votes
1 answer

about android aidl object

I must pass my object with IPC,like this class public class ForIpc { JsonObject info = new JSONObject(); public void add(String key, String value) { info.put(key,value); } } ForIpc can implents Parcelable,but how to handle…
Foocoder
  • 11
  • 3
0
votes
1 answer

Creating android communication service using sockets to send Object types

I have created a remote service that takes care of all client-server communication. I have used service because there are few separated applications that will use the same communication socket and there is no other way to "share" socket between…
HFDO5
  • 129
  • 3
  • 13
0
votes
1 answer

Checking status of a service failing because classloader

I have an Activity that starts a service which isn't local. Sometimes I check if is alive to perform actions. My attempt at the moment was to use a static boolean variable. Reading some posts on SO I found out this not works because each process…
learner
  • 1,311
  • 3
  • 18
  • 39
0
votes
1 answer

where do i get .aidl file while working in titanium framework for android?

The aidl tool converts the .aidl file to java interface which helps to make .apk file. I want to know from where do i get the .aidl file ? Does it come from android Sdk?
lopa
  • 474
  • 1
  • 3
  • 14
0
votes
1 answer

How to connect and communicate with service in its own process in Android

I am building an android music app and i have implemented player service that runs in the background with an activity that controls all the playback UI like play, pause etc. At first the service was running in he same process. But now i have made it…
Hardeep
  • 11
  • 3
0
votes
1 answer

Android remote bound service interface

I am facing this kind of problem: I have a remote (different process) bound service which defines an IntentFilter with action String. My client binds to it using the same action String in its bindService(..) call. Now when I implement another…
0
votes
1 answer

Trouble when use remote service communication (use IMediaPlaybackService in android framework level)

I want to use MediaPlayback service (achieved in music app) in framework level, steps is: added these codes in a java file (also add IMediaPlaybackService.aidl in the same directory) based in /frameworks/base/core/java/com/android: private…
SimpleSu
  • 31
  • 4