Android Interface Definition Language

Description

AIDL notes - some basics
andrew tittle
Flashcards by andrew tittle, updated more than 1 year ago
andrew tittle
Created by andrew tittle about 7 years ago
9
0
1 2 3 4 5 (0)

Resource summary

Question Answer
AIDL Data types -primitive JAVA data types -String -CharSequence -List -Map
Steps to define AIDL 1. Create .aidl file 2. Implement the interface 3. Expose interface to client
What is the .aidl file? The AIDL allows us to declare an interface with one or more methods, resides in the src/ directory
.aidl file info? -each .aidl file can only define 1 interface -Only methods are supported -Cannot expose static fields in .aidl -Non primitive data types require "in" "out" "inout" directional tags -Generates IBinder interface -SDK generates a .java interface file and stub class for the .aidl file
How do we implement the .aidl interface? -Extend generated IBinder Interface with an instance of the generated Stub class -Implement methods from .aidl file
Rules for implementing Interface? -Incoming calls not guaranteed on Main Thread- -RPC calls are synchronous- -No thrown exceptions are sent back to caller- -Client must have access to Interface Class/.aidl file
How do we expose the Interface to clients? -Extend SERVICE class and implement onBind() which returns an instance of the class that implements the generated stub -Client calls bindService() to connect -Clients onServiceConnected() callback receives Binder instance
What is RPC? What does it do? Remote Procedure Calls. Allows us to make method calls locally and execute them remotely in another process.
Show full summary Hide full summary

0 comments

There are no comments, be the first and leave one below:

Similar

GCSE French Edexcel High Frequency Verbs: Second Set
alecmorley2013
AS-Level Chemistry: Unit 1:The Atom
Daena Targaryen
STUDY PLANNER IGCSE
Felixus
AS Chemistry - Enthalpy Changes
Sarah H-V
GCSE REVISION TIMETABLE
gracemiddleton
Chemistry (C3)
Amy Lashkari
GCSE AQA Physics Unit 2 Flashcards
Gabi Germain
regular preterite tense conjugation -ar verbs
Pamela Dentler
A Christmas Carol Context
Olivia Bamber
Système circulatoire sanguin
Martin Fortier