Giter VIP home page Giter VIP logo

bound_service_flutter's Introduction

bound_service

Bound Service In Flutter.

Getting Started

This is a simple implementation of a bound service in Flutter. This is based on Android documentation (Bound Services).

Bound Services let you run background code inside your flutter app, even the application is left or open as it uses binding and unbinding of a service.

The simplest way to explain it:

  1. You run flutter application with Flutter Platform Channel For Android
  2. This implementation let your code in Java run in background. Ex. Music, downloads, recording, background location.
  3. When the user leaves your application, the background code will remain opened until it is explicitly closed (by the application or OS).
  4. Since it's a bound service, the service should be bound to an application (obligatory).
  5. If the application is killed, the service is killed also by the system.

Files to check the codes:

  • bound_service.dart -- in charge of communicating with Java
  • main.dart -- Top level communication with Java
  • BoundServicePlugin.java -- It is the plugin where all your background code which runs
  • LocalService.java -- contains all your Local Services in form of public methods, of whatever tricks you would like !

bound_service_flutter's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

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.