'appended to a multiline editText', what sort of data is it, why EditText need more information. In a lot of cases you can just copy most of the code over and with a few tweaks it will work.
If simplicity is the key what matters the data and usage ?
I just want that my app continues receiving data while in background, and do not "clear" the edittext when returns to the main activity, just like message text, whatsapp, and others.
If simplicity is the key what matters the data and usage ?
I just want that my app continues receiving data while in background, and do not "clear" the edittext when returns to the main activity, just like message text, whatsapp, and others.
If you use a service you won't be able to update that EditText, what you should do, is keep capturing that data (using the service) and save it to a file, when the Activity kicks in, populate the EditText with the file content.
You will have to modify your code to handle that accordingly.
Just having that extra bit of information got you an answer.
Anytime the activity resumes, that's when you have to read the file thus updating the EditText. You may want to look into sticky service or better still foreground service.