It worked out of the box for me! However, do not use it if you have alternatives, because public static members are not good unless they are final. You can create a static variable with a public scope in the service.
public static BackgroundService bs; @Override public void onCreate(){ bs=this;}
Then initialize the variable with 'this', which makes it a reference to the current current service. Use it as a link in your activities at any time.
source share