Giter Site home page Giter Site logo

aidl-forservice's Introduction

单应用中基于AIDL的进程间通信示例

平常看到网上各种AIDL的教程大都是做了连个app来演示,一个服务端,一个客户端,这里我演示了如何在一个APP内发起新的进程,同时与其他页面通信。

AS内新建AIDL代码非常简单。关键步骤如下:
  • 新建ALDL文件
  • 新建服务
  • 配置接口监听
  • 绑定服务,启动新进程

!需要注意的是,AIDL文件不能自动import外部文件,需要手动填写你引用到的类文件。

效果图如下:

aidl-service

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.