Teensy does not work on Android Device as USB HID Keyboard - android

We are using a teensy 2.0 on an Android 4.4 or Android 5.x device. We want the teensy to emulate a keyboard.
When a push-button is pressed a small letter should be send. After releasing a button, a capital letter should be send.
We have used teensyduino to write the necessary code. It's super simple to do like:
Keyboard.print(char('A'));
....
Keyboard.print(char('a'));
....
Somehow on windows machines it works fine, on Android, we see that the "keys" got jammed and a letter is send multiple times or it's even stuck in a loop.
When using the C code example (like shown here https://www.pjrc.com/teensy/usb_keyboard.html) it works on Android.
Any ideas what could cause this problem? Seems like the USB library when using teensyduino is different.
Any guidance is appreciated.

Related

QML QtQuick controls2 and Android keyboard auto-capitalization

I am facing same issue as this post on Android: QML TextField text erroneously capitalized on device ... All letters are capitalized for TextField control. I have mixed TextField elements where for example when I set echoNode to password, the letters are not capitalized (no issue), while fields with normal echoMode get the issue, which makes me confident its under control of either Android or Qt code.
I switched to investigate from Android side and found this post My Phone Is Capitalizing Every Word which suggests that this problem occurs only when auto-capitalization is enabled on device... I tested it, turned off auto-capitalization on device and the issue disappeared ...
After some investigation I found that most Android apps are build with auto-capitalization aware code, for example this post Why is my Button text forced to ALL CAPS on Lollipop? show solutions with Android Java code .. I wonder if this is a Qt bug or there is something to control it, for example, with QtAndroidExtras classes? while trying to avoid the use of Qt keyboard, I believe/hope there could be a solution from Qt side.

toLowerCase() clones previous input symbols (only on device not in the simulator)

I wanted to implement a normalizer for a username Field (I use Redux form), which would result in all of the capital letters being immediately transformed to lowercase.
I used the Redux Form normalizing example, and it worked very well on the Android Emulator (exactly as in the link above, so I didn't record it).
However, I decided to test it on an Android device (Samsung Galaxy S8+ with Android 8.0) and ran into a weird case: the first letter got lowercased perfectly, but inputting any other letters would clone the previously input ones.. The same happened when I ran the app on my coworker's Xperia with Android 6.0.
Finally, after failing to figure it out, I just moved the normalization to my login saga, where I just split the body into username: action.loginForm.username.toLowerCase(), password:(...). However, I'm curious if any of you have encountered a similar bug/know how to solve it? Such knowledge would definitely make the code more readable:)

Any Chance to make CodeMirror play on Android Chrome?

I understand CodeMirror has issues on mobile and behavior varies with extensions in use.
However, for me it seems pretty much unusable everywhere I encounter it on Android. Have a look at Kotlin Koans and try the Backspace key. Amongst other things, I get gobbledygock and a bunch of newlines.
I did not find a single way around this. Tried two devices (OnePlus 3T and Pixel C) running Android 7 and 8 using on-screen keyboards or bluetooth physical ones. The results are pretty much the same.
This seems pretty odd and I am surprised nobody (Google?) is stepping in to fix it.
I'd like to use an Android device for basic (CodeMirror-based) coding, and I'd very much appreciate a suggestion to get around this annoyance. :)
Thanks
Code Editor inserts a new line above current line on every keypress
Android native app using WebView, backspace doesn't work properly

Difficulty Troubleshooting a Misbehaving App

We have a simple app deployed using PhoneGap targeting Android version 2.2 API 8 and up. On the various android emulator's I've setup it works and on all the devices in the office it works....except one and go figure it's the squeaky wheel in the office. So enough noise has been made that I am now tasked with spending time on only one device. I've setup an emulator as close to it as possible. The device is a Motorolla Droid2 Global running 2.3.4. Know right off the bat I can't setup the emulator to 2.3.4 only 2.3.3. I understand 2.3.4 is only a service patch but I'm trying to mimic it as best as possible.
The behavior that it exhibits is that upon opening on this one device it hangs indefinately with a white modal screen and the spinning animation. Of course I can't get the behavior to happen in development. Further everything is self contained so there are no web services etc. involved. So I need advice on how to debug.
My current thought...may not be a good one is to fall back to the 80's and put a message box display after every significant line of code and push the .apk onto her device.
Also since this happens at the very load of the application here is the code...one line.
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
//super.load( "file:///android_asset/www/index.html");
super.loadUrl("file:///android_asset/www/index.html");
}
Any thoughts greatly appreciated.
JB
This is more a path towards a solution than an actual solution, but anyway:
Get some logging in your javascript and get it connected through to the logcat log; also get logging in any java functions you call or have added to the phonegap base. Run logcat and see what you get in the way of messages from all levels. Develop suspicions and set logging traps for them.

Qt GUI is not behaving normally on Android

I have created an application in Qt Necessitas. When I start it on my Android device I have a GUI which is very different from what I see in Qt Creator.
For example: I have created spacing between a label and textbox and when I start it as a desktop app everything is okay. But when I port it to Android it seems it's not working. And then my textbox is smaller than in the normal GUI in Creator, as are the buttons and so on.
What might cause this and what can I do about it?
And one more thing: I have a problem with resizing the app size to the max of device window. But I get error about loading fullscreen FALSE.
I have started Qt Mobile application. Everything is done in mainwindow. So I have put all commands on my mainwindow. I don't know what to do. If you need a specific file please tell me, so I can post it here.
Try making your Mainwindow smaller and play with sizes. maybe the resolution you are using is not supported by the device.

Categories

Resources