G
G
Grabblesaur2016-07-19 10:59:15
Android
Grabblesaur, 2016-07-19 10:59:15

How to properly organize the interaction between Service and Activity?

It is not entirely clear how and with what help to get data from the service (the service works with a local database)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
Oleg Gamega, 2016-07-19
@gadfi

I agree with IceJOKER, but for going to the database, I would recommend using something else
, for example, CursorLoader, it inherits from AsyncTaskLoader and, in conjunction with ContentProvider, brings very nice magic and excellent performance out of the box into our lives))
or if you don’t want to use the disgusting ContentProvider api, take a look towards rxjava

I
IceJOKER, 2016-07-19
@IceJOKER

https://developer.android.com/guide/components/ser...
you can also use broadcastreceiver
Listen to Oleg Gamega , good advice

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question