Groom  1.1
BTS SNIR LaSalle Avignon 2021
Référence de la classe com.example.groom.IHMGroom

L'activité principale de l'application Groom. Plus de détails...

Graphe de collaboration de com.example.groom.IHMGroom:
Collaboration graph

Fonctions membres publiques

boolean onCreateOptionsMenu (Menu menu)
 
boolean onOptionsItemSelected (MenuItem item)
 

Attributs publics statiques

static final String PREFERENCES = "groom"
 clé pour le titre du stockage Plus de détails...
 
static final String PREFERENCES_FONCTION = "FonctionOccupant"
 clé pour la fonction de l'occupant Plus de détails...
 
static final String PREFERENCES_NOM_OCCUPANT = "NomOccupant"
 clé pour le nom de l'occupant Plus de détails...
 
static final String PREFERENCES_PRENOM_OCCUPANT = "PrenomOccupant"
 clé pour le prénom de l'occupant Plus de détails...
 

Fonctions membres protégées

void onCreate (Bundle savedInstanceState)
 Méthode appelée à la création de l'activité Plus de détails...
 
void onDestroy ()
 Méthode appelée à la destruction de l'application (après onStop() et détruite par le système Android) Plus de détails...
 
void onPause ()
 Méthode appelée après qu'une boîte de dialogue s'est affichée (on reprend sur un onResume()) ou avant onStop() (activité plus visible) Plus de détails...
 
void onResume ()
 Méthode appelée après onStart() ou après onPause() Plus de détails...
 
void onStart ()
 Méthode appelée au démarrage après le onCreate() ou un restart après un onStop() Plus de détails...
 
void onStop ()
 Méthode appelée lorsque l'activité n'est plus visible. Plus de détails...
 

Fonctions membres privées

void activerPresence ()
 lorsque la présence est active, le bouton radio etat présence change en vert et informe qu'il y a une personne détecté Plus de détails...
 
void affichageActiverModePresence ()
 Changement fait lors de l'activation du mode présence. Plus de détails...
 
void affichageDesactiverModePresence ()
 Changement fait lors de la désactivation du mode présence. Plus de détails...
 
void afficherCloche ()
 Affichage de la cloche sur l'IHM lors de l'appui du bouton sonnette sur le module. Plus de détails...
 
void afficherConnexionGroom ()
 Actions à réaliser lorsque l'application est connectée. Plus de détails...
 
void afficherDeconnexionGroom ()
 Actions à réaliser lorsque l'application est déconnectée. Plus de détails...
 
void afficherErreur ()
 affiche une erreur avec l'ESP 32 Plus de détails...
 
void afficherEtatAbsent ()
 affiche l'état de l'ESP 32, ici il est absent Plus de détails...
 
void afficherEtatEntrer ()
 affiche l'état de l'ESP 32, ici il est entrer Plus de détails...
 
void afficherEtatLibre ()
 affiche l'état de l'ESP 32, ici il est libre Plus de détails...
 
void afficherEtatOccupe ()
 affiche l'état de l'ESP 32, ici il est occupe Plus de détails...
 
void afficherNotification ()
 affiche la notification dans la barre de notification Plus de détails...
 
void afficherPresenceActiveGroom ()
 affichage de la présence lorsqu'il y a quelqu'un Plus de détails...
 
void afficherPresenceDesactiveGroom ()
 affichage de la présence lorsqu'il n'y a personne Plus de détails...
 
void chargerCalendrier ()
 Affichage du calendrier google via une WebView. Plus de détails...
 
void desactiverPresence ()
 lorsque la présence est désactive, le bouton radio etat presence change en rouge et informe qu'il y a personne de détecté Plus de détails...
 
void initialiserEtatGroom ()
 Récupère l'état affiché sur le module à la connexion. Plus de détails...
 
void initialiserListeGroom ()
 Initialise la liste des périphériques Groom. Plus de détails...
 
void initialiserSystemeNotification ()
 initialiser la notification Plus de détails...
 
void initialiserWidgets ()
 Initialise les widgets de l'IHM. Plus de détails...
 
void modifierOccupant ()
 Gère la boîte de dialogue permettant de modifier les information de l'occupant. Plus de détails...
 
void modifierUrl ()
 
void recupererInformationsOccupant ()
 Récupère et crée l'objet occupant avec les informations stockées localement. Plus de détails...
 

Attributs privés

Button boutonAjoutOccupant
 bouton ajout d'un occupant Plus de détails...
 
Button boutonAjoutUrl
 
Button boutonConnexion
 bouton de connexion Plus de détails...
 
Button boutonEntrer
 bouton pour choisir l'etat entrer Plus de détails...
 
Button boutonEnvoieOccupant
 bouton d'envoie du nom prenom et fonction de l'occupant Plus de détails...
 
Button boutonPresence
 activation/desactivation du mode de presence Plus de détails...
 
RadioButton boutonRadioAbsent
 boton pour choisir l'etat absent Plus de détails...
 
RadioButton boutonRadioActivationPresence
 affichage de l'etat du mode de presence Plus de détails...
 
RadioButton boutonRadioEtatPresence
 affichage de la presence a l'entree Plus de détails...
 
RadioButton boutonRadioLibre
 bouton pour choisir l'etat libre Plus de détails...
 
RadioButton boutonRadioOccupe
 bouton pour choisir l'etat occupe Plus de détails...
 
Button boutonSonnette
 bouton pour activer/desactiver le mode sonnette Plus de détails...
 
int choixGroom = -1
 
CommunicationGroom communicationGroom = null
 
Button envoyerMessageOccupant
 bouton d'envoie du message Plus de détails...
 
RadioButton etatConnexion
 affichage de la connexion Plus de détails...
 
int etatModeDetecteur
 etat du mode de detection Plus de détails...
 
int etatModeSonnette
 etat du mode de la sonnette Plus de détails...
 
int etatOccupant
 etat de l'occupant Plus de détails...
 
String fonctionOccupant
 fonction de l'occupant Plus de détails...
 
final Handler handler
 Gère les messages avec le thread CommunicationGroom. Plus de détails...
 
ImageView imageClochette
 image pour afficher la notification d'un visiteur qui sonne Plus de détails...
 
ImageView imagePresence
 image pour afficher la notification d'un visiteur qui est détecté Plus de détails...
 
View layout
 
Spinner listeAppareilsBluetooth
 Affichage du peripherique actuellement et anciennement connecte. Plus de détails...
 
AlertDialog.Builder modificationOccupant
 Fenêtre de dialogue pour modifier un. Plus de détails...
 
AlertDialog.Builder modificationUrl
 
String nomOccupant
 nom de l'occupant Plus de détails...
 
NotificationManager notificationManager = null
 
String nouvelUrl
 modification de l'URL pour l'agenda Plus de détails...
 
int numeroNotification = 1
 
Occupant occupant
 constructeur occupant Plus de détails...
 
String prenomOccupant
 prenom de l'occupant Plus de détails...
 
EditText texteMessageOccupant
 zone ou entrer le message personnel Plus de détails...
 
EditText texteNomFonction
 
TextView texteNomOccupant
 texte montrant le nom de l'occupant Plus de détails...
 
TextView titreConnexion
 titre pour indiquer la zone de connexion Plus de détails...
 
TextView titreEtat
 titre pour indiquer la zone des etats de l'occupant du bureau Plus de détails...
 
TextView titreMessageOccupant
 titre pour indiquer la zone du message occupant Plus de détails...
 
Toast toast
 

Attributs privés statiques

static final int DETECTEUR_OFF = 0
 Etat detecteur eteinte. Plus de détails...
 
static final int DETECTEUR_ON = 1
 Etat detecteur allumee. Plus de détails...
 
static final int ETAT_ABSENT = 1
 L'état Absent. Plus de détails...
 
static final int ETAT_ENTRER = 3
 L'état entrer. Plus de détails...
 
static final int ETAT_LIBRE = 0
 L'état Libre. Plus de détails...
 
static final int ETAT_OCCUPE = 2
 L'état Occupe. Plus de détails...
 
static final String messageSonnette = "On sonne à l'entrée !"
 
static final int SONNETTE_OFF = 0
 Etat sonnette eteinte. Plus de détails...
 
static final int SONNETTE_ON = 1
 Etat sonnette allumee. Plus de détails...
 
static final String TAG = "_IHMGroom"
 TAG pour les logs. Plus de détails...
 

Description détaillée

L'activité principale de l'application Groom.

Définition à la ligne 60 du fichier IHMGroom.java.

Documentation des fonctions membres

◆ activerPresence()

void com.example.groom.IHMGroom.activerPresence ( )
private

lorsque la présence est active, le bouton radio etat présence change en vert et informe qu'il y a une personne détecté

Définition à la ligne 877 du fichier IHMGroom.java.

878  {
879  boutonRadioEtatPresence.setText("Il y a quelqu'un à l'entrée !");
880  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
881  {
882  boutonRadioEtatPresence.setButtonTintList(ContextCompat.getColorStateList(this, R.color.vert));
883  }
884  LayoutInflater inflater = this.getLayoutInflater();
885 
886  layout = inflater.inflate(R.layout.toast_presence, findViewById(R.id.layout_toast_presence));
887  // TextView in layout_custom_toast.
888  imagePresence = (ImageView) findViewById(R.id.imagePresence);
889  // Create Toast
890  toast = new Toast(getApplicationContext());
891  toast.setDuration(Toast.LENGTH_LONG);
892  toast.setGravity(Gravity.TOP,-130,280);
893  toast.setView(layout);
894  toast.show();
895 
896  }

◆ affichageActiverModePresence()

void com.example.groom.IHMGroom.affichageActiverModePresence ( )
private

Changement fait lors de l'activation du mode présence.

Définition à la ligne 926 du fichier IHMGroom.java.

927  {
928  //Log.d(TAG, "affichageActiverModePresence()");
929  boutonRadioActivationPresence.setText("Activé");
930  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
931  {
932  boutonRadioActivationPresence.setButtonTintList(ContextCompat.getColorStateList(this, R.color.vert));
933  }
934  }

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ affichageDesactiverModePresence()

void com.example.groom.IHMGroom.affichageDesactiverModePresence ( )
private

Changement fait lors de la désactivation du mode présence.

Définition à la ligne 913 du fichier IHMGroom.java.

914  {
915  //Log.d(TAG, "affichageDesactiverModePresence()");
916  boutonRadioActivationPresence.setText("Désactivé");
917  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
918  {
919  boutonRadioActivationPresence.setButtonTintList(ContextCompat.getColorStateList(this, R.color.rouge));
920  }
921  }

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ afficherCloche()

void com.example.groom.IHMGroom.afficherCloche ( )
private

Affichage de la cloche sur l'IHM lors de l'appui du bouton sonnette sur le module.

Définition à la ligne 939 du fichier IHMGroom.java.

940  {
941  LayoutInflater inflater = this.getLayoutInflater();
942 
943  layout = inflater.inflate(R.layout.toast_image, findViewById(R.id.layout_image_clochette));
944  // TextView in layout_custom_toast.
945  imageClochette = (ImageView) findViewById(R.id.imageClochette);
946  // Create Toast
947  toast = new Toast(getApplicationContext());
948  toast.setDuration(Toast.LENGTH_LONG);
949  toast.setGravity(Gravity.RIGHT,100,-30);
950  toast.setView(layout);
951  toast.show();
952  }

◆ afficherConnexionGroom()

void com.example.groom.IHMGroom.afficherConnexionGroom ( )
private

Actions à réaliser lorsque l'application est connectée.

Définition à la ligne 1021 du fichier IHMGroom.java.

1022  {
1023  Log.d(TAG, "afficherConnexionGroom()");
1024 
1025  listeAppareilsBluetooth.setEnabled(false);
1026  boutonConnexion.setEnabled(true);
1027  boutonConnexion.setText("Déconnecter");
1028  etatConnexion.setText("Connecté");
1029  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
1030  {
1031  etatConnexion.setButtonTintList(ContextCompat.getColorStateList(this, R.color.vert));
1032  }
1033  boutonRadioLibre.setEnabled(true);
1034  boutonRadioAbsent.setEnabled(true);
1035  boutonRadioOccupe.setEnabled(true);
1036  boutonEntrer.setEnabled(true);
1037  boutonSonnette.setEnabled(false);
1038  boutonAjoutOccupant.setEnabled(true);
1039  envoyerMessageOccupant.setEnabled(true);
1040  texteMessageOccupant.setEnabled(true);
1041  boutonEnvoieOccupant.setEnabled(true);
1042  boutonEnvoieOccupant.setEnabled(true);
1043  boutonPresence.setEnabled(true);
1044  boutonSonnette.setText("Activer Sonnette");
1045  }

◆ afficherDeconnexionGroom()

void com.example.groom.IHMGroom.afficherDeconnexionGroom ( )
private

Actions à réaliser lorsque l'application est déconnectée.

Définition à la ligne 977 du fichier IHMGroom.java.

978  {
979  Log.d(TAG, "afficherDeconnexionGroom()");
980 
981  if(CommunicationGroom.getListeGrooms().size() > 0)
982  {
983  choixGroom = (int)listeAppareilsBluetooth.getSelectedItemId();
984  communicationGroom = new CommunicationGroom(CommunicationGroom.getListeGrooms().get((int)listeAppareilsBluetooth.getSelectedItemId()), handler);
985  boutonConnexion.setEnabled(true);
986  listeAppareilsBluetooth.setEnabled(true);
987  }
988  else
989  {
990  boutonConnexion.setEnabled(false);
991  listeAppareilsBluetooth.setEnabled(false);
992  }
993 
994  boutonConnexion.setText("Connecter");
995  etatConnexion.setText("Déconnecté");
996  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
997  {
998  etatConnexion.setButtonTintList(ContextCompat.getColorStateList(this, R.color.rouge));
999  }
1000  boutonRadioLibre.setEnabled(false);
1001  boutonRadioAbsent.setEnabled(false);
1002  boutonRadioOccupe.setEnabled(false);
1003  boutonEntrer.setEnabled(false);
1004  boutonSonnette.setEnabled(false);
1005  boutonAjoutOccupant.setEnabled(true);
1006  envoyerMessageOccupant.setEnabled(false);
1007  texteMessageOccupant.setEnabled(false);
1008  boutonEnvoieOccupant.setEnabled(true);
1009  boutonEnvoieOccupant.setEnabled(false);
1010  boutonPresence.setEnabled(false);
1012  boutonSonnette.setText("Activer Sonnette");
1013  boutonRadioAbsent.setChecked(false);
1014  boutonRadioOccupe.setChecked(false);
1015  boutonRadioLibre.setChecked(false);
1016  }

Références com.example.groom.CommunicationGroom.getListeGrooms().

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ afficherErreur()

void com.example.groom.IHMGroom.afficherErreur ( )
private

affiche une erreur avec l'ESP 32

Définition à la ligne 762 du fichier IHMGroom.java.

763  {
764  Context context = getApplicationContext();
765  CharSequence text = "Erreur communication !\nVérifier l'appairage et le branchement du groom.";
766  int duration = Toast.LENGTH_LONG;
767  Toast toast = Toast.makeText(context, text, duration);
768  toast.show();
769  toast.setGravity(Gravity.LEFT,600,-600);
770  }

◆ afficherEtatAbsent()

void com.example.groom.IHMGroom.afficherEtatAbsent ( )
private

affiche l'état de l'ESP 32, ici il est absent

Définition à la ligne 801 du fichier IHMGroom.java.

802  {
803  Context context = getApplicationContext();
804  CharSequence text = "Absent !";
805  int duration = Toast.LENGTH_SHORT;
806  Toast toast = Toast.makeText(context, text, duration);
807  toast.show();
808  toast.setGravity(Gravity.LEFT,300,0);
809  }

◆ afficherEtatEntrer()

void com.example.groom.IHMGroom.afficherEtatEntrer ( )
private

affiche l'état de l'ESP 32, ici il est entrer

Définition à la ligne 814 du fichier IHMGroom.java.

815  {
816  Context context = getApplicationContext();
817  CharSequence text = "Entrer !";
818  int duration = Toast.LENGTH_SHORT;
819  Toast toast = Toast.makeText(context, text, duration);
820  toast.show();
821  }

◆ afficherEtatLibre()

void com.example.groom.IHMGroom.afficherEtatLibre ( )
private

affiche l'état de l'ESP 32, ici il est libre

Définition à la ligne 775 du fichier IHMGroom.java.

776  {
777  Context context = getApplicationContext();
778  CharSequence text = "Libre !";
779  int duration = Toast.LENGTH_LONG;
780  Toast toast = Toast.makeText(context, text, duration);
781  toast.show();
782  toast.setGravity(Gravity.LEFT,300,-150);
783  }

◆ afficherEtatOccupe()

void com.example.groom.IHMGroom.afficherEtatOccupe ( )
private

affiche l'état de l'ESP 32, ici il est occupe

Définition à la ligne 788 du fichier IHMGroom.java.

789  {
790  Context context = getApplicationContext();
791  CharSequence text = "Occupé !";
792  int duration = Toast.LENGTH_LONG;
793  Toast toast = Toast.makeText(context, text, duration);
794  toast.show();
795  toast.setGravity(Gravity.LEFT,300,-70);
796  }

◆ afficherNotification()

void com.example.groom.IHMGroom.afficherNotification ( )
private

affiche la notification dans la barre de notification

Définition à la ligne 835 du fichier IHMGroom.java.

836  {
837  CharSequence name = getString(R.string.app_name);
838  String description = "Gestion GROOM";
839  int importance = NotificationManager.IMPORTANCE_DEFAULT;
840  NotificationChannel channel = new NotificationChannel("GROOM", name, importance);
841  channel.setDescription(description);
842  notificationManager.createNotificationChannel(channel);
843 
844  // On définit le titre de la notification
845  String titreNotification = getString(R.string.app_name);
846  Log.d(TAG, "afficherNotification() titre = " + titreNotification + " - message = " + messageSonnette + " - numeroNotification = " + numeroNotification);
847 
848  // On crée la notification
849  NotificationCompat.Builder notification = new NotificationCompat.Builder(this, "GROOM")
850  .setSmallIcon(R.mipmap.ic_launcher)
851  .setContentTitle(titreNotification)
852  .setContentText(messageSonnette)
853  .setPriority(NotificationCompat.PRIORITY_DEFAULT);
854 
855  PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, new Intent(), PendingIntent.FLAG_UPDATE_CURRENT);
856  notification.setContentIntent(pendingIntent);
857  notification.setAutoCancel(true);
858 
859  // On affiche la notification
860  notificationManager.notify(numeroNotification++, notification.build());
861  }

◆ afficherPresenceActiveGroom()

void com.example.groom.IHMGroom.afficherPresenceActiveGroom ( )
private

affichage de la présence lorsqu'il y a quelqu'un

Définition à la ligne 965 du fichier IHMGroom.java.

966  {
967  boutonPresence.setText("Désactiver");
968  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
969  {
970  boutonRadioActivationPresence.setButtonTintList(ContextCompat.getColorStateList(this, R.color.vert));
971  }
972  }

◆ afficherPresenceDesactiveGroom()

void com.example.groom.IHMGroom.afficherPresenceDesactiveGroom ( )
private

affichage de la présence lorsqu'il n'y a personne

Définition à la ligne 957 du fichier IHMGroom.java.

958  {
959  boutonPresence.setText("Activer");
960  }

◆ chargerCalendrier()

void com.example.groom.IHMGroom.chargerCalendrier ( )
private

Affichage du calendrier google via une WebView.

Définition à la ligne 1050 du fichier IHMGroom.java.

1051  {
1052  WebView myWebView = (WebView) findViewById(R.id.calendrierGroom);
1053  WebSettings webSettings = myWebView.getSettings();
1054  webSettings.setJavaScriptEnabled(true);
1055 
1056  String unencodedHtml = "<iframe src=\"https://calendar.google.com/calendar/embed?src=robertutilisateur84%40gmail.com&ctz=Europe%2FParis\" style=\"border: 0\" width=\"760\" height=\"495\" frameborder=\"0\" scrolling=\"no\"></iframe>";;
1057  String encodedHtml = Base64.encodeToString(unencodedHtml.getBytes(), Base64.NO_PADDING);
1058  myWebView.loadData(encodedHtml, "text/html", "base64");
1059  if(WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK))
1060  {
1061  WebSettingsCompat.setForceDark(myWebView.getSettings(), WebSettingsCompat.FORCE_DARK_ON);
1062  }
1063 
1064  new CountDownTimer(300000, 1000)
1065  {
1066  public void onTick(long millisUntilFinished)
1067  {
1068  }
1069  public void onFinish()
1070  {
1071  String encodedHtml = Base64.encodeToString(nouvelUrl.getBytes(), Base64.NO_PADDING);
1072  myWebView.loadData(encodedHtml, "text/html", "base64");
1073  if(WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK))
1074  {
1075  WebSettingsCompat.setForceDark(myWebView.getSettings(), WebSettingsCompat.FORCE_DARK_ON);
1076  }
1077  this.start();
1078  }
1079  }.start();
1080  }

Référencé par com.example.groom.IHMGroom.onCreate().

◆ desactiverPresence()

void com.example.groom.IHMGroom.desactiverPresence ( )
private

lorsque la présence est désactive, le bouton radio etat presence change en rouge et informe qu'il y a personne de détecté

Définition à la ligne 901 du fichier IHMGroom.java.

902  {
903  boutonRadioEtatPresence.setText("Il n'y a personne à l'entrée");
904  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
905  {
906  boutonRadioEtatPresence.setButtonTintList(ContextCompat.getColorStateList(this, R.color.rouge));
907  }
908  }

◆ initialiserEtatGroom()

void com.example.groom.IHMGroom.initialiserEtatGroom ( )
private

Récupère l'état affiché sur le module à la connexion.

Définition à la ligne 868 du fichier IHMGroom.java.

869  {
870  if(communicationGroom != null)
871  communicationGroom.envoyer("$ETAT\r\n");
872  }

◆ initialiserListeGroom()

void com.example.groom.IHMGroom.initialiserListeGroom ( )
private

Initialise la liste des périphériques Groom.

Définition à la ligne 468 du fichier IHMGroom.java.

469  {
470  ArrayList<String> listePeripheriques = new ArrayList<String>();
471  for (BluetoothDevice device : CommunicationGroom.getListeGrooms())
472  {
473  listePeripheriques.add(device.getName());
474  }
475  ArrayAdapter<String> adapter = new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_spinner_item, listePeripheriques);
476 
477  listeAppareilsBluetooth.setAdapter(adapter);
478  listeAppareilsBluetooth.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener()
479  {
480  @Override
481  public void onItemSelected(AdapterView<?> parent, View view, int position, long id)
482  {
483  Log.d(TAG, "onItemSelected() position : " + position + " -> " + CommunicationGroom.getListeGrooms().get(position).getName() + " [" + CommunicationGroom.getListeGrooms().get(position).getAddress() + "]");
484  if(choixGroom != position)
485  {
486  choixGroom = position;
487  communicationGroom = new CommunicationGroom(CommunicationGroom.getListeGrooms().get(position), handler);
488  }
489  }
490 
491  @Override
492  public void onNothingSelected(AdapterView<?> parent)
493  {
494 
495  }
496  });
497  }

Références com.example.groom.CommunicationGroom.getListeGrooms(), et com.example.groom.IHMGroom.listeAppareilsBluetooth.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ initialiserSystemeNotification()

void com.example.groom.IHMGroom.initialiserSystemeNotification ( )
private

initialiser la notification

Définition à la ligne 826 du fichier IHMGroom.java.

827  {
828  // On crée un "gestionnaire de notification"
829  notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
830  }

Référencé par com.example.groom.IHMGroom.onCreate().

◆ initialiserWidgets()

void com.example.groom.IHMGroom.initialiserWidgets ( )
private

Initialise les widgets de l'IHM.

Définition à la ligne 251 du fichier IHMGroom.java.

252  {
253  titreConnexion = (TextView) findViewById(R.id.titreConnexion);
254  texteNomOccupant = (TextView) findViewById(R.id.texteNomOccupant);
255  listeAppareilsBluetooth = (Spinner) findViewById(R.id.listeAppareilsBluetooth);
256 
257  boutonConnexion = (Button) findViewById(R.id.boutonConnexion);
258  boutonConnexion.setOnClickListener(new View.OnClickListener()
259  {
260  @Override
261  public void onClick(View v)
262  {
263  Log.d(TAG, "onClick() boutonConnexion : " + boutonConnexion.getText().toString());
264  if(boutonConnexion.getText().toString().equals("Connecter"))
265  {
266  if(communicationGroom != null)
267  {
269  }
270  }
271  else
272  {
273  if(communicationGroom != null)
274  {
276  }
277  }
278  }
279  });
280  etatConnexion = (RadioButton) findViewById(R.id.etatConnexion);
281 
282  boutonAjoutOccupant = (Button) findViewById(R.id.boutonAjoutOccupant);
283  boutonAjoutOccupant.setOnClickListener(new View.OnClickListener()
284  {
285  @Override
286  public void onClick(View v)
287  {
288  Log.d(TAG, "onClick() boutonAjoutOccupant");
290  }
291  });
292  boutonEnvoieOccupant = (Button) findViewById(R.id.boutonEnvoieOccupant);
293  boutonEnvoieOccupant.setOnClickListener(new View.OnClickListener()
294  {
295  @Override
296  public void onClick(View v)
297  {
298  if(communicationGroom != null)
299  communicationGroom.envoyer("$AFFICHAGE;" + occupant.getNom() + ";" + occupant.getPrenom() + ";" + occupant.getFonction() + "\r\n");
300  Log.d(TAG, "onClick() boutonEnvoieOccupant");
301  }
302  });
303  texteNomFonction = (EditText) findViewById(R.id.texteNomFonction);
304  if(!occupant.getNom().isEmpty())
305  texteNomFonction.setText(occupant.getNom() + " " + occupant.getPrenom() + " - " + occupant.getFonction());
306  texteNomFonction.setEnabled(false);
307 
308  // zoneMessageOccupant
309  titreMessageOccupant = (TextView) findViewById(R.id.titreMessageOccupant);
310  texteMessageOccupant = (EditText) findViewById(R.id.texteMessageOccupant);
311  envoyerMessageOccupant = (Button) findViewById(R.id.envoyerMessageOccupant);
312  envoyerMessageOccupant.setOnClickListener(new View.OnClickListener()
313  {
314  @Override
315  public void onClick(View v)
316  {
317  if(communicationGroom != null)
318  communicationGroom.envoyer("$MSGPERSO;" + texteMessageOccupant.getText() + "\r\n");
319  Log.d(TAG, "onClick() envoyerMessageOccupant");
320  }
321  });
322 
323  // zoneEtat
324  titreEtat = (TextView) findViewById(R.id.titreEtat);
325  boutonRadioLibre = (RadioButton) findViewById(R.id.boutonRadioLibre);
326  boutonRadioLibre.setOnClickListener(new View.OnClickListener()
327  {
328  @Override
329  public void onClick(View v)
330  {
331  Log.d(TAG, "onClick() boutonRadioLibre");
333  if(communicationGroom != null)
334  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
335  boutonSonnette.setEnabled(true);
336  boutonPresence.setEnabled(true);
337  }
338  });
339  boutonRadioOccupe = (RadioButton) findViewById(R.id.boutonRadioOccupe);
340  boutonRadioOccupe.setOnClickListener(new View.OnClickListener()
341  {
342  @Override
343  public void onClick(View v)
344  {
345  Log.d(TAG, "onClick() boutonRadioOccupe");
348  boutonSonnette.setEnabled(false);
349  boutonPresence.setEnabled(true);
350  boutonSonnette.setText("Activer Sonnette");
351  if(communicationGroom != null)
352  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
353  }
354  });
355  boutonRadioAbsent = (RadioButton) findViewById(R.id.boutonRadioAbsent);
356  boutonRadioAbsent.setOnClickListener(new View.OnClickListener()
357  {
358  @Override
359  public void onClick(View v)
360  {
361  Log.d(TAG, "onClick() boutonRadioAbsent");
365  boutonPresence.setText("Activer");
367  boutonPresence.setEnabled(false);
368  boutonSonnette.setEnabled(false);
369  boutonSonnette.setText("Activer Sonnette");
370  if(communicationGroom != null)
371  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
372  }
373  });
374 
375  // zoneEntrerSonnette
376  boutonEntrer = (Button) findViewById(R.id.boutonEntrer);
377  boutonEntrer.setOnClickListener(new View.OnClickListener()
378  {
379  @Override
380  public void onClick(View v)
381  {
382  Log.d(TAG, "onClick() boutonEntrer");
385  if(communicationGroom != null)
386  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
387  boutonSonnette.setEnabled(false);
388  boutonSonnette.setText("Activer Sonnette");
389  }
390  });
391  boutonSonnette = (Button) findViewById(R.id.boutonSonnette);
392  boutonSonnette.setOnClickListener(new View.OnClickListener()
393  {
394  @Override
395  public void onClick(View v)
396  {
397  if(boutonSonnette.getText().toString().equals("Activer Sonnette"))
398  {
399  Log.d(TAG, "onClick() boutonSonnette");
402  boutonSonnette.setText("Désactiver Sonnette");
403  if(communicationGroom != null)
404  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
405  }
406  else
407  {
408  Log.d(TAG, "onClick() boutonSonnette");
411  boutonSonnette.setText("Activer Sonnette");
412  if(communicationGroom != null)
413  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
414  }
415  }
416  });
417 
418  // Donne le focus
419  boutonSonnette.setFocusableInTouchMode(true);
420  boutonSonnette.requestFocus();
421 
422  boutonPresence= (Button) findViewById(R.id.boutonPresence);
423  boutonPresence.setOnClickListener(new View.OnClickListener(){
424  public void onClick(View v)
425  {
426  Log.d(TAG, "onClick() boutonPresence :" + boutonPresence.getText().toString());
427  if(boutonPresence.getText().toString().equals("Desactiver"))
428  {
430  boutonPresence.setText("Activer");
432  if(communicationGroom != null)
433  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
434  }
435  else
436  {
438  boutonPresence.setText("Désactiver");
440  if(communicationGroom != null)
441  communicationGroom.envoyer("$CMD;" + etatOccupant + ";" + etatModeSonnette + ";" + etatModeDetecteur + "\r\n");
442  }
443  }
444  });
445 
446  boutonRadioActivationPresence = (RadioButton) findViewById(R.id.boutonRadioActivationPresence);
447  boutonRadioEtatPresence = (RadioButton) findViewById(R.id.boutonRadioEtatPresence);
448 
449  boutonAjoutUrl = (Button) findViewById(R.id.boutonAjoutUrl);
450  boutonAjoutUrl.setOnClickListener(new View.OnClickListener()
451  {
452  @Override
453  public void onClick(View v)
454  {
455  Log.d(TAG, "onClick() boutonAjoutUrl");
456  modifierUrl();
457  }
458  });
459 
461 
463  }

Références com.example.groom.IHMGroom.affichageActiverModePresence(), com.example.groom.IHMGroom.affichageDesactiverModePresence(), com.example.groom.IHMGroom.afficherDeconnexionGroom(), com.example.groom.IHMGroom.boutonAjoutOccupant, com.example.groom.IHMGroom.boutonAjoutUrl, com.example.groom.IHMGroom.boutonConnexion, com.example.groom.IHMGroom.boutonEntrer, com.example.groom.IHMGroom.boutonEnvoieOccupant, com.example.groom.IHMGroom.boutonPresence, com.example.groom.IHMGroom.boutonRadioAbsent, com.example.groom.IHMGroom.boutonRadioActivationPresence, com.example.groom.IHMGroom.boutonRadioEtatPresence, com.example.groom.IHMGroom.boutonRadioLibre, com.example.groom.IHMGroom.boutonRadioOccupe, com.example.groom.IHMGroom.boutonSonnette, com.example.groom.IHMGroom.communicationGroom, com.example.groom.CommunicationGroom.connecter(), com.example.groom.CommunicationGroom.deconnecter(), com.example.groom.IHMGroom.DETECTEUR_OFF, com.example.groom.IHMGroom.DETECTEUR_ON, com.example.groom.CommunicationGroom.envoyer(), com.example.groom.IHMGroom.envoyerMessageOccupant, com.example.groom.IHMGroom.ETAT_ABSENT, com.example.groom.IHMGroom.ETAT_ENTRER, com.example.groom.IHMGroom.ETAT_LIBRE, com.example.groom.IHMGroom.ETAT_OCCUPE, com.example.groom.IHMGroom.etatConnexion, com.example.groom.IHMGroom.etatModeDetecteur, com.example.groom.IHMGroom.etatModeSonnette, com.example.groom.IHMGroom.etatOccupant, com.example.groom.Occupant.getFonction(), com.example.groom.Occupant.getNom(), com.example.groom.Occupant.getPrenom(), com.example.groom.IHMGroom.initialiserListeGroom(), com.example.groom.IHMGroom.listeAppareilsBluetooth, com.example.groom.IHMGroom.modifierOccupant(), com.example.groom.IHMGroom.modifierUrl(), com.example.groom.IHMGroom.occupant, com.example.groom.IHMGroom.SONNETTE_OFF, com.example.groom.IHMGroom.SONNETTE_ON, com.example.groom.IHMGroom.TAG, com.example.groom.IHMGroom.texteMessageOccupant, com.example.groom.IHMGroom.texteNomFonction, com.example.groom.IHMGroom.texteNomOccupant, com.example.groom.IHMGroom.titreConnexion, com.example.groom.IHMGroom.titreEtat, et com.example.groom.IHMGroom.titreMessageOccupant.

Référencé par com.example.groom.IHMGroom.onCreate().

◆ modifierOccupant()

void com.example.groom.IHMGroom.modifierOccupant ( )
private

Gère la boîte de dialogue permettant de modifier les information de l'occupant.

Définition à la ligne 502 du fichier IHMGroom.java.

503  {
504  Log.d(TAG, "modifierOccupant()");
505  modificationOccupant = new AlertDialog.Builder(this);
506 
507  modificationOccupant.setTitle("GROOM");
508  modificationOccupant.setMessage("Modifier les informations de l'occupannt : ");
509  //dialogueModificationOccupant.setView(R.layout.dialogue_modification_occupant);
510  // ou :
511  LayoutInflater factory = LayoutInflater.from(this);
512  final View ajoutJoueurView = factory.inflate(R.layout.dialogue_modification_occupant, null);
513  modificationOccupant.setView(ajoutJoueurView);
514 
515  modificationOccupant.setPositiveButton("Modifier", new DialogInterface.OnClickListener()
516  {
517  @Override
518  public void onClick(DialogInterface dialog, int which)
519  {
520  // Récupère les informations saisies
521  EditText editNomOccupant =
522  (EditText) ((AlertDialog) dialog).findViewById(R.id.nomOccupant);
523  EditText editPrenomOccupant =
524  (EditText) ((AlertDialog) dialog).findViewById(R.id.prenomOccupant);
525  EditText editFonctionOccupant =
526  (EditText) ((AlertDialog) dialog).findViewById(R.id.fonctionOccupant);
527  Log.v(TAG,
528  "Modification occupant : " + "Nom = " + editNomOccupant.getText().toString() + " - " + "Prénom = " + editPrenomOccupant.getText().toString() + " - " + "Fonction = " + editFonctionOccupant.getText().toString());
529 
530  // Modifie et affiche les nouvelles informations de l'occupant
531  occupant.setNom(editNomOccupant.getText().toString());
532  occupant.setPrenom(editPrenomOccupant.getText().toString());
533  occupant.setFonction(editFonctionOccupant.getText().toString());
534  texteNomFonction.setText(occupant.getNom() + " " + occupant.getPrenom() + " - " + occupant.getFonction());
535 
536  // On sauvegarde localement les nouvelles informations d l'occupant
537  sharedPreferences.edit().putString(PREFERENCES_NOM_OCCUPANT, occupant.getNom()).apply(); // ou .commit()
538  sharedPreferences.edit().putString(PREFERENCES_PRENOM_OCCUPANT, occupant.getPrenom()).apply();
539  sharedPreferences.edit().putString(PREFERENCES_FONCTION, occupant.getFonction()).apply();
540  }
541  });
542  modificationOccupant.setNegativeButton("Annuler", new DialogInterface.OnClickListener()
543  {
544  @Override
545  public void onClick(DialogInterface dialog, int which)
546  {
547  }
548  });
549 
550  AlertDialog dialogueModificationOccupant = modificationOccupant.create();
551  dialogueModificationOccupant.show();
552 
553  // Affiche les informations actuelles de l'occupant
554  EditText nom =
555  (EditText) ((AlertDialog) dialogueModificationOccupant).findViewById(R.id.nomOccupant);
556  nom.setText(occupant.getNom());
557  EditText prenom =
558  (EditText) ((AlertDialog) dialogueModificationOccupant).findViewById(R.id.prenomOccupant);
559  prenom.setText(occupant.getPrenom());
560  EditText fonction =
561  (EditText) ((AlertDialog) dialogueModificationOccupant).findViewById(R.id.fonctionOccupant);
562  fonction.setText(occupant.getFonction());
563 
564  }

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ modifierUrl()

void com.example.groom.IHMGroom.modifierUrl ( )
private

Définition à la ligne 566 du fichier IHMGroom.java.

567  {
568  Log.d(TAG, "modifierUrl()");
569  modificationUrl = new AlertDialog.Builder(this);
570 
571  modificationUrl.setTitle("GROOM");
572  modificationUrl.setMessage("Modifier l'agenda");
573  //dialogueModificationUrl.setView(R.layout.dialogue_modification_calendrier);
574  // ou :
575  LayoutInflater factory = LayoutInflater.from(this);
576  final View ajoutModificationUrlView = factory.inflate(R.layout.dialogue_modification_calendrier, null);
577  modificationUrl.setView(ajoutModificationUrlView);
578 
579  modificationUrl.setPositiveButton("Modifier", new DialogInterface.OnClickListener()
580  {
581  @Override
582  public void onClick(DialogInterface dialog, int which)
583  {
584  // Récupère les informations saisies
585  EditText editEntreeUrl =
586  (EditText) ((AlertDialog) dialog).findViewById(R.id.entreeUrl);
587 
588  editEntreeUrl.getText().toString();
589 
590  nouvelUrl = editEntreeUrl.getText().toString();
591 
592  WebView myWebView = (WebView) findViewById(R.id.calendrierGroom);
593  WebSettings webSettings = myWebView.getSettings();
594  webSettings.setJavaScriptEnabled(true);
595 
596  String unencodedHtml = nouvelUrl;
597  String encodedHtml = Base64.encodeToString(unencodedHtml.getBytes(), Base64.NO_PADDING);
598  myWebView.loadData(encodedHtml, "text/html", "base64");
599  if(WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK))
600  {
601  WebSettingsCompat.setForceDark(myWebView.getSettings(), WebSettingsCompat.FORCE_DARK_ON);
602  }
603  }
604  });
605  modificationUrl.setNegativeButton("Annuler", new DialogInterface.OnClickListener()
606  {
607  @Override
608  public void onClick(DialogInterface dialog, int which)
609  {
610  }
611  });
612 
613  AlertDialog dialogueModificationUrl = modificationUrl.create();
614  dialogueModificationUrl.show();
615 
616  }

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ onCreate()

void com.example.groom.IHMGroom.onCreate ( Bundle  savedInstanceState)
protected

Méthode appelée à la création de l'activité

Définition à la ligne 140 du fichier IHMGroom.java.

141  {
142  super.onCreate(savedInstanceState);
143  setContentView(R.layout.activity_main);
144  Log.d(TAG, "onCreate()");
145  //Log.d(TAG, "version API = " + Build.VERSION.SDK_INT);
146 
147  setTitle(getString(R.string.app_name) + " v" + BuildConfig.VERSION_NAME);
148 
149  // Pour le stockage local des informations sur l'occupant
150  sharedPreferences = getBaseContext().getSharedPreferences(PREFERENCES, MODE_PRIVATE);
151 
153 
155 
157 
158  //etatOccupant = ETAT_ABSENT;
161 
162  Toolbar toolbar = findViewById(R.id.toolbar);
163  setSupportActionBar(toolbar);
164 
165  nouvelUrl = "<iframe src=\"https://calendar.google.com/calendar/embed?src=robertutilisateur84%40gmail.com&ctz=Europe%2FParis\" style=\"border: 0\" width=\"760\" height=\"500\" frameborder=\"0\" scrolling=\"no\"></iframe>";
167  }

Références com.example.groom.IHMGroom.chargerCalendrier(), com.example.groom.IHMGroom.DETECTEUR_OFF, com.example.groom.IHMGroom.etatModeDetecteur, com.example.groom.IHMGroom.etatModeSonnette, com.example.groom.IHMGroom.initialiserSystemeNotification(), com.example.groom.IHMGroom.initialiserWidgets(), com.example.groom.IHMGroom.nouvelUrl, com.example.groom.IHMGroom.PREFERENCES, com.example.groom.IHMGroom.recupererInformationsOccupant(), com.example.groom.IHMGroom.SONNETTE_OFF, et com.example.groom.IHMGroom.TAG.

◆ onCreateOptionsMenu()

boolean com.example.groom.IHMGroom.onCreateOptionsMenu ( Menu  menu)

Définition à la ligne 619 du fichier IHMGroom.java.

620  {
621  Log.d(TAG, "onCreateOptionsMenu()");
622  getMenuInflater().inflate(R.menu.menu_main, menu);
623  return true;
624  }

◆ onDestroy()

void com.example.groom.IHMGroom.onDestroy ( )
protected

Méthode appelée à la destruction de l'application (après onStop() et détruite par le système Android)

Définition à la ligne 215 du fichier IHMGroom.java.

216  {
217  super.onDestroy();
218  Log.d(TAG, "onDestroy()");
219  if(communicationGroom != null)
221  }

Références com.example.groom.IHMGroom.communicationGroom, com.example.groom.CommunicationGroom.deconnecter(), et com.example.groom.IHMGroom.TAG.

◆ onOptionsItemSelected()

boolean com.example.groom.IHMGroom.onOptionsItemSelected ( MenuItem  item)

Définition à la ligne 627 du fichier IHMGroom.java.

628  {
629  int id = item.getItemId();
630  Log.d(TAG, "onOptionsItemSelected() " + "id = " + id);
631 
632  //if (id == R.id.action_settings)
633  //{
634  // return true;
635  //}
636 
637  return super.onOptionsItemSelected(item);
638  }

◆ onPause()

void com.example.groom.IHMGroom.onPause ( )
protected

Méthode appelée après qu'une boîte de dialogue s'est affichée (on reprend sur un onResume()) ou avant onStop() (activité plus visible)

Définition à la ligne 194 du fichier IHMGroom.java.

195  {
196  super.onPause();
197  Log.d(TAG, "onPause()");
198  }

Références com.example.groom.IHMGroom.TAG.

◆ onResume()

void com.example.groom.IHMGroom.onResume ( )
protected

Méthode appelée après onStart() ou après onPause()

Définition à la ligne 183 du fichier IHMGroom.java.

184  {
185  super.onResume();
186  Log.d(TAG, "onResume()");
187  }

Références com.example.groom.IHMGroom.TAG.

◆ onStart()

void com.example.groom.IHMGroom.onStart ( )
protected

Méthode appelée au démarrage après le onCreate() ou un restart après un onStop()

Définition à la ligne 173 du fichier IHMGroom.java.

174  {
175  super.onStart();
176  Log.d(TAG, "onStart()");
177  }

Références com.example.groom.IHMGroom.TAG.

◆ onStop()

void com.example.groom.IHMGroom.onStop ( )
protected

Méthode appelée lorsque l'activité n'est plus visible.

Définition à la ligne 204 du fichier IHMGroom.java.

205  {
206  super.onStop();
207  Log.d(TAG, "onStop()");
208  }

Références com.example.groom.IHMGroom.TAG.

◆ recupererInformationsOccupant()

void com.example.groom.IHMGroom.recupererInformationsOccupant ( )
private

Récupère et crée l'objet occupant avec les informations stockées localement.

Définition à la ligne 226 du fichier IHMGroom.java.

227  {
228  // On récupère l'élément si il existe
229  if (sharedPreferences.contains(PREFERENCES_NOM_OCCUPANT))
230  {
231  nomOccupant = sharedPreferences.getString(PREFERENCES_NOM_OCCUPANT, "COPIN"); // null ou une valeur par défaut
232  }
233 
234  if (sharedPreferences.contains(PREFERENCES_PRENOM_OCCUPANT))
235  {
236  prenomOccupant = sharedPreferences.getString(PREFERENCES_PRENOM_OCCUPANT, "Olivier"); // null ou une valeur par défaut
237  }
238 
239  if (sharedPreferences.contains(PREFERENCES_FONCTION))
240  {
241  fonctionOccupant = sharedPreferences.getString(PREFERENCES_FONCTION, "DDFPT"); // null ou une valeur par défaut
242  }
243 
244  // Crée l'objet occupant avec les informations récupérées localement
246  }

Références com.example.groom.IHMGroom.fonctionOccupant, com.example.groom.IHMGroom.nomOccupant, com.example.groom.IHMGroom.occupant, com.example.groom.IHMGroom.PREFERENCES_FONCTION, com.example.groom.IHMGroom.PREFERENCES_NOM_OCCUPANT, com.example.groom.IHMGroom.PREFERENCES_PRENOM_OCCUPANT, et com.example.groom.IHMGroom.prenomOccupant.

Référencé par com.example.groom.IHMGroom.onCreate().

Documentation des données membres

◆ boutonAjoutOccupant

Button com.example.groom.IHMGroom.boutonAjoutOccupant
private

bouton ajout d'un occupant

Définition à la ligne 97 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonAjoutUrl

Button com.example.groom.IHMGroom.boutonAjoutUrl
private

Définition à la ligne 123 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonConnexion

Button com.example.groom.IHMGroom.boutonConnexion
private

bouton de connexion

Définition à la ligne 95 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonEntrer

Button com.example.groom.IHMGroom.boutonEntrer
private

bouton pour choisir l'etat entrer

Définition à la ligne 113 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonEnvoieOccupant

Button com.example.groom.IHMGroom.boutonEnvoieOccupant
private

bouton d'envoie du nom prenom et fonction de l'occupant

Définition à la ligne 98 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonPresence

Button com.example.groom.IHMGroom.boutonPresence
private

activation/desactivation du mode de presence

Définition à la ligne 119 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonRadioAbsent

RadioButton com.example.groom.IHMGroom.boutonRadioAbsent
private

boton pour choisir l'etat absent

Définition à la ligne 110 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonRadioActivationPresence

RadioButton com.example.groom.IHMGroom.boutonRadioActivationPresence
private

affichage de l'etat du mode de presence

Définition à la ligne 120 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonRadioEtatPresence

RadioButton com.example.groom.IHMGroom.boutonRadioEtatPresence
private

affichage de la presence a l'entree

Définition à la ligne 121 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonRadioLibre

RadioButton com.example.groom.IHMGroom.boutonRadioLibre
private

bouton pour choisir l'etat libre

Définition à la ligne 108 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonRadioOccupe

RadioButton com.example.groom.IHMGroom.boutonRadioOccupe
private

bouton pour choisir l'etat occupe

Définition à la ligne 109 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ boutonSonnette

Button com.example.groom.IHMGroom.boutonSonnette
private

bouton pour activer/desactiver le mode sonnette

Définition à la ligne 114 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ choixGroom

int com.example.groom.IHMGroom.choixGroom = -1
private

Définition à la ligne 86 du fichier IHMGroom.java.

◆ communicationGroom

CommunicationGroom com.example.groom.IHMGroom.communicationGroom = null
private

◆ DETECTEUR_OFF

final int com.example.groom.IHMGroom.DETECTEUR_OFF = 0
staticprivate

Etat detecteur eteinte.

Définition à la ligne 71 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets(), et com.example.groom.IHMGroom.onCreate().

◆ DETECTEUR_ON

final int com.example.groom.IHMGroom.DETECTEUR_ON = 1
staticprivate

Etat detecteur allumee.

Définition à la ligne 70 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ envoyerMessageOccupant

Button com.example.groom.IHMGroom.envoyerMessageOccupant
private

bouton d'envoie du message

Définition à la ligne 104 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ ETAT_ABSENT

final int com.example.groom.IHMGroom.ETAT_ABSENT = 1
staticprivate

L'état Absent.

Définition à la ligne 65 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ ETAT_ENTRER

final int com.example.groom.IHMGroom.ETAT_ENTRER = 3
staticprivate

L'état entrer.

Définition à la ligne 67 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ ETAT_LIBRE

final int com.example.groom.IHMGroom.ETAT_LIBRE = 0
staticprivate

L'état Libre.

Définition à la ligne 64 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ ETAT_OCCUPE

final int com.example.groom.IHMGroom.ETAT_OCCUPE = 2
staticprivate

L'état Occupe.

Définition à la ligne 66 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ etatConnexion

RadioButton com.example.groom.IHMGroom.etatConnexion
private

affichage de la connexion

Définition à la ligne 96 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ etatModeDetecteur

int com.example.groom.IHMGroom.etatModeDetecteur
private

etat du mode de detection

Définition à la ligne 83 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets(), et com.example.groom.IHMGroom.onCreate().

◆ etatModeSonnette

int com.example.groom.IHMGroom.etatModeSonnette
private

etat du mode de la sonnette

Définition à la ligne 82 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets(), et com.example.groom.IHMGroom.onCreate().

◆ etatOccupant

int com.example.groom.IHMGroom.etatOccupant
private

etat de l'occupant

Définition à la ligne 81 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ fonctionOccupant

String com.example.groom.IHMGroom.fonctionOccupant
private

fonction de l'occupant

Définition à la ligne 78 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.recupererInformationsOccupant().

◆ handler

final Handler com.example.groom.IHMGroom.handler
private

Gère les messages avec le thread CommunicationGroom.

Définition à la ligne 643 du fichier IHMGroom.java.

◆ imageClochette

ImageView com.example.groom.IHMGroom.imageClochette
private

image pour afficher la notification d'un visiteur qui sonne

Définition à la ligne 115 du fichier IHMGroom.java.

◆ imagePresence

ImageView com.example.groom.IHMGroom.imagePresence
private

image pour afficher la notification d'un visiteur qui est détecté

Définition à la ligne 116 du fichier IHMGroom.java.

◆ layout

View com.example.groom.IHMGroom.layout
private

Définition à la ligne 125 du fichier IHMGroom.java.

◆ listeAppareilsBluetooth

Spinner com.example.groom.IHMGroom.listeAppareilsBluetooth
private

Affichage du peripherique actuellement et anciennement connecte.

Définition à la ligne 94 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserListeGroom(), et com.example.groom.IHMGroom.initialiserWidgets().

◆ messageSonnette

final String com.example.groom.IHMGroom.messageSonnette = "On sonne à l'entrée !"
staticprivate

Définition à la ligne 72 du fichier IHMGroom.java.

◆ modificationOccupant

AlertDialog.Builder com.example.groom.IHMGroom.modificationOccupant
private

Fenêtre de dialogue pour modifier un.

Définition à la ligne 127 du fichier IHMGroom.java.

◆ modificationUrl

AlertDialog.Builder com.example.groom.IHMGroom.modificationUrl
private

Définition à la ligne 124 du fichier IHMGroom.java.

◆ nomOccupant

String com.example.groom.IHMGroom.nomOccupant
private

nom de l'occupant

Définition à la ligne 76 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.recupererInformationsOccupant().

◆ notificationManager

NotificationManager com.example.groom.IHMGroom.notificationManager = null
private

Définition à la ligne 88 du fichier IHMGroom.java.

◆ nouvelUrl

String com.example.groom.IHMGroom.nouvelUrl
private

modification de l'URL pour l'agenda

Définition à la ligne 79 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.onCreate().

◆ numeroNotification

int com.example.groom.IHMGroom.numeroNotification = 1
private

Définition à la ligne 89 du fichier IHMGroom.java.

◆ occupant

Occupant com.example.groom.IHMGroom.occupant
private

constructeur occupant

Définition à la ligne 75 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets(), et com.example.groom.IHMGroom.recupererInformationsOccupant().

◆ PREFERENCES

final String com.example.groom.IHMGroom.PREFERENCES = "groom"
static

clé pour le titre du stockage

Définition à la ligne 131 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.onCreate().

◆ PREFERENCES_FONCTION

final String com.example.groom.IHMGroom.PREFERENCES_FONCTION = "FonctionOccupant"
static

clé pour la fonction de l'occupant

Définition à la ligne 134 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.recupererInformationsOccupant().

◆ PREFERENCES_NOM_OCCUPANT

final String com.example.groom.IHMGroom.PREFERENCES_NOM_OCCUPANT = "NomOccupant"
static

clé pour le nom de l'occupant

Définition à la ligne 132 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.recupererInformationsOccupant().

◆ PREFERENCES_PRENOM_OCCUPANT

final String com.example.groom.IHMGroom.PREFERENCES_PRENOM_OCCUPANT = "PrenomOccupant"
static

clé pour le prénom de l'occupant

Définition à la ligne 133 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.recupererInformationsOccupant().

◆ prenomOccupant

String com.example.groom.IHMGroom.prenomOccupant
private

prenom de l'occupant

Définition à la ligne 77 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.recupererInformationsOccupant().

◆ SONNETTE_OFF

final int com.example.groom.IHMGroom.SONNETTE_OFF = 0
staticprivate

Etat sonnette eteinte.

Définition à la ligne 69 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets(), et com.example.groom.IHMGroom.onCreate().

◆ SONNETTE_ON

final int com.example.groom.IHMGroom.SONNETTE_ON = 1
staticprivate

Etat sonnette allumee.

Définition à la ligne 68 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ TAG

◆ texteMessageOccupant

EditText com.example.groom.IHMGroom.texteMessageOccupant
private

zone ou entrer le message personnel

Définition à la ligne 103 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ texteNomFonction

EditText com.example.groom.IHMGroom.texteNomFonction
private

Définition à la ligne 99 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ texteNomOccupant

TextView com.example.groom.IHMGroom.texteNomOccupant
private

texte montrant le nom de l'occupant

Définition à la ligne 93 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ titreConnexion

TextView com.example.groom.IHMGroom.titreConnexion
private

titre pour indiquer la zone de connexion

Définition à la ligne 92 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ titreEtat

TextView com.example.groom.IHMGroom.titreEtat
private

titre pour indiquer la zone des etats de l'occupant du bureau

Définition à la ligne 107 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ titreMessageOccupant

TextView com.example.groom.IHMGroom.titreMessageOccupant
private

titre pour indiquer la zone du message occupant

Définition à la ligne 102 du fichier IHMGroom.java.

Référencé par com.example.groom.IHMGroom.initialiserWidgets().

◆ toast

Toast com.example.groom.IHMGroom.toast
private

Définition à la ligne 126 du fichier IHMGroom.java.


La documentation de cette classe a été générée à partir du fichier suivant :
com.example.groom.IHMGroom.nomOccupant
String nomOccupant
nom de l'occupant
Definition: IHMGroom.java:76
com.example.groom.IHMGroom.PREFERENCES
static final String PREFERENCES
clé pour le titre du stockage
Definition: IHMGroom.java:131
com.example.groom.IHMGroom.affichageActiverModePresence
void affichageActiverModePresence()
Changement fait lors de l'activation du mode présence.
Definition: IHMGroom.java:926
com.example.groom.IHMGroom.numeroNotification
int numeroNotification
Definition: IHMGroom.java:89
com.example.groom.IHMGroom.boutonRadioEtatPresence
RadioButton boutonRadioEtatPresence
affichage de la presence a l'entree
Definition: IHMGroom.java:121
com.example.groom.IHMGroom.boutonRadioAbsent
RadioButton boutonRadioAbsent
boton pour choisir l'etat absent
Definition: IHMGroom.java:110
com.example.groom.IHMGroom.etatModeDetecteur
int etatModeDetecteur
etat du mode de detection
Definition: IHMGroom.java:83
com.example.groom.IHMGroom.TAG
static final String TAG
TAG pour les logs.
Definition: IHMGroom.java:63
com.example.groom.IHMGroom.texteNomOccupant
TextView texteNomOccupant
texte montrant le nom de l'occupant
Definition: IHMGroom.java:93
com.example.groom.IHMGroom.modifierOccupant
void modifierOccupant()
Gère la boîte de dialogue permettant de modifier les information de l'occupant.
Definition: IHMGroom.java:502
com.example.groom.IHMGroom.communicationGroom
CommunicationGroom communicationGroom
Definition: IHMGroom.java:85
com.example.groom.IHMGroom.nouvelUrl
String nouvelUrl
modification de l'URL pour l'agenda
Definition: IHMGroom.java:79
com.example.groom.IHMGroom.boutonAjoutOccupant
Button boutonAjoutOccupant
bouton ajout d'un occupant
Definition: IHMGroom.java:97
com.example.groom.IHMGroom.afficherDeconnexionGroom
void afficherDeconnexionGroom()
Actions à réaliser lorsque l'application est déconnectée.
Definition: IHMGroom.java:977
com.example.groom.IHMGroom.ETAT_OCCUPE
static final int ETAT_OCCUPE
L'état Occupe.
Definition: IHMGroom.java:66
com.example.groom.CommunicationGroom.envoyer
void envoyer(String trame)
Permet d'envoyer une trame au module bluetooth du groom.
Definition: CommunicationGroom.java:151
com.example.groom.IHMGroom.SONNETTE_OFF
static final int SONNETTE_OFF
Etat sonnette eteinte.
Definition: IHMGroom.java:69
com.example.groom.IHMGroom.DETECTEUR_ON
static final int DETECTEUR_ON
Etat detecteur allumee.
Definition: IHMGroom.java:70
com.example.groom.IHMGroom.boutonPresence
Button boutonPresence
activation/desactivation du mode de presence
Definition: IHMGroom.java:119
com.example.groom.IHMGroom.texteNomFonction
EditText texteNomFonction
Definition: IHMGroom.java:99
com.example.groom.IHMGroom.boutonEnvoieOccupant
Button boutonEnvoieOccupant
bouton d'envoie du nom prenom et fonction de l'occupant
Definition: IHMGroom.java:98
com.example.groom.Occupant.getPrenom
String getPrenom()
récupère le prénom de l'occupant
Definition: Occupant.java:74
com.example.groom.IHMGroom.choixGroom
int choixGroom
Definition: IHMGroom.java:86
com.example.groom.IHMGroom.ETAT_ENTRER
static final int ETAT_ENTRER
L'état entrer.
Definition: IHMGroom.java:67
com.example.groom.IHMGroom.boutonAjoutUrl
Button boutonAjoutUrl
Definition: IHMGroom.java:123
com.example.groom.IHMGroom.PREFERENCES_FONCTION
static final String PREFERENCES_FONCTION
clé pour la fonction de l'occupant
Definition: IHMGroom.java:134
com.example.groom.IHMGroom.messageSonnette
static final String messageSonnette
Definition: IHMGroom.java:72
com.example.groom.IHMGroom.SONNETTE_ON
static final int SONNETTE_ON
Etat sonnette allumee.
Definition: IHMGroom.java:68
com.example.groom.IHMGroom.toast
Toast toast
Definition: IHMGroom.java:126
com.example.groom.Occupant.getNom
String getNom()
récupère le nom de l'occupant
Definition: Occupant.java:56
com.example.groom.IHMGroom.chargerCalendrier
void chargerCalendrier()
Affichage du calendrier google via une WebView.
Definition: IHMGroom.java:1050
com.example.groom.IHMGroom.modifierUrl
void modifierUrl()
Definition: IHMGroom.java:566
com.example.groom.IHMGroom.initialiserSystemeNotification
void initialiserSystemeNotification()
initialiser la notification
Definition: IHMGroom.java:826
com.example.groom.Occupant.getFonction
String getFonction()
récupère la fonction de l'occupant
Definition: Occupant.java:92
com.example.groom.IHMGroom.etatConnexion
RadioButton etatConnexion
affichage de la connexion
Definition: IHMGroom.java:96
com.example.groom.IHMGroom.titreMessageOccupant
TextView titreMessageOccupant
titre pour indiquer la zone du message occupant
Definition: IHMGroom.java:102
com.example.groom.IHMGroom.ETAT_LIBRE
static final int ETAT_LIBRE
L'état Libre.
Definition: IHMGroom.java:64
com.example.groom.IHMGroom.boutonEntrer
Button boutonEntrer
bouton pour choisir l'etat entrer
Definition: IHMGroom.java:113
com.example.groom.IHMGroom.recupererInformationsOccupant
void recupererInformationsOccupant()
Récupère et crée l'objet occupant avec les informations stockées localement.
Definition: IHMGroom.java:226
com.example.groom.IHMGroom.imageClochette
ImageView imageClochette
image pour afficher la notification d'un visiteur qui sonne
Definition: IHMGroom.java:115
com.example.groom.IHMGroom.layout
View layout
Definition: IHMGroom.java:125
com.example.groom.IHMGroom.boutonRadioLibre
RadioButton boutonRadioLibre
bouton pour choisir l'etat libre
Definition: IHMGroom.java:108
com.example.groom.IHMGroom.listeAppareilsBluetooth
Spinner listeAppareilsBluetooth
Affichage du peripherique actuellement et anciennement connecte.
Definition: IHMGroom.java:94
com.example.groom.IHMGroom.modificationOccupant
AlertDialog.Builder modificationOccupant
Fenêtre de dialogue pour modifier un.
Definition: IHMGroom.java:127
com.example.groom.IHMGroom.initialiserListeGroom
void initialiserListeGroom()
Initialise la liste des périphériques Groom.
Definition: IHMGroom.java:468
com.example.groom.IHMGroom.boutonRadioActivationPresence
RadioButton boutonRadioActivationPresence
affichage de l'etat du mode de presence
Definition: IHMGroom.java:120
com.example.groom.IHMGroom.fonctionOccupant
String fonctionOccupant
fonction de l'occupant
Definition: IHMGroom.java:78
com.example.groom.IHMGroom.initialiserWidgets
void initialiserWidgets()
Initialise les widgets de l'IHM.
Definition: IHMGroom.java:251
com.example.groom.IHMGroom.texteMessageOccupant
EditText texteMessageOccupant
zone ou entrer le message personnel
Definition: IHMGroom.java:103
com.example.groom.IHMGroom.ETAT_ABSENT
static final int ETAT_ABSENT
L'état Absent.
Definition: IHMGroom.java:65
com.example.groom.IHMGroom.boutonSonnette
Button boutonSonnette
bouton pour activer/desactiver le mode sonnette
Definition: IHMGroom.java:114
com.example.groom.IHMGroom.boutonConnexion
Button boutonConnexion
bouton de connexion
Definition: IHMGroom.java:95
com.example.groom.IHMGroom.occupant
Occupant occupant
constructeur occupant
Definition: IHMGroom.java:75
com.example.groom.CommunicationGroom.connecter
void connecter()
Permet la connexion au module bluetooth.
Definition: CommunicationGroom.java:187
com.example.groom.IHMGroom.handler
final Handler handler
Gère les messages avec le thread CommunicationGroom.
Definition: IHMGroom.java:643
com.example.groom.IHMGroom.titreConnexion
TextView titreConnexion
titre pour indiquer la zone de connexion
Definition: IHMGroom.java:92
com.example.groom.IHMGroom.titreEtat
TextView titreEtat
titre pour indiquer la zone des etats de l'occupant du bureau
Definition: IHMGroom.java:107
com.example.groom.IHMGroom.afficherPresenceDesactiveGroom
void afficherPresenceDesactiveGroom()
affichage de la présence lorsqu'il n'y a personne
Definition: IHMGroom.java:957
com.example.groom.CommunicationGroom.deconnecter
void deconnecter()
Permet la déconnexion du module bluetooth.
Definition: CommunicationGroom.java:231
com.example.groom.IHMGroom.PREFERENCES_PRENOM_OCCUPANT
static final String PREFERENCES_PRENOM_OCCUPANT
clé pour le prénom de l'occupant
Definition: IHMGroom.java:133
com.example.groom.IHMGroom.imagePresence
ImageView imagePresence
image pour afficher la notification d'un visiteur qui est détecté
Definition: IHMGroom.java:116
com.example.groom.IHMGroom.PREFERENCES_NOM_OCCUPANT
static final String PREFERENCES_NOM_OCCUPANT
clé pour le nom de l'occupant
Definition: IHMGroom.java:132
com.example.groom.IHMGroom.DETECTEUR_OFF
static final int DETECTEUR_OFF
Etat detecteur eteinte.
Definition: IHMGroom.java:71
com.example.groom.IHMGroom.prenomOccupant
String prenomOccupant
prenom de l'occupant
Definition: IHMGroom.java:77
com.example.groom.IHMGroom.envoyerMessageOccupant
Button envoyerMessageOccupant
bouton d'envoie du message
Definition: IHMGroom.java:104
com.example.groom.IHMGroom.affichageDesactiverModePresence
void affichageDesactiverModePresence()
Changement fait lors de la désactivation du mode présence.
Definition: IHMGroom.java:913
com.example.groom.IHMGroom.modificationUrl
AlertDialog.Builder modificationUrl
Definition: IHMGroom.java:124
com.example.groom.IHMGroom.etatModeSonnette
int etatModeSonnette
etat du mode de la sonnette
Definition: IHMGroom.java:82
com.example.groom.IHMGroom.etatOccupant
int etatOccupant
etat de l'occupant
Definition: IHMGroom.java:81
com.example.groom.IHMGroom.boutonRadioOccupe
RadioButton boutonRadioOccupe
bouton pour choisir l'etat occupe
Definition: IHMGroom.java:109
com.example.groom.IHMGroom.notificationManager
NotificationManager notificationManager
Definition: IHMGroom.java:88