01.11.2014 Views

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

AIDL (Android Interface Definition Language)<br />

Implementing IPC Using AIDL<br />

Follow these steps to implement an IPC service using AIDL.<br />

1. Create your .aidl file - This file defines an interface (YourInterface.aidl) that defines the<br />

methods and fields available to a client.<br />

2. Add the .aidl file to your makefile - (the ADT Plugin for Eclipse manages this for you).<br />

Android includes the compiler, called AIDL, in the tools/ directory.<br />

3. Implement your interface methods - <strong>The</strong> AIDL compiler creates an interface in the Java<br />

programming language from your AIDL interface. This interface has an inner abstract<br />

class named Stub that inherits the interface (and implements a few additional methods<br />

necessary for the IPC call). You must create a class that extends YourInterface.Stub and<br />

implements the methods you declared in your .aidl file.<br />

4. Expose your interface to clients - If you're writing a service, you should extend Service<br />

and override Service.onBind(Intent) to return an instance of your class that implements<br />

your interface.<br />

<strong>Korea</strong> Android Community- www.kandroid.org<br />

8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!