Add snakbar message when STT is cancelled for the 3rd time
This commit is contained in:
		| @ -277,8 +277,14 @@ class MatchActivity : AppCompatActivity() { | ||||
|                         } | ||||
|                     } else { | ||||
|                         numSttCancelled++ | ||||
|                         if (numSttCancelled >= STT_RETRIES) | ||||
|                         if (numSttCancelled >= STT_RETRIES) { | ||||
|                             sttEnabled = false | ||||
|                             Snackbar.make( | ||||
|                                 findViewById(R.id.coordinatorLayout), | ||||
|                                 R.string.STT_disabled, | ||||
|                                 Snackbar.LENGTH_SHORT | ||||
|                             ).show() | ||||
|                         } | ||||
|                     } | ||||
|                 } | ||||
|             } | ||||
|  | ||||
| @ -40,4 +40,5 @@ Vous pouvez à tout moment changer la permission dans les paramètres Android." | ||||
|     <string name="STT_hint">Dîtes : \"Point pour %s\"\nou \"Point pour %s\"</string> | ||||
|     <string name="pattern">(?i:Point pour %s)</string> | ||||
|     <string name="not_understood">Pouvez-vous répéter ?</string> | ||||
|     <string name="STT_disabled">Reconnaissance vocale désactivée.</string> | ||||
| </resources> | ||||
| @ -47,4 +47,5 @@ | ||||
|     <string name="pattern">(?i:Point for %s)</string> | ||||
|     <string name="not_understood">Can you repeat?</string> | ||||
|     <string name="score" translatable="false">%d - %d</string> | ||||
|     <string name="STT_disabled">Voice recognition disabled.</string> | ||||
| </resources> | ||||
|  | ||||
		Reference in New Issue
	
	Block a user