I start a background service from MainActivity
and as well as from Fragment
.
Will it create duplicate threads? So It will be 2 services running?
MainActivity
protected void onCreate(Bundle savedInstanceState) {
//...
context.startService(new Intent(context,gps_service.class));
//...
Fragment
public class FragmentThree extends Fragment {
//... Click method of the button calls
getActivity().startService(new Intent(getActivity(),gps_service.class));