Example #1
0
 public void call911() {
   // Lance un appel téléphonique à la police et set l'alerte avec police prevue
   if (!currentAlert.getPolice()) {
     manager.updateAlert911(currentAlert.getId());
     Intent call911Intent =
         new Intent(Intent.ACTION_CALL, Uri.parse(getString(R.string.call_911_number)));
     startActivity(call911Intent);
   } else {
     manager.displayAlertMessage(
         getString(R.string.error_action_alert_title), getString(R.string.error_action_alert_911));
   }
 }
Example #2
0
 public void callSamu() {
   // Lance un appel téléphonique au samu et set l'alerte avec le samu deja prevenu
   if (!currentAlert.getSamu()) {
     manager.updateAlertSAMU(currentAlert.getId());
     Intent callSamuIntent =
         new Intent(Intent.ACTION_CALL, Uri.parse(getString(R.string.call_911_number)));
     startActivity(callSamuIntent);
   } else {
     manager.displayAlertMessage(
         getString(R.string.error_action_alert_title),
         getString(R.string.error_action_alert_samu));
   }
 }