mirror of
https://github.com/balkian/Carrousel-Android.git
synced 2024-12-22 21:18:13 +00:00
I3: Tarea asincrona en el servicio
This commit is contained in:
parent
699f7e153c
commit
c45887f26e
@ -1,5 +1,8 @@
|
||||
package com.onirica.carrousel;
|
||||
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import android.app.Service;
|
||||
import android.content.Intent;
|
||||
import android.os.IBinder;
|
||||
@ -11,5 +14,18 @@ public class Results extends Service {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
@Override
|
||||
public void onCreate() {
|
||||
pollingTask task = new pollingTask();
|
||||
Timer timer = new Timer(true);
|
||||
timer.scheduleAtFixedRate(task, 0, 60000);
|
||||
}
|
||||
|
||||
private class pollingTask extends TimerTask {
|
||||
@Override
|
||||
public void run() {
|
||||
// Aqui descargaremos los resultados
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user