Blame view

partieAndroid/codesJava/ServiceInitAlarme.java 727 Bytes
b8e00f52   martin.rohmer   mise à dispositio...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  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();

      }

  }