I need a class that listens for some change in the application (or external change).
I made a class that extended from class Service
, however I realize that it enters the method onStartCommand
only once.
Am I doing something wrong?
@Override
public IBinder onBind(Intent arg0) {
return null;
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.e("--> ", "onStartCommand");
return START_STICKY;
}
@Override
public void onDestroy() {
super.onDestroy();
}