Im trying to retrieve typing information such as the on-screen coordinates of where a user presses a key on a keyboard on Android and iOS using flutter similar to how swiftkey does it to generate their heatmaps.
How would I go about doing this? Do I have to create my own custom keyboard
I've tried to implement the suggestion here: How to Calculate the Coordinates of touch in Flutter?
But once the keyboard drawer pops up, the on-screen coordinates do not register.
To do this you would have to show your own keyboard that you build in flutter. The reason for this is that the keyboard which pops up is actually a different android window (or at least activity, but pretty sure window and likely process as well), that is shown over top of the window that flutter is rendering into. By design, the keypresses can't be recorded as that would be a security issue (the active app is one thing, but imagine if another app could record keypresses or even location of taps - they could steal your passwords!).
There may be some android-specific way of doing it that I'm not aware of, but it probably won't work on all devices and all keyboards and is likely not a good route to follow.
Related
I'm currently developing a windows app with flutter. I experienced that the default mouse cursor changes when hovering over a button that is clickable or shows an "forbidden" sign if a button is deactivated. This does not feel right for me and I think in most Windows programs there is just the standard cursor.
I know about the MouseRegion class where I can set the cursor for one button. Is there a way to change the cursor globally for the entire application?
In my opinion, overall, the cursor topic is still in progress for Flutter. We have been developing a Desktop application for almost two years now and I can definitely tell that, there is a progress but still it is a problem.
What we do most of the time is to create our own buttons and arrange all of them together.
However, to answer your question :) Assuming that you are using new material buttons on the latest Flutter version, in the new Material Buttons shared here. You can see that, ButtonStyle class has a field called final MaterialStateProperty<MouseCursor> mouseCursor; which is the mouseCursor that you can use for your own buttons.
I have an AccessibilityService that will break if the user turns it on and off through the Android system user interface. I only want the user to be able to disable/enable AccessibilityService through my own Activity which will handle shutting it on and off correctly.
I never encountered this feature before until I tested my app on newer devices. On Android 11 devices there is suddenly an option to toggle "Accessibility Shortcut". This will add a button at the bottom corner the navigation buttons OR it will allow the user to toggle the AccessibilityService by holding both volume buttons at the same time. For my app, it say's it will add the toggle near the navigation buttons.
How do I remove this option?
I am running into the exact same problems. Users tend to enable all switch button they see without reading explanation or videos. Since accessibility shortcut interfere in a bad way with the accessibility service, they got a non working experience.
It seems at first sight there is no option for developpers to hide the option for their accesibility services...
In my Flutter app, I would like to be able to know whether the device has a soft keyboard enabled (notice: enabled != currently showing). What I mean by that is, when a text input receives focus, will a soft keyboard be shown?
The idea is that when showing a dialog with a text field for a query and a list of search results (the list is populated even if the query is empty), I would like to autofocus the text field, but only if by focusing it there won't be a soft keyboard popping up. The issue is that soft keyboards take away screen space, so there will be fewer search results visible (on small phones, as few as only one). Therefore, autofocusing should only happen when there won't be a soft keyboard (as, for example, with browsers on desktop).
Edit: To clarify, this is not a duplicate of Flutter: Detect keyboard open/close or similar questions. What this question asks is "Is the soft keyboard currently showing?" whereas my question is "When a text input receives focus, will a soft keyboard be shown?" I need to know whether it will show before it is actually shown.
So, I got the following image from graphic designer.
On the right is keyboard popping in our application, on the left is keyboard he sees everywhere else on his phone (iPhone 6), apparently. He wants the keyboard on the left to appear in our application too. This looks like standard iOS keyboard, only smaller, but I don't see any option to get it. How do I get it? Or is it just particularly popular custom keyboard/extension? Or maybe it's really easy to do custom keyboard/extension (note, I don't know a thing about custom keyboards/extensions in iOS)?
The keyboard is adjusted when you have inputAccessoryView assigned for active field.
check: https://developer.apple.com/library/ios/documentation/StringsTextFonts/Conceptual/TextAndWebiPhoneOS/InputViews/InputViews.html
I'm part of a team building a mobile web app using AppGyver Steroids (PhoneGap). We are having an issue with the iOS7 keyboard displaying a very faint "Done" button on the keyboard when the user is operating in a text area or an input select. I suspect this is a problem that is actually global in our app, but these are the instances where I have observed them.
I've searched and searched for a solution or how to "customize" the keyboard in order to make this "Done" button more obvious, but I haven't found any solutions yet. Can anyone point me in the direction of how to adjust the "Done" button or any other keyboard/input controls?
Attached are two screenshots showing the issue.
http://i.stack.imgur.com/KeFYM.png
http://i.stack.imgur.com/h11IH.png
Have you seen the issue on github? It's now fixed. They'll be including the option for custom colours in the near future.