WorkManager: Back to the foreground

  Рет қаралды 19,156

Android Developers

Android Developers

Күн бұрын

Пікірлер: 22
@albpace
@albpace 2 жыл бұрын
This stuff has a complexity which goes beyond what makes software reliable. The final results is that foreground services get's killed for reasons that nobody can understand and take weeks to debug why !
@zer0dayexploit
@zer0dayexploit Жыл бұрын
Yo I cannot begin to complain about their poorly thought through boilerplate APIs...
@zer0dayexploit
@zer0dayexploit Жыл бұрын
The problem is deeply rooted in their choice of language such as "foreground" and "background" when all we need is persistent and nonpersistent threads
@zer0dayexploit
@zer0dayexploit Жыл бұрын
Stock Android devices are simply not a reliable device to carry out software tasks in a way like a pc because Android is always trying to appeal to noobs who have absolutely no idea about battery and memory, so they entirely focus on prechewing things that are an absolute nightmare
@vengateshm2122
@vengateshm2122 2 жыл бұрын
Tooling support was awesome. Android studio version naming is also nice. Bumblebee
@witoldsienski1709
@witoldsienski1709 2 жыл бұрын
Thanks for material :)
@gmk57
@gmk57 2 жыл бұрын
Well, long-running work was supported through foreground services, which are severely restricted on Android 12, and expedited work/job "is not a substitute for long-running work" (10:15). So long-running work is just impossible on Android 12, with or without WorkManager, right?
@vengateshm2122
@vengateshm2122 2 жыл бұрын
But they mentioned we can do long running work by creating foreground notification inside worker with cancellation support.
@gmk57
@gmk57 2 жыл бұрын
@@vengateshm2122 AFAIK, on Android 12 going to foreground from background is prohibited, see 8:54
@vengateshm2122
@vengateshm2122 2 жыл бұрын
@@gmk57 it's mentioned that from background you cannot trigger foreground service, for this should use expedited work. It works based on importance of the service and quota available. When running on less quota it will suspend and resume.
@adamchen8114
@adamchen8114 Жыл бұрын
Can app still have foreground service in Android 12 when using WorkerManger? 4:40 section says the work is tie with a foreground service to handle the notification cancellation. However, 9:00 section says app can't start foreground service when in background mode. Does this mean everything you said in 4:40 section doesn't work on Android 12? Can anybody chime?
@adamchen8114
@adamchen8114 Жыл бұрын
10:32 says the Expedited work runs in the context of a foreground service. My understanding is that this replace the old API setForeGroundAsync in 8:57. On Android 12, instead of calling setForeGroundAsync, developer uses Expedited work instead. There is a catch though. Expedited work can't be long running. This sound like a capacity gap to me that app can't maintain the same behavior on Android 12 for long running background tasks.
@adamchen8114
@adamchen8114 Жыл бұрын
Question: does the scenario described in 4:40 section still work on Android 12? If the answer is true, does it have to be Expedited work or a regular WorkManger work?
@aiders4352
@aiders4352 Жыл бұрын
periodic work is flaky on Huawei devices (running EMUI 12.0.0 with Google Play Services on a device from the pre-Google/Huawei ban era)
@AlexSanchezMorales
@AlexSanchezMorales 2 жыл бұрын
Google's approach to save battery and have apps which run better is very suffocating for devs lately, but also google is right, there is too much developers doing wrong things(sometimes myself included), poorly designed apps and so on. So google's approach is constraint to the minimum a developer can do. The very bad downside of this constrained environment is that you are narrowing the spectrum of possibilities of what a developer or small startup can do, with their app. There is nothing bad on Implement a Background Service on it's own process, There is nothing bad on Implement a Pending Service (Which I believe is under the hood of Workers) Yes, you may have to do other checks by yourself, like network and other stuff. I been doing android dev for over 10 years and I can see anyone can build an app (which is cool), it's easier with all the jetpack and stuff but also is WAY harder to do non conventional apps. Looks like there will be a lot of Filtering image apps.
@gouravrawatscience
@gouravrawatscience Жыл бұрын
Bro its not working in chinease manufacture phones
@mxkmn
@mxkmn 9 ай бұрын
and on pure androids too
@zer0dayexploit
@zer0dayexploit Жыл бұрын
"back to the foreground" you think that's funny but really it goes to show how ridiculous your terminology is here The right terminology is a persistent or non-peristent PROCESS (not work) Please stop making new terminology, it's not cool, it's not fun, it's not technical, it's just inaccurate and confusing
@zer0dayexploit
@zer0dayexploit Жыл бұрын
I'm starting to think that the Android APIs are so terrible and make absolutely no sense because these people don't respect the English language, simplicity and not reinventing the wheel High quality break strategy? What? Come again? High quality insertion of newlines in text? What? Put the pipe down...
@zer0dayexploit
@zer0dayexploit Жыл бұрын
Like what are you talking about man How is a notification not background work? Like how does a notification all of a sudden imply something is running on the main thread? Oh. It doesn't? What? Ok so what is a foreground as opposed to background? Oh. Persistence? THEN SAY PERSISTENT INSTEAD OF FOREGROUND
@zer0dayexploit
@zer0dayexploit Жыл бұрын
You are literally trying to vacuum the ocean floor... Stop wasting energy on things that are not important.
@uio86a
@uio86a 2 жыл бұрын
Is there a way to prevent the background app from being refreshed?
Implementing Material You using Jetpack Compose
14:18
Android Developers
Рет қаралды 49 М.
5 Fatal Coroutine Mistakes Nobody Tells You About
18:15
Philipp Lackner
Рет қаралды 87 М.
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 7 МЛН
How do Cats Eat Watermelon? 🍉
00:21
One More
Рет қаралды 9 МЛН
小天使和小丑太会演了!#小丑#天使#家庭#搞笑
00:25
家庭搞笑日记
Рет қаралды 11 МЛН
Officer Rabbit is so bad. He made Luffy deaf. #funny #supersiblings #comedy
00:18
Funny superhero siblings
Рет қаралды 7 МЛН
Kotlin Flows in practice
21:06
Android Developers
Рет қаралды 161 М.
Deep dive into Jetpack Compose layouts
28:25
Android Developers
Рет қаралды 60 М.
Why Everyone Is OBSESSED With Arc Browser
10:26
Enrico Tartarotti
Рет қаралды 293 М.
Build a Realtime Chat App in React Native (tutorial for beginners) 🔴
3:49:50
Compose animations - Android Developers Backstage
59:36
Android Developers
Рет қаралды 6 М.
What’s new in Android Studio
21:48
Android Developers
Рет қаралды 37 М.
WorkManager: Advanced configuration & testing - MAD Skills
10:14
Android Developers
Рет қаралды 13 М.
Unlocking Generative AI in an APRA regulated environment
1:00:30
How I'd Learn to Code RIGHT NOW (If I Started from Scratch)
7:29
Andy Sterkowitz
Рет қаралды 522 М.
Как подписать? 😂 #shorts
00:10
Денис Кукояка
Рет қаралды 7 МЛН