Is it possible to play around with windows touch keyboard using javascript? - javascript

I'm developing a Kiosk application using Electron. But when I tested the app on an actual kiosk with windows 8 OS, the on screen key board is not launching. Is it possible I can manually enable keyboard by using JavaScript? I searched along for the answer but didn't got any proper answer. Also I would like to change the language of the keyboard with users preference? Can I do these using windows on screen keyboard?

How exactly you create kiosk mode? By replacing shell or/and use full screen application? If so - you need to use own internal keyboard. Windows keyboard available only if explorer running and no full screen application running.

I ran across this while researching a similar issue. If you are using a Windows Shell Launcher (details here), then you may still be in luck. The "Touch Keyboard and Handwriting Service" service is still available using this method. You can test that the keyboard is accessible by opening Task Manager and trying to run a new task. If the keyboard pops when you tap the input field there, the keyboard is working at the OS level.
If the keyboard is not opening at the OS level, it may require starting the Touch Keyboard service or setting a couple registry keys like:
HKCU\Software\Microsoft\TabletTip\1.7\EnableDesktopModeAutoInvoke = 1
HKCU\Software\Microsoft\windows\CurrentVersion\ImmersiveShell\TabletMode = 1
All of this said, there have been some issues with how Chrome interacts with the Touch Keyboard starting sometime around Chrome 49-50. Updating to the latest Chrome fixed the issue for me (51.0.2707.106m). I imagine there would also be some overlap since Electron uses Chromium from what I understand.
PS - I just realized this question was for Windows 8. Although my experiences were with Windows 10, I believe the same advice should apply.

Related

Barcode Scanning Via Mobile Browser?

I am looking at trying to scan barcodes from a mobile device.
I been doing some research and I having hard time finding JavaScript libraries that can do this.
I see these projects
zxing
This seems to be no longer in development and just bugs fixes are done?
QuaggaJS
This one, I am not sure if it is development either anymore as changelog is from 2017
quagga2
This seems to be a fork of the one above? So this might be the better choice to go with vs the 2?
What I am trying to achieve is this. I want to go on an andriod device (think phone, maybe tablet), load up chrome or firefox, go to my site click a button and load up the devices camera and scan a bar code (mostly EAN-8/13).
I want to do the same thing on apple devices (iphone and ipad), load up safari (not sure if they got chrome and Firefox on these devices. I don't own apple), click a button and load up their devices cameras and scan a bar code.
I think this is possible in all the libraries I listed above, but I am still unclear if this is possible on apple devices? I read somewhere that before ios 14 it would not be possible?
I am open to other libaries, I can use Jquery, vanilla javascript and I think angular (but I think it is version 3).
Just been doing this same research myself. All of those open source ones you listed seem to be either dead or have performance/reliability issues. Looks like only the commercial versions are really viable at the moment:
Dynamsoft - https://www.dynamsoft.com/store/dynamsoft-barcode-reader/
Scanbot - https://scanbot.io/products/barcode-software/web-barcode-scanner/
There are also two different mobile apps that are viable. These are web apps that just display a browser view and make a barcode scanning function from the app itself available on the page:
https://berrywing.com/scan-to-web-app/
https://www.mochasoft.dk/iphone_barcode2.htm
The second one has a more capable JS API of the two.
UPDATE: I went with that last option from Mochasoft. Turned out quite well.

Microphone input iOS mediastreamtrack (Web App)

I am working on a project that requires a mic input from a mobile phone. I am using the p5.js sound library and everything is working fine on Android (Chrome). Unfortunately I get the message "mediastreamtrack not supported" when I open the website in iOS (both Safari and Chrome).
After some searching, it seems like it is just not supported by Safari or iOS in general?
I wasn't able to find an solution so far. Is there a way to fix this, a way to work around it? I am using getLevel(), fft.analyze(), and fft getEnergy(). But it would be enough to just get the Level.
Basically, I just want to find out if there is an input above a certain level.
I want to avoid creating an App for it and have the function implemented in a website.
Thank you!

Is there really any way to differentiate between android MOBILE chrome and android TABLET chrome through javascript?

I have this requirement where I need to identify chrome browser on Android MOBILE only but not android tablet. Have gone through several posts on stack overflow, but couldn't find any way to do this through java script.
Few related posts, which I checked:
1) Detect and differentiate Android Tablet from Android Phone via JavaScript?
2) http://www.webvanta.com/post/2012-04-08/how-to-reliably-tell-android-tablets-from-phones
3) Detecting whether Android device is a phone or a tablet with javascript
Does this really mean that for Android, we cant differentiate between mobile and tablets? What if we need to have separate website versions for these?
Try using a tool like UA-Parser.js. It will correctly detect almost anything you'll want to know about the device hitting your app, including whether the device is a mobile or tablet device. I use it and can vouch that it does an excellent job. And it's free.
The code will look something like this:
var parser = new UAParser();
parser.setUA(navigator.userAgent);
var result = parser.getResult();
/*
alert(result.browser.name);
alert(result.browser.version);
alert(result.device.model);
alert(result.device.type);
alert(result.device.vendor);
alert(result.os.name);
alert(result.os.version);
*/

Is it possible to create a new window with mobile Chrome packaged apps?

Can you create multiple windows on the new mobile Chrome packaged apps? I ask this because
chrome.app.window.create("host/index.html",
{
id: "host",
bounds: {
width: 1000,
height: 500
}
});
is working fine on desktop () but not so great on the iOS simulator ().
Short answer: Chrome Apps for Mobile do not support multiple windows at the moment.
The root of the problem is that mobile devices don't have traditional window managers, per-se.
We thought about trying to simulate it with some sort of edge swipe gesture, but it raised a bunch of questions: Should we hijack gestures your application may already be using? Should we have title bars that decrease the size of your application surface? What if our solution does not fit with the look&feel of your application? All hard questions to answer, so we opted not to support multiple windows for now.
On Android L-release, theres a cool new feature that was just announced that will allow applications to have multiple views ("windows") appear in the Recents switcher, so perhaps we can experiment with that.. But I think it would still be more confusing for users to switch between Recents than between windows on desktop chrome, so not sure if will be the right option for most applications.
If you want to have multiple views within your application, its best to use a web framework that helps for navigating between them within a single window. This has actually generally been the accepted best-practice for hybrid web apps for a long time.

How to debug web app on windows mobile (7 and later) [duplicate]

I'm not a Windows Phone developer, and I want as little to do as possible with anything related to Microsoft. Nonetheless, I need to get my mobile web app running properly on Windows Phone 7. What debugging tools are available for the platform? Something like the Webkit developer tools or Firebug would be ideal, either from the phone itself or more likely, remotely debugging from my computer.
If such a thing doesn't exist, I'd settle for being able to read Javascript error messages, and view the contents of variables using alert() or similar. At this point, all I know is that my JS is failing: I don't know where or why, let alone how to fix it.
My dev computer is running OS X, and I'd really like to be able to use these tools from OS X if possible. Assuming that debugging tools exist (which I really hope they do) are they designed for Windows only? If so, does anyone know how well they would work with Wine or similar?
EDIT: I have a physical Windows Phone 7 device, so I can use that. However, alert() doesn't seem to be working, which is why I'm posting this question. Does alert() normally work on the WP7 browser?
You'll likely find the Mobile Perf Bookmarklet to be the easiest all-in-one tool for testing any mobile device.
Works well on the iPhone/iPad/Samsung Galaxy Tab in my testing so far.
Quote:
It displays a menu with links that load other bookmarklets including Firebug Lite, Page Resources, DOM Monster, SpriteMe, CSSess, and Zoompf.
Unless you have a Windows Phone 7 device, you will need to run Windows in BootCamp and install the Windows Phone Developer Tools in order to test in IE on the emulator. I don't know about Whine, but I ran into major problems trying to test in Parallels - so based on my experience, I suggest keeping it as simple as possible.
There is no console in IE on the phone, so you will need to use alert, like you suggested, or just write text to a div on your page as a custom console.
If you really want to code in OS X (which I definitely understand), using a separate machine for testing IE in the WP7 emulator is going to be your best bet.
EDIT: I just tested alert and it did work fine on my Windows Phone. My guess is that a syntax error is preventing it from calling.
The following may be interesting
Simple IE debug tool for Windows Phone
Supports
Html traversing
Html node styles, properties, metrics
Reading console output
Executing js on device side from console (including intellisense)
Dynamic script injection - ability to debug live sites
Not supported
js breakpoints
Just wanted to add a note to say that full JavaScript debugging is possible now with Windows Phone 8.1 and Visual Studio 2013 Update 2. Full details are available at:
http://blogs.msdn.com/b/visualstudioalm/archive/2014/04/04/diagnosing-mobile-website-issues-on-windows-phone-8-1-with-visual-studio.aspx
I realize that this doesn't help the versions referenced in the original question (WP7), but I'm hoping this will help people who may find this question and are running a more recent version.
Something that has worked for me, is to test my mobile pages through the Windows Vista built-in Internet Explorer browser.
It comes with a script debugger ( which you have to enable in Advanced Options tab through the Internet Options menu ), and it seems that it gets really close to the Internet Explorer Mobile implementation.
Another tip would be, that, instead of using window.alerts, you can also use document.write or set output to a div content.
I'm using this hack to have console.log send info back to the server (it uses window.fetch, which I'm polyfilling, but could use xhr instead) https://gist.github.com/wheresrhys/bf93057ee3a594454582

Categories

Resources