¡GoConqr estrena diseño! Cuéntanos qué te parece.

Fichas

Android Interface Definition Language

andrew tittle Inglés 8 fichas

Fichas del conjunto (8)

  1. 1AIDL Data types-primitive JAVA data types
    -String
    -CharSequence
    -List
    -Map
  2. 2Steps to define AIDL1. Create .aidl file
    2. Implement the interface
    3. Expose interface to client
  3. 3What is the .aidl file?The AIDL allows us to declare an interface with one or more methods, resides in the src/ directory
  4. 4.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
  5. 5How do we implement the .aidl interface?-Extend generated IBinder Interface with an instance of the generated Stub class
    -Implement methods from .aidl file
  6. 6Rules 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
  7. 7How 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
  8. 8What is RPC? What does it do?Remote Procedure Calls.
    Allows us to make method calls locally and execute them remotely in another process.

Información

Descripción
AIDL notes - some basics
Creado por
andrew tittle
Visitas
19
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?