Android - bindService at fragment
Use
getActivity().bindService(params)
It requires a Context
start:
Intent intent = new Intent(getActivity(), OdometrService.class);
getActivity().bindService(intent, connection, Context.BIND_AUTO_CREATE);
stop:
getActivity().unbindService(connection);