Servicio que ejecuta repetidamente un método, después de un período de tiempo.

Quiero crear un servicio, que ejecute un método después de 10 segundos una y otra vez, hasta que lo detenga, incluso si la aplicación está cerrada. Mi intento de código está debajo

package com.example.tauben;

import java.util.Timer;
import java.util.TimerTask;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class Reminder extends Service {


    @Override
    public IBinder onBind(Intent arg0) {
        return null;
    }

    @Override
    public void onCreate() {
        TimerTask task = new TimerTask() {
            public void run(){
                f();
            }
        };

        Timer timer = new Timer();
        timer.scheduleAtFixedRate(task, 0, 10000);
    }

    public void f(){
        Toast t = Toast.makeText(this, "Service is still running", Toast.LENGTH_SHORT);
        t.show();
   }

}

Y así es como empiezo el servicio.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    Log.d(Log_TAG,"_____________RESTART__________");

    Intent i= new Intent(this, Reminder.class);
    startService(i); 
}

El programa simplemente deja de ejecutarse inmediatamente; ¿Cómo puedo cambiar mi código para obtener el comportamiento deseado?

Respuestas a la pregunta(1)

Su respuesta a la pregunta