1
0
mirror of https://github.com/balkian/Carrousel-Android.git synced 2025-03-14 18:16:58 +00:00

38 lines
807 B
Java
Raw Normal View History

2011-03-09 22:55:28 +01:00
package com.onirica.carrousel;
2011-03-09 23:01:20 +01:00
import java.util.Timer;
import java.util.TimerTask;
2011-03-09 22:55:28 +01:00
import android.app.Service;
import android.content.Intent;
import android.os.Binder;
2011-03-09 22:55:28 +01:00
import android.os.IBinder;
public class Results extends Service {
private final IBinder mBinder = new LocalBinder();
2011-03-09 22:55:28 +01:00
public class LocalBinder extends Binder {
Results getService() {
return Results.this;
}
}
2011-03-09 22:55:28 +01:00
@Override
public IBinder onBind(Intent arg0) {
return mBinder;
2011-03-09 22:55:28 +01:00
}
2011-03-09 23:01:20 +01:00
@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
}
}
2011-03-09 22:55:28 +01:00
}