TV device does not support touch operation, users have to use Remote Control. We need to move focus by press left, top, right, bottom direction key, and when the target widget get focus, we will press OK button to response kinds of key event. But I cannot find any flutter interface to solve this interaction, anyone who can help me?
There are SystemChannels for this.
I haven't tried it myself, but it looks like this should do what you need:
DartDocs - SystemChannels.keyEvent
A JSON BasicMessageChannel for keyboard events.
[DartDocs - SystemChannels.textInput[(https://www.dartdocs.org/documentation/flutter/0.0.41-dev/services/SystemChannels/textInput-constant.html)
A JSON MethodChannel for handling text input.
This channel exposes a system text input control for interacting with
IMEs (input method editors, for example on-screen keyboards). There is
one control, and at any time it can have one active transaction.
Transactions are represented by an integer. New Transactions are
started by TextInput.setClient. Messages that are sent are assumed to
be for the current transaction (the last "client" set by
TextInput.setClient). Messages received from the shell side specify
the transaction to which they apply, so that stale messages
referencing past transactions can be ignored.
The later is used in https://github.com/flutter/flutter/blob/4389f07024a4c69f7223401abd4d0ab3ecc45698/packages/flutter/lib/src/services/text_input.dart
There are known issues with physical keyboards thought that might cause this use case not to work
https://github.com/flutter/flutter/issues/11177
https://github.com/flutter/flutter/issues/7943
https://github.com/flutter/flutter/issues/9347
Yep,Flutter doesn't support D-pad navigation yet.But,I have an Android Smart TV and if I connect a Bluetooth mouse,I am able to navigate,swipes,click,etc my Flutter app on the TV.
Related
Used "^%{L}" for performing cntrl+Alt+L in BluePrism but the required window is not opening up, the command is working fine in general when executed manually.
First of all, you need to make sure that you are following the appropriate steps to send keys to an application. The recommendation is to first activate the application (this ensures the keys are sent to the proper application), then use a wait stage (this ensures that BluePrism is sending the keys at the right time; i.e. when the application is ready to accept keys), then use the navigation stage on the root application where the send keys is located, something like this:
(If you are typing in a specific field in the window, then use an additional Focus navigation stage on the Field itself before sending keys).
Within the navigation stage, you have two possible options to send keys:
Global Send Keys
Global Send Key Events
Global Send Keys
You can find the official guide (section 10.2) on the BluePrism portal. It doesn't really detail the sending of combination keys for Global Send Keys, but you really have to do it like this:
^(%l)
Do note that if you send ^(%L), this is similar to sending Ctrl+Alt+Shift+L. The parens indicate that for the keying of %l, Shift is held down. The above is equivalent to ^(%(l)). Normal keys do not require braces either, and they cause issues if used in Global Send Key Events (i.e. {L} means Shift+L in Global Send Keys, but will give you an error in Global Send Key Events).
The relevant part of the guide:
So what you were doing with ^%{L} didn't really make sense to BluePrism. It was probably sending Ctrl+Alt, then separately Shift+L (I cannot really confirm this, but this is my guess following testing on BluePrism which definitely show it doesn't work, however).
Global Send Key Events
You can find the documentation in the same guide and section I linked earlier. This time, it does show exactly how to send combination keys, so for your case, the other option with Global Send Key Events will be:
<{CTRL}<{ALT}l>{ALT}>{CTRL}
I don't really like Global Send Key Events because it's longer to type and you have to be careful about more things, but essentially, it becomes easier if you type the opening and closing syntax before proceeding with the next key. For example to do the above, it's easier to first type <{CTRL}>{CTRL}, then insert the ALT part in the middle: <{CTRL}<{ALT}>{ALT}>{CTRL}, then insert the l (do note here that l and L are equivalent here, which is also weird considering that they are not in Global Send Keys).
I presume that it's a GLOBAL SEND KEY EVENT value that you're looking for.
This is shift+I action value:
"<{SHIFT}I>{SHIFT}"
I would try for ctrl+Alt+L maybe something like this:
"<{CTRL}{ALT}L>{CTRL}"
the "<" & ">" is Push down & Release
Global Send Keys is going to send the keys to whatever application has focus on screen, so I would recommend:
Set focus on the desired window by either using a Navigate stage to "Activate Application" or "Global Mouse Click".
Use Global Send Keys
Keep in mind that a Global Mouse Click could again result in something unexpected as its sending the event directly to the screen, and another application/window might be covering the area you've just clicked.
For more info on Global Send Keys and Global Send Keys Event I would read the BluePrism manual for this: Send Keys and Send Key Events
It might also be worthwhile studying some surface automation principles as it can help get you a better understanding of what these Global actions are doing: Introduction to Surface Automation
Activate the application using navigate stage.
Add a 1sec wait between activate and send keys.
Use global send keys event. <{ctrl}<{alt}L>{alt}>{ctrl}
Ensure you are using the root element in Application Modeller (the first at the top of the list) and not any of the child elements. Use a navigate stage with that element and either Global Send Key or Global Send Key Event action. The syntax "^%{L}" is otherwise correct, although you don't say what is it that you are trying to automate (Excel, Word, IE, Citrix...??).
Try to use Global SendKey instead of G.S.Events. I.e. SHIFT+HOME = "+({HOME})"
regular brackets needed for blue prism to understand where to release Shift ("+").
I've being trying to build a simple HID mouse Service record based upon the example in the bluetooth document.
https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=246761
I've pieced together the majority of the plist but it's not 100% correct.
I understand the requirements from the BT hid doc but Im just having trouble fitting it into a plist file.
For example, if I try to set the
kBluetoothSDPAttributeIdentifierHIDDeviceSubclass 0x0202
it gets misinterpreted as
kBluetoothSDPAttributeDeviceIdentifierProductID 0x0202
Another Example is if I try to set
kBluetoothSDPAttributeIdentifierHIDDescriptorList = 0x0206
My log files show a message saying
attribute id : 0x0206 is reserved or undecoded
Here is the Service Record That I have created so far.
Id really appreciate it if somebody could explain to me what's wrong with it.
HID Boot Mouse
I have implemented an af:calendar in my page. Everything goes fine, apart that I cannot control it, I can not control when the user changes the views of the calendar or when the user moves to a different week or month. Does anyone knows how to detect what operations the user is making with the calendar.
Actually everything is described pretty well in the documentation.
The calendar does not fire "high level" events, for example it does
not fire specific events for edit, delete, create, context menu, etc.
Instead calendar fires the "low level" Calendar and CalendarActivity
events.
Let's take a calendarActivity. A calendarActivityEvent will be queued
if the user does any of the following on a calendarActivity
clicks
right clicks
focuses and presses a key
Even though a calendarActivityEvent is queued for all these, you can
tell these apart because keyboard, mouse, and triggerType information
will also be available in the event.
More details provided here.
If you need something really special, you can always resort to something like jquery to handle UI events and then relay it to the java side.
I have a channel that publishes thermostat events. The events are grouped by temperature changes and thermostat control changes. I have 3 listeners (web pages): summary, temperature changes and thermostat changes.
I'm thinking I set up a channel 't1' (thermostat 1) and have events such as tc (temp change), tm (thermostat mode change), tsh (temperature set heat), etc.
The temperature change page is easy to set up: subscribe to 't1', bind to 'tc'.
But the thermostat control page is harder. Can I do something like: subscribe to 't1', bind to NOT 'tc'? This page wants to receive events on everything except 'tc'.
What I've done is a loop in the webpage javascript to generate multiple 't1'.bind() calls for each event (tm, tsh, tsc, etc.). t1.bind(tm), t1.bind(tsh), t1.bind(tsc), etc.
And the summary page needs to see all events. So I wondered about using bind_all().
But if I use bind_all I get a lot of pusher events also. I guess I can figure out how to filter those out but wondered if you guys have any better ideas.
Thanks for any suggestions!
I figured this out by using multiple channels (which is a feature), with specific events.
I have a program that basically just queries a webservice, and if any data is returned it will show that information to the user, but if there is nothing to display it will just wait until the next scheduled time and run.
Right now it just puts a table in front of the user, there is nothing in the status bar that they can then select and see the actual information.
So, I have two questions.
Is there a better way to show
notification information to a user
that is less intrusive?
Should the View, with a UITable,
have a button to dismiss the view
when they are finished?
UPDATE:
It seems my question isn't clear enough, so I have the data showing up in the table properly.
My problem is before I display the data.
Currently, periodically the timer will fire off my method, and if there is any events pending for the user the table will show up right in front of them.
That is bad design, IMO, so what I would like is some simple way to let them know that there is something pending and they can look at it when they get a moment.
Ideally I would have something in the status bar to show that they have some events, but it appears that isn't an option that I can see.
One option is to see if I can have the table come up minimized and have some sound or vibration go off, but again that can be bothersome to the user, as it may interrupt what they are doing.
The proper solution appears to be that while in the background just put up a notification if there is any new information, so the user can close the notification or switch to view the details.
This isn't the ideal solution, but appears to be the best choice on the iPhone.