-
-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds the ability for users to invoke the soft keyboard anywhere, at any time, even on screens that do not normally allow keyboards. This approach works even on Android 13 (API 33) #497
Conversation
…y time, even on screens that do not normally allow keyboards. This approach works even on Android 13 (API 33)
Feel free to modify or change anything, I am not an android dev so I might not be following best practices. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fantastic, thanks! I'll make a proper review and merge this soon.
Only APKs built by the CI are trustworthy, here's the latest for this PR: https://github.com/Julow/Unexpected-Keyboard/actions/runs/7049282572?pr=497
Worth noting that on android 13, it seems that there must be at least one navigable ui element for the keyboard to remain displayed. Otherwise, it gets dismissed. If you would have been able to plug a real keyboard and navigate that app via arrow keys, then it would probably work. |
I'm glad you took the initiative! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't work on my device, the keyboard opens then closes immediately on top of any app. Any idea on how to debug this ?
@@ -6,4 +6,5 @@ | |||
<TextView style="@style/paragraph" android:text="https://github.com/Julow/Unexpected-Keyboard" android:autoLink="web" android:linksClickable="true"/> | |||
<TextView android:id="@+id/launcher_tryhere_text" style="@style/paragraph" android:text="@string/launcher_tryhere"/> | |||
<EditText android:id="@+id/launcher_tryhere_area" style="@style/paragraph" android:inputType="text"/> | |||
<Button style="@style/paragraph" android:text="Show Persistent Keyboard" android:onClick="startOverlayService" android:layout_width="wrap_content"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Opening the app and clicking this button is a lot of work. Any hope of having a permanent notification instead ?
Hi @Julow, I have a bit of bad news. It seems like I was mistaken on the specifics this approach. If the user's device is below Android 13, it will work in all cases. You can try by either using any older device, or downloading some random older app from fdroid. I did not notice this at first, as many of the apps installed on my device are older APKs. With this disappointing news, I am not sure if this warrants closing this PR or not, it's your choice... perhaps it could still be of some use either for older apps or older devices like in my own use case. Nevertheless, I have tidied up the PR a bit, so do take a look.
Here is another video where I attempt to use this new version on multiple apps on my Android 13 device, you can see it works for any app below target SDK 33 (the bottom group), while failing for those above (the top group). I did also test it on my Android 9 device and it works fine in all cases. I also demonstrate the new interface, switching between apps and invoking the keyboard with touches visible. only_below_sdk33.mp4Also replying @Spike-from-NH :
|
On a sidenote, I have found another non-free app |
Hacker's Keyboard has, in Settings→Gestures, what to do if |
The interface looks better :) The target SDK thing is disappointing but if Game Keyboard can do it, it means there's a way. Could this be related to permission and to the permission change in Android 10 or to background permissions ? |
I don't think it's permissions related. But yes, Game Keyboard definitely can do this, and it works as a normal keyboard, keys can be sent, and the keyboard behaves the same as it does when invoked for an EditText. If you would like the apk to try let me know of a way to send it to you, I won't upload it here since I think you don't want that. |
What about this solution??? https://www.youtube.com/watch?v=OCTiacmVu_Y&ab_channel=ArtTV%3AAGorgeousPlace |
I think that a good solution would be to use accessibility, to invoke the keyboard without the need for any text field, and it would be more shareable with previous APIs, than how accessibility is implemented? I don't know, but it would be the most viable solution for previous api (estimated up to api 19) |
@Julow @RetrogisusDEV Yes that's how it is! I don't understand why there isn't any keyboard of this type! (apart from this). It would be perfect to have a floating icon above the rest of the apps and be able to display it whenever you want to send letters. |
I am very much looking forward to this feature. |
Anyone knows a always visible keyboard like this for Android? I need it. |
I will be closing this PR due to lack of interest. For future readers, this approach only works for apps with target sdk < 33. |
Sorry for the lack of interest. The target sdk constraint is a big problem as Google Play would not accept upgrades and would lower the rank of the app. Though, I'd accept to release the app with this on F-Droid and Github, for a bit of time. It'd need to be made optional. This do not work on my device (running Android 13): the keyboard seems to open and close immediately, no logs. |
@Julow Couldn't you try adding the keyboard functionality you mentioned to your keyboard so we could use your wonderful keyboard at any time? |
In fact, I've been trying and I'm already giving up xD |
I went ahead and did it myself, because I really needed the functionality. I am quite certain no other FOSS keyboard has this ability working in Android 13.
This PR adds the ability for users to invoke the soft keyboard anywhere, at any time, even on screens that do not normally allow keyboards. This approach works even on Android 13 (API 33), and is an essential replacement for the now-defunct Hacker Keyboard's Permanent Notification, which had a similar capability but stopped functioning after API 30 (klausw/hackerskeyboard#897).
Closes #496, Closes #71, Closes #392 and Closes #69
How to use:
Show Persistent Keyboard
Draw Over Other Apps
permission, allowing overlays to be displayed.Show Persistent Keyboard
Show
button in the top left corner. The overlay will be closed, and at the same time the soft keyboard will be invoked.