Answer the question
In order to leave comments, you need to log in
PendingResuld vs BroadcastReceiver?
I’m figuring out how to use the service on a statrandroyd, they showed 2 methods of data exchange, through pendingResult and through broadcastReceiver, and which one should be used when? Or maybe one of them is outdated and should not be used?
Answer the question
In order to leave comments, you need to log in
I'll tell you so. You will need a service with a very small probability. Basically now it is playing sounds and the like, in the background, with the foreground flag and a notification. Such a service will not transfer data anywhere. If there is ui, it's easier to just bind it and that's it.
Broadcast receiver in 2021 is needed only for interprocessor communication, and not within a single application, that's for sure.
Upd is a non-foreground service in modern androids, after the application goes into the background, it lives for a very, very short time. Seconds.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question