Coder Social home page Coder Social logo

service's Introduction

Android Service Examples

eclipse/ has the examples in eclipse project format, no longer updated. Otherwise the examples are for android studio.

ServiceDemo is a example of how to call Services, both IntentService and a Service. plus an example of the download service too, which fails in api 30.

ServiceDemoIPC is an very simple example of how to use the binder pieces so an activity/fragment can call into the service.

ServiceDemoMSG is a simple example of passing a messages from the service to the activity via a handler.

ForegroundServiceDemo is an example of how to create a foreground service which can run without an app. It needs a persistent notification and to be started in the foreground. This is required in 26/Oreo+, otherwise use a JobIntentService.

FreeFallSrv is an example of using a service to get sensor data and do things. The activity only starts and stops the service. The code based on the freefall code in the sensor repo. Note with the background restrictions started in API 27, this app doesn't work as well as it used too. Likely a JobService or a foreground service maybe the better way to go.

JobIntentServiceDemo is an example of a jobIntentService. The jobIntentService just toasts a number of random numbers as asked for. this JobIntentServices can run in the background without an app in 26/Oreo+

JobServiceDemo is an example of a jobService. The jobIntentService just toasts a number of random numbers as asked for. Shows how to schedule a one off (with a recurring if you want) and a recurring one that survives reboot as well.

JobServiceJobWorkItemDemo is JobService, but instead of scheduling, it uses the new enqueue and dequeue methods. Note: This is a API 26/Oreo+ example.

WorkManagerDemo is an example of how to use the new Architecture Worker Tasks for background tasks. This examples show a simple one, one with parameters, and a set of tasks chained together. The tasks don't actually do anything interesting.

These are example code for University of Wyoming, Cosc 4730 Mobile Programming course. All examples are for Android.

service's People

Contributors

jimseker avatar

Watchers

James Cloos 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.