Given:
- Two
Activity
A and B ; B starts from A , to A we return from B - In each activity on the fragment C. The fragment is the same in each activity.
- Fragments use the same
RoboSpice
service forRoboSpice
Internet. Run it ononStart
and stop ononStop
Problem:
When switching from one activation to another, the activated activation starts first and then the old one stops. Service service stops and its result is lost.
Possible solutions:
- Create different services for different activites.
- Check in
onStop
that we launched another activation, and not nailed by the system / are minimized by setting the flag in the activation, from which we launch another.
Question:
Both options invented by me are puffing on crutches . How better to do in this situation?