capturing keyboard events in adobe air background - apache-flex

I am struggling to find a way so that i can capture keyboard events in adone air even when application is in background mode and sitting in system tray on windows.
Basically i want to make it so that if a user presses a certain combination of keys then adobe air detects it and performs a task. This all happens when the air desktop application is in background and focus is not on air app.
I found extension to capture native mouse movements but was not able to find any extension for capturing keyboard evenets.
Please suggest.
Thanks

As the answers to this question state, you'll need to write your own native extension (or external app, invoked with NativeProcess) to globally capture keyboard events.

Related

Carplay automation with appium(XCUITEST driver). Unable to click on element

I am looking for the solution for the automation of native IOS application with CarPlay component. All the CarPlay context is implemented using Swift and consist of XCUIElements.
When my testing device is connected to the headunit and CarPlay application under the test is launched I can access native context of the application by using iOS appium driver. The phone and CarPlay application native contexts are mixed together and available for interaction (getAttributes(), getText(), isDisplayed() and etc.). The only problem is clicks.
When I am trying to click the element the driver clicks in a different place. I didn't figure out why. I was thinking that the deviation is similar on each click, but I was wrong. I was not able to find any consistent pattern.
Any ideas how to avoid coordinates clicking because I am planning to test on a different headunit screen resolutions?

Will ASP.NET Form Get value from Barcode

ASP.NET Form. If running a form in a browser on a small (Android) device with a barcode scanner, will the scanned barcode go into the ASP.NET textbox? Or I need to add something to the application?
Well, it going to depend on which of the 150+ barcode scanners you decide to grab from google play.
However, the answer is yes, or no. It will depend on the kind of scanner.
If you download just a scanning application (software based - not built in scanner).
The reason is Android (and even iOS) don't allow one application to set focus, get/grab/take data from other applications. Nor is the reverse allowed. If that was possible, then the app could also get/grab/take values from when you are say running your on-line banking application.
I don't think Android thus supports focus to another application during scan that has focus. Now if this is factory supplied software on the phone? Then yes, this works like a desktop keyboard "wedge". That means the program does not know if you are typing from keyboard, or input is from the scanner (hence the name keyboard wedge). These will work with a web form.
However, we now seeing the rise of software based keyboard wedges. That means the software scanner is installed on android as a custom keyboard. And this in case, then once again, it will work in a web form.
So, for devices with a built in scanner? yes, that will work in all applications. For a software only (uses built in camera), then again, this is possible if the software in question works as a keyboard/wedge scanner.
If you going to adopt android scanning? then use a purpose built Android scanner.
And another possible if you want to use a software scanner? Write a small android application and have it talk to your web site. This I think is the best solution, but of course means you have to adopt some Android dev tools.
So how this works will depend on if the android device has a built in scanner, or it is a software + camera based scanner. However, it would seem that even now installable software based scanners in theory can be made to work for any application since the application is running and behaving as a user installed keyboard.
So, you have to check the particular device. The answer is not in all cases, and the answer depends on if you using a Android device with a built in scanner, or you looking to use any Android phone as that scanner.

Screen Sharing with Qt WebGL (like VNC)

I just tried out Qt WebGL and was thrilled to see my app running in the browser w/o making any changes (other then starting it with -platform webgl)!
I would like to use WebGL for screen sharing so that it would still usable on the device while also being able to interact with the app through the browser. Is this somehow possible with the current platform plugin or would it be possible to extend the platform plugin to support this in the future?
Qt WebGL streaming is intentionally only done for a single user per application. The reasons are mentioned here in a presentation about Qt WebGL streaming:
Why single user?
Problem with user input
Problem with querying the GPU
We can improve security
However, I found a blog post presenting a solution: start multiple parallel processes of the Qt application, one per use, and then sync the state of all these processes using Qt Remote Objects. One of the processes would be the "master application", and the others would duplicate what it shows. The application's state has to include everything that influences its rendered content, including model content and window size.
A detailed recipe for this technique can be found in this article.
There is also this section in a Qt blog post that confirms that this approach is possible:
By the way, there is an idea to complement streaming with an ability of mirroring as in some cases having the latter is more important.
Speaking about mirroring, I would like to mention our recent webinar [edit: link update by me] that we had together with Toradex. There you can see an interesting combination of WebGL streaming and Remote Objects, which allows you to implement mirroring functionality as of now already.
Within the webinar video linked above, the demonstration of mirroring / screen sharing starts here. This type of mirroring is even two-way, allowing to operate the application from multiple screens simultaneously.
Unlike in "real" screen sharing, the mouse pointer would not be shared. You might however be able to track the mouse pointer position as a state property of the master application and then paint an "artificial" mouse pointer at that position in the client applications.

HTA Gamepad API (or alternatives)

I am building an game launcher app (similar to Steam Big Picture) using HTA and I'd like to be able to control this app using my X360 controller.
One way to do it is to use Xpadder and emulate keyboard presses, but since MS Edge has a native support of Gamepad API, I wonder whether there is a way to enable it for HTA (since for example flexboxes can be enabled for HTA).
Or.. if it's not possible, are there any alternatives for HTA? That means something I can write in HTML5+CSS3+Javascript, have it start in fullscreen and have it launch .bat files on my computer without asking for any permissions?
Judging by this answer to a similar-ish question...
I suspect that an HTA would work in Windows 10, but only in IE9 mode. It would be a major shift if Microsoft built Edge with HTA support.
I would conclude you wouldn't be able to use the Gamepad API in a HTA because it uses the IE 9 rendering engine.
Your best bet is give it a try and test it for yourself.
Useful Links
Can I use Gamepad API?

Flex application suspended while in the background using Safari on Mac

Users of my Flex application report that sometimes the application is freezed when the browser window is minimized or they select another active tab over it. In this suspended state, the application receives no CPU share and all network connections it uses are closed. When the browser window is restored, the application is resumed. This happened with Safari 5 on Mac OS Leopard, with both Flash player 10.0 and 10.1. I searched a lot but I could not find any information about such behavior.
This behavior is not reproducible on each Mac with Safari, so my questions are:
Under which circumstances this may happen?
Is it possible entering in suspended state to be prevented and how?
Is it possible for the Flex application to be notified about going into sleep mode and wake up back?
This is a Safari thing and is by design. Newer versions of Safari suspend flash content that is not in the foreground tab (not sure when this started, version 4?) For instance, if you have multiple tabs open, each with a youtube video playing and you go back and forth between the tabs, only one of the videos will be playing at a time. To answer your specific questions:
This will happen to any flash content that is in a background tab (not sure about the minimized state.)
Not aware of a means of disabling this behavior.
You may want to dig around in the Safari documentation to see if there is some sort of JavaScript event that you can grab onto, but I don't think you are likely to have success there.
Good luck.
Are your users using Flash Player 10.1 ? As part of the performance improvements in 10.1; I believe an application in a minimized state will get throttled in order to use less system resources / battery power.
I don't think there is any way to prevent this; and no APIs exposed that relate to this.
Other people I've spoken to have had issues with using local connections between minimized apps and active apps. I'd bet there is already a bug in the bug base on that.
Wrt the following above:
.I don't think there is any way to prevent this; and no APIs exposed that relate to this.
You may want to check out if Silverline from Librato can help you control how much and which applications get what system resources (CPU, memory, Disk and Network IO) with dynamic control based on application demand. If the above issue is a feature of flash - then obviously it may not help. But if you are trying to say run multiple applications / processes and would like to control who gets how much system resources (dynamically) then you could try Silverline - it does not require any changes to OS or app. http://silverline.librato.com

Resources