Using RoboSpice in BroadcastReceiver

I would like to know if RoboSpice can be used in BroadcastReceiver and, if so, how should I handle the life cycle?

Now I just call spiceManager.start(context)in the method onReceive(Context, Intent), but the service never stops.

Gaetan

+4
source share
1 answer

Without knowing more, I would say that the best option is to call the SpiceManager shouldStop method at the end of processing in onReceive or when starting the request listener.

+1
source

Source: https://habr.com/ru/post/1534797/


All Articles