Fermata
Fermata copied to clipboard
Featured request voice message
Hi Dev, I would to know if you can add the possibility to send a voice message on WhatsApp and Telegram using their web service. Send text and other things seem working correctly. Need to can move the menu button from bottom right side because is the same position of the mic button
Do you mean the floating button? You can move it - long press and move the button.
Ok thank for suggestions, I never try to move 🤣 I try on Android auto emulator and voice message seem to work, I can try tomorrow on my car to confirm. Another question, can the keyboard opened only manually? Every were I move on WhatsApp web site it open keyboard
Unfortunately, no. It's opened automatically once a text field gains focus.
Understand, and so this keyboard is the standard from Android auto? No way to add a mic button for the voice to text feature?
Since version 1.8.5 there is such feature, but it does not work for web forms. I'll try to implement in the next version.
Since 1.8.6 voice input (if enabled in settings) is activated along with AA text input.
@AndreyPavlenko yeah is working, the only things is layout is difficult to see because is under the keyboard but I don't know if you have possibly to fix o maybe simple move a little up or make as a long rettangle and use the side space.
@AndreyPavlenko do you think something like that can be used to avoid keyboard to self opening when you use voice input? Maybe show keyboard after voice input is closed and maybe with a button on it to force touch keyboard to be open.
https://stackoverflow.com/questions/10636635/disable-keyboard-on-edittext
@stevendevit good job with the youtube background trick, I would to ask you another question. I would to improve the keyboard/voice input to avoid to be as on picture before. pratically i want to keep keyboard closed when is showing the voice input method and if you don't say nothing popup will close and then open keyboard. i try to do a lot of try but i'm not able to undestand how to detect when popup is closed due to "not detected speak" seem to be manage by error catch but i can't get correctly. i was able to keep keyboard closed but can't launch an "open" because i don't have the no voice input flag
MainCarActivity
public EditText startInput(TextWatcher w) {
if (editText == null) editText = new CarEditText(this);
if (textWatcher != null) editText.removeTextChangedListener(textWatcher);
editText.addTextChangedListener(w);
textWatcher = w;
a().startInput(editText);
getActivityDelegate().onSuccess(a -> {
if (!a.getPrefs().getVoiceControlEnabledPref()) return;
a.startSpeechRecognizer().onSuccess(q -> {
editText.setText(q.get(0));
stopInput();
});
});
return editText;
}
I lost my try due to my pc problem and so i don't remember exaclty what i try. pratically we need to remove the first "a().startInput(editText); " and use "if no text detect". pleas try to give a check. I'm use whatsapp web and without self keyboard opening experience will be improve a lot
MainActivityDelegate
@Override
public void onError(int error) {
String msg = "Speech recognition failed with error code " + error;
Log.e(msg);
promise.completeExceptionally(new IOException(msg));
hideActiveMenu();
if (error == SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS) {
showAlert(getContext(), R.string.err_no_audio_record_perm);
}
}
From the log i can see on "no word detect" it get error = 7 so we neeed to manage this as a flag for showing the keyboard
@stevendevit good job with the youtube background trick, I would to ask you another question. I would to improve the keyboard/voice input to avoid to be as on picture before. pratically i want to keep keyboard closed when is showing the voice input method and if you don't say nothing popup will close and then open keyboard. i try to do a lot of try but i'm not able to undestand how to detect when popup is closed due to "not detected speak" seem to be manage by error catch but i can't get correctly. i was able to keep keyboard closed but can't launch an "open" because i don't have the no voice input flag
MainCarActivity
public EditText startInput(TextWatcher w) { if (editText == null) editText = new CarEditText(this); if (textWatcher != null) editText.removeTextChangedListener(textWatcher); editText.addTextChangedListener(w); textWatcher = w; a().startInput(editText); getActivityDelegate().onSuccess(a -> { if (!a.getPrefs().getVoiceControlEnabledPref()) return; a.startSpeechRecognizer().onSuccess(q -> { editText.setText(q.get(0)); stopInput(); }); }); return editText; }
I lost my try due to my pc problem and so i don't remember exaclty what i try. pratically we need to remove the first "a().startInput(editText); " and use "if no text detect". pleas try to give a check. I'm use whatsapp web and without self keyboard opening experience will be improve a lot
Yeah that would improve a lot the experience. I'll look onto it when in my free time.
Here is where I found the log about "no word detection" popup will close with "error = 7" I try to check in error=7 do something on the other class but I was able to get only a force close 🤣
https://github.com/AndreyPavlenko/Fermata/blob/6b4f17d4f43614fd9240cecf2a3962e79dbd559a/fermata/src/main/java/me/aap/fermata/ui/activity/MainActivityDelegate.java
@Override
public void onError(int error) {
String msg = "Speech recognition failed with error code " + error;
Log.e(msg);
promise.completeExceptionally(new IOException(msg));
hideActiveMenu();
if (error == SpeechRecognizer.ERROR_INSUFFICIENT_PERMISSIONS) {
showAlert(getContext(), R.string.err_no_audio_record_perm);
}
}