ServiceInitAlarme.java
727 Bytes
package com.example.martin.projetv5;
import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
/**
* Created by martin on 06/05/2017.
*/
public class ServiceInitAlarme extends Service {
Alarm alarm = new Alarm();
public void onCreate()
{
super.onCreate();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId)
{
String s = intent.getStringExtra("heure");
alarm.setAlarm(this,s);
return START_STICKY;
}
@Override
public IBinder onBind(Intent intent)
{
return null;
}
@Override
public void onDestroy(){
super.onDestroy();
}
}