Android Developers
Published in

Android Developers

Header image by Virginia Poltrack

Use WorkManager for immediate background execution

Introduction to the API

Get started with immediate execution

Set up ForegroundInfo

Run work in a foreground service

⚠️⚠️⚠️
Call setForeground() before your long running task kicks off.
Otherwise your worker will be treated as non-foreground service until setForeground() has been called, which might result in unwanted results such as work being cancelled.
⚠️⚠️⚠️

🐾 Next steps

--

--

--

Articles on modern tools and resources to help you build experiences that people love, faster and easier, across every Android device.

Recommended from Medium

Material Spinner (Combo Box) for Android

Complex UI in Jetpack Compose

how to set up properly Flutter in the android studio on windows

flutter_path

Re-Architecting the Flurry Mobile App for Android — Part 1

Support new form factors with the new Jetpack WindowManager library

Build your Android app from command-line with Android Studio on Mac

How to prevent multiple clicks in Android Jetpack Compose

Intro to Android Workshop

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Ben Weiss

Ben Weiss

#Android Developer Relations @ Google

More from Medium

JankStats Goes Alpha

Android Touch System — Part 1: Touch Functions and the View Hierarchy

Setting UserAgent in Android Webview

Now in Android #55