• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Communication between Service and Activity

Kians

Lurker
Sep 30, 2010
1
0
Hi,

I open a new thread to talk about my problem :) , I have problems with communication between "service" to the "Activity"

what I have:
I have a FTP download of a file that is downloaded in the background as a service! In the end I had a time X in a variable.
furthermore it is checked whether the file is also fully load , I make it with a simple comparison of the data size.


So I have a time 0s "start time" 12:22:00 up as 20sec is "end time" 12:22:20
and a download size of 0Kb goes to 5000kb.

These values are defined in the service.


Project:

I want to show this graphically or via text in the GUI of the activity .

like this:

File Download time: X seconds
X seconds, will be scanned progressively and dynamically displayed. 1. sec, 2 sec ...... 20 sec

Download traffic: X kb of 5000 kb

Download rate is to be displayed: 0kb, 250 kb, 500 kb ..... 5000 kb.




Now my question:

how do I do that, which transfers the service these values to the activity!
and how can I display in the activity "dynamically and automatically."




I thank you all for your efforts
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones