Not Only For Helping Others

I know this publication doesn’t have any value itself toward our society. This collection of journals and photographs exist almost only for my pleasure, and it’s merely child’s play, so to say…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How To Migrate The Deprecated JobIntentService

It’s time to introduce WorkManager into your Android project

But what does that mean? And how do we migrate our deprecated classes that use the JobIntentService?

The JobIntentService is a class that can be used for processing work in the background. When you extend this class, you need to declare it in your AndroidManifest.xml.

Depending on the android version of the respective device, the class uses different APIs to schedule work and runs it in your application’s own process, even when the actual app isn’t running.

Prior Android Q (10), you had to pass at least one constraint, from Q and above it’s also allowed to schedule jobs without any constraints at all.

A simple implementation of a JobIntentService can be seen in the code snippet below.

Additionally we allow to pass in a parameter “yourParameter” that later can be used when handling the work.

Add a comment

Related posts:

Your Infinite Light

While walking around our garden in a rare moment of warm spring sunshine, I came upon a single yellow bloom. Its brightness and tenacity brought comfort to my heart, standing there in awe. Like this…

Game of Apps!

The Google Play Store contains more than 2.6 million apps for android users. There are some real masterpieces, and some real duds, too. I personally have tried so many apps, and these have become…

Period Products Throughout History That Will Make You Grateful for the Tampon

Very few mammals deal with a period. We humans are just ever so lucky! But, sarcasm aside, maybe we are lucky since we are alive today and not hundreds of years ago. If you look back on history…