i have the following intent service :
public class BackGround extends IntentService {
Handler mhandler;
final static String NAME = "BackGround";
public BackGround(String name) {
super(NAME);
mhandler = new Handler();
}
public BackGround(){
super(NAME);
mhandler = new Handler();
}
@Override
protected void onHandleIntent(@Nullable Intent intent) {
Log.d("message","in intent service");//i don't get this message
}
}
and this is how i start it in MainActivity:
Intent intent = new Intent(MainActivity.this,BackGround.class);
startService(intent);
intent service doesn't start, i don't see the log message.