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

Nullpointer exception when calling remote service method

I am trying to call add method of remote service in my Activity.In Activity remote service method call is causing nullpointerexception: //This where i am calling service method in my activity initService(); service.add(); //this call causing null…
Rauf
  • 620
  • 1
  • 8
  • 20
0
votes
0 answers

Android: How should I optimise this AIDL code & avoid race condition

I'm creating a media player app. When I starts or resumes the application I want to check if the media player was already playing a song. So that if it was I will set my Pause/Play ToggleButton to Pause, else it was not playing earlier then button…
reiley
  • 3,759
  • 12
  • 58
  • 114
0
votes
1 answer

Android: How to check Service status in Activity's onResume()?

I'm creating a media player app. When I starts or resumes the application I want to check if the media player was already playing a song. So that if it was I will set my Pause/Play ToggleButton to Pause, else it was not playing earlier then button…
reiley
  • 3,759
  • 12
  • 58
  • 114
0
votes
1 answer

About Force Stop Package Via Android AIDL

Cache can be cleaned via AIDL, What about forcestop function? I tried, but failed. Anyone did this before? add aidl file in my packages: IActivityManager.aidl package android.app; oneway interface IActivityManager { void…
thecr0w
  • 2,148
  • 4
  • 33
  • 59
0
votes
1 answer

Aidl, android and unbinding service

Could somone explain to me why after calling unbindService i'm still able to communicate with the service ? The flow: bindService(new Intent(IService.class.getName()), conn, Context.BIND_AUTO_CREATE) ... mService =…
LazyBones
  • 107
  • 2
  • 10
0
votes
1 answer

AIDL based two way communication (Updated with Code)

I have two apps between which I want some data exchanged. As they are running in different processes, so, I am using AIDL to communicate between them. Now, everything is happening really great in one direction (say my apps are A and B) i.e. data is…
sshasan
  • 27
  • 2
  • 11
0
votes
1 answer

Android IPC Remote service call display Error

I want to make one demo application regarding the IPC communication .(Communication between Service). I am using AIDL for that . I found most of tutorial the RemoteService and Client are in same package . I actually do it separately ,While passing…
NovusMobile
  • 1,813
  • 2
  • 21
  • 48
0
votes
1 answer

Connection between Activity and remote service on different machine

I have implemented an android program with an activity and remote service. The activity is using AIDL to communicate and interact with the service but on a same machine and know that they use IPC mechanism to communicate with each other. Now, I want…
Furniture Sell
  • 249
  • 3
  • 11
0
votes
1 answer

Android application with underlying socket connection - remote service or not?

I'm developing an Android application that holds a socket connection open to a message server. I have a set of runnables that spawn their own threads and handle the connection / maintaining the connection. These are invoked from a foreground…
Mark
  • 179
  • 1
  • 6
  • 15
0
votes
3 answers

AIDL files not building in Eclipse in random projects?

I've got some AIDL files which I want to include in a project, however Eclipse seems to work differently on different projects. I'm developing an SDK for an application, and in the SDK android project the AIDL file generates the correct .java file,…
Joe Simpson
  • 2,546
  • 4
  • 30
  • 46
0
votes
2 answers

Proper way to implement services in android

In the context of a music player, i have seen services being implemented in two different ways as of now. In the first method a .aidl file is created and a stub is generated and service is implemented from that by binding it to the main activity. In…
Anurag Ramdasan
  • 4,189
  • 4
  • 31
  • 53
0
votes
2 answers

Error on getting gps location

I'm developing an app that communicates with three remote services on my phone. For the communication i'm trying to figure out which method is the best (intents or AIDL). I receive a stream via bluetooth in a rate of 4 streams/second with 15 bytes…
João Nunes
  • 711
  • 4
  • 11
  • 22
-1
votes
1 answer

android purchase in app money not received

I want to add an android in-app payment method, so I followed instructions by this page using AIDL I successfully added it and tried to do an effective payment using my personal google account. The payment was successful but I didn't receive the…
Simone
  • 311
  • 4
  • 16
-1
votes
4 answers

How to pass a surfaceview between activity and service through AIDL?

I want to pass the SurfaceView from activity to service using AIDL. In Service I will be rendering the video.
kiran Biradar
  • 12,700
  • 3
  • 19
  • 44
-1
votes
1 answer

Can you pass Activity to another app through IPC/AIDL?

I understand that through AIDL inter-app communication is possible in Android. You can pass primitives and custom objects that implement Parcelable interface. But, can App A pass it's activity reference to App B as a Parameter to an AIDL API (for…
Sai
  • 2,089
  • 3
  • 19
  • 30
1 2 3
39
40