How can I get the on screen keyboard for flutter web apps running on a touch screen - flutter

I am building flutter for the web, and I want to use it on a touch screen. My app runs great and takes input from the mouse, but when I want to use a text input field the app works with the physical keyboard that I have attached since I'm running in chrome on my Macbook. I would like to use this web app on a touch screen kiosk type of setup though so I wanted to always bring up the virtual (on screen) keyboard for text entry.
I tried:
#override
void initState() {
SystemChannels.textInput.invokeMethod('TextInput.show');
super.initState();
}
And this does force open the virtual keyboard if I run on a virtual tablet for example, but didn't work for me when I ran the exact same flutter app in chrome.
I'm running with v1.9.1+hotfix.3-pre.1, on Mac OS X 10.14.6 18G103
Does Anyone know a way to force flutter to always use virtual on screen keyboard?

I don't think there's a native function in Flutter to invoke the desktop virtual keyboard. As a workaround you can either use virtual_keybaord_multi_language plugin that creates a keyboard within the app or you can enable the virtual keyboard by default on the device. If you're running on Windows, switching to tablet mode should automatically invoke the softkeyboard when a TextField is active.
Edit: This seems to be a valid use case, you can track the feature request on this ticket.

Related

Ionic Android Strange routing when physical key is pressed [Honeywell CK65]

We are developing Ionic android app and we are having a strange problem with Honeywell CK65 device, to be more specific with device physical keyboard.
If the app is being used only by touch, without device physical keyboard, the app is working correctly.
But when physical keyboard is used, example
when ENTER key is pressed, it should navigate to another page but the remain freeze and it appends on the bottom page the previous page.
Any help will be appreciated. thanks in advance.
You need to somehow configure the app to use the devices keyboard. My guess is that you need to create a custom plugin to call the device's built in keyboard and map those keys to a function.
We resolved the problem using ionic ion-router-outlet instead of angular router-outlet

Flutter widget preview

Let's suppose i am debugging an already built app and i needed to see the widget/screen and how it looks(without running the application and going through all the different screens to reach the desired one) ,
i know there is an annotation (#preview) in jetpack compose for native android to preview the widget in question isolated from the whole app ,
in the meantime to preview a certain widget i put it in
void main() => runApp(ParticularScreen());
is there any other option ?
ps : i think there is a plugin for vs code called preview
https://marketplace.visualstudio.com/items?itemName=jamesblasco.flutter-preview
i am looking for exactly the same but with android studio

Android Application: Returning to the activity where you stopped

I've been making a simple android app here, but i'm stuck with a problem. The app is composed of 1 splash(that is the main activity) and 4 other activities(one of them is used to go to the other 3). Whenever i exit my application and resume it with the process manager, it opens the activity i stopped at. But, when i resume it by clicking on the icon, it goes back to the splash activity. Is there any way to make it always go to where i stopped? Any flag or something i can set on the manifest?
This is an Android bug. The standard behaviour is to return to your application (in the same state as when you left) when launching it from the HOME screen. However, if you started your application for the first time from the installer, this gets broken.
To check if you are seeing this behaviour, go to the Settings->Applications and force close your application. Now go to the HOME screen and start your application. Use your application for a bit. Now press the HOME button to return to the HOME screen and launch your application again by clicking on the icon. It should return to your application exactly the way you left it.
See https://stackoverflow.com/a/16447508/769265 for more information and other links to this long-standing and nasty Android bug.

ios app dosnt work when testing on a test device

When I build the application to the testing phone everything works fine. If i then press the home button go back to the main screen then run the app , again everything works fine.
However if I quit the app to the home screen then close the application from running in the background and then try to run the app again from the main icon, it wont run it just goes to black screen and stops the phone from working or itll load the main view and none of the buttons work.. the only way to fix the phone so its usable again is to lock it and turn the device on again..
has anyone suffered this same issue before?
Sometimes the bootstrap server seems to get confused when you hit the home button and return to the app. If you are testing multi-tasking/background behavior, try the following process:
Build and run from Xcode.
Disconnect your device (your app will quit).
Now, truly quit the app by double tapping the home button and holding down on the app icon.
Finally, reopen the app and test for multi-tasking/backgrounding behavior (your won't get console messages however).

Flex-Mobile: Should I use the menu-stuff provided or is it better not to because the iphone does not have a menu button?

I would not have asked the question if I owned an iphone, but so far I only have an android phone for development.
The question is: Should I use the View.viewMenuItems that are provided by flex mobile? Or should I better embed the functionality in another way? I don't know what possibilities might exist on iphone to open the menu, because it has no hardware button "menu".
By the way: How could I open the menu in the Flash-Builder mobile device emulator - there are no buttons, too....
Thanks!
you can detect the Menu Button through KeyBoardEvent in Android. In Iphone, the Home Button will exit out your application, so you should do some interface buttons to show your menu.
private function _onAddedToStage(event:FlexEvent):void
{
//removes listener
removeEventListener(Event.ADDED_TO_STAGE, _onAddedToStage);
stage.addEventListener(KeyboardEvent.KEY_DOWN, _onKeyDown);
}
private function _onKeyDown(event:KeyboardEvent):void
{
if(event.keyCode == Keyboard.MENU)
{
event.preventDefault();
_text.appendText("\nMenu Pressed");
}
}
The latest versions of Android's Honeycomb OS does not support the menu button. So if you do take advantage of Flex's ViewMenu feature beware that if you build using Flex 4.6 or newer there won't be a button on the latest Android Tablets and iOS devices.
In ADL you can choose Device > Menu to simulate clicking a hardware menu button.