florisboard / florisboard

An open-source keyboard for Android which respects your privacy. Currently in early-beta.
https://florisboard.org
Apache License 2.0
6.2k stars 405 forks source link

It returns always to the default keyboard #220

Closed heberjeur closed 2 months ago

heberjeur commented 3 years ago

Environment information

Steps to reproduce

  1. Go to theme mode
  2. Change it, for example follow system or any other value
  3. Quite
  4. It returns to the default keyboard

It doesn't when you change the theme mode and directly you go to the home screen of FlorisBoard

Also it happened when I choose a custom keyboard color

patrickgold commented 3 years ago

This indicates that reapplying the new theme mode upon existing results in a fatal Exception, in which case the Android system sometimes switches back to the default keyboard. I will definitely have to investigate this further, as this should absolutely be avoided.

heberjeur commented 3 years ago

You can see the bug in this screen recording https://youtu.be/gJhzRI3AXOY

heberjeur commented 3 years ago

Same problem for 0.3.5, I can't use The app 😕, it's still returning to the default keyboard

patrickgold commented 3 years ago

@heberjeur Sorry I completely oversaw your issue when fixing the adaptive themeing. Based on your video I think you have a crash which happens upon closing the Settings activity. This will also crash the Service IME class with it. On most devices, the Service is re-instantiated upon clicking on an input field. It seems that your device immediately returns to the default keyboard for whatever reason. I will try to fix this, as I can reproduce this bug on one of my emulated devices.

heberjeur commented 3 years ago

OK thanks 🙂, I can test on my device, if you want, you can send test apk

heberjeur commented 3 years ago

I have no problem with 0.3.2, the discard of settings start from 0.3.3 !

patrickgold commented 3 years ago

@heberjeur I've been able to reproduce the crash but was unable to fix it yet, as the crash is indirectly produced, not directly. I will inform you of any progress on this issue.

Stenafo commented 3 years ago

I have a similar problem, while typing (without me changing the settings) the keyboard closes and the system keyboard appears. if I then reopen the floriskeyboard application I have the message that I have to change the default keyboard. i am using the dark theme.

I have: samsung galaxy s6, android 7.0

patrickgold commented 3 years ago

@Stenafo This seems like a crash to me, but not related to this one here. The output is the same, though closing the Settings crashes an input channel and I don't know why and how to fix it. Your described behavior more seems like that FlorisBoard encounters a crash and then switches back to the default keyboard while in the keyboard context. As you said you are seeing a message that you have to switch back to the default keyboard - If this is from FlorisBoard and not the system, you can click on it and copy the stacktrace, which would definitely help me fixing this. Could you open a new issue for this? Thanks in advance!

Stenafo commented 3 years ago

@patrickgold I suppose it's a floris problem because I've never had this problem with any other keyboard. where can i find the stacktrace?

patrickgold commented 3 years ago

@Stenafo Wen you get the notification which tells you that FlorisBoard is reverting to the default keyboard, you can click it and copy the stacktrace displayed into an issue at GitHub.

Stenafo commented 3 years ago

@patrickgold unfortunately I don't have any kind of notification, surely the keyboard crashes and the system resets the default keyboard without reporting anything.

patrickgold commented 3 years ago

@Stenafo I have an idea: maybe you are accidentally triggering the space bar swipe up gesture, which brings you to the last used keyboard (mostly this is the default keyboard). Try disabling it in Settings > Gestures > Space bar swipe up (Set it to No action). If it then does not occur anymore we know the source of this behavior.

Stenafo commented 3 years ago

@patrickgold hahahahahah omg sorry yes, that was the problem, maybe it's better to remove that default setting

heberjeur commented 3 years ago

The problem has been resolved in the lastest version 😀

patrickgold commented 3 years ago

@heberjeur Thanks for letting me know! Great to hear that it has to been resolved in the latest version for you. I am not sure though why it has been resolved, as I didn't even do some specific fix for this... I will let this issue open to further investigate into this.

lm41 commented 2 months ago

I think after 3.5 Years we can close this issue as stale. (And resolved)