get system service from fragment code example Example: getsystemservice in fragment kotlin getActivity().getSystemService(Context.NAMEOF_SERVICE);