Electron converted to uwp--problems when submitted to the windows store - javascript

Here is what microsoft told me.Is it possible to browse the web without using the framework provided by microsoft??
Please take the following action
We reviewed your submission and identified some changes that are needed before we can publish or update the app. Please make these changes and resubmit your app. For more information, contact reportapp#microsoft.com Please include your app ID so we can act quickly.
Capabilities : 10 Centennial Active Presence Check
Notes To Developer
Your app has not been approved for the Centennial program.
Tested Devices: (Win 10 S) Microsoft Surface Laptop, Acer Iconia W700
Capabilities: 10 Centennial Win32 Presence Check
Notes To Developer
Your account has not been approved for the Centennial program.
Tested Devices: (Win 10 S) Microsoft Surface Laptop, Acer Iconia W700
App Policies: 10.2.1 Browsers
Notes To Developer
Because your app browses the web, it must use the Windows Platform HTML and JavaScript engines. You can find information about the platform here:
dge Developer Blog: https://blogs.windows.com/msedgedev/2015/08/27/creating-your-own-browser-with-html-and-javascript/
GitHub Browser Project: https://github.com/MicrosoftEdge/JSBrowser/tree/v1.0
XAML WebView API: https://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.webview.aspx
HTML WebView API: https://msdn.microsoft.com/en-us/library/windows/apps/dn301831.aspx
Tested Devices: (Win 10 S) Microsoft Surface Laptop, Acer Iconia W700
here is the screen shot

Store Policy 10.2.1 seems pretty clear on this:
Products that browse the web must use the appropriate HTML and JavaScript engines provided by the Windows Platform.
So no, you can't browse the web without using Microsoft's own framework for doing this.
I can't say how the store detects submissions using alternative frameworks, but personally I wouldn't spend any time trying to find a way around it. Even if there was an alternative way (and I'm not saying there is), I would expect Microsoft to wisen up to it in time and kick out of the store any apps using it.

Related

Is there a way to detect if MS Visio, MS Word, or any MS Office app is installed on computer from IE & Chrome?

I have a SharePoint 2019 document library wherein I have a custom JavaScript code to open the MS documents (Word, Excel, Ppt, Visio) in the client application. I am using Office URI schemes for opening the documents in client apps. However, if there is no client application installed on the computer, the Office URI scheme fails without throwing up any error. I want to know if there is a way to check from the browser (IE and Chrome) if a particular MS application (Visio, Word, etc.) is installed on the computer.
P.S. I have tried the ActiveXObject approach, but for some reason, it didn't work for me and, also I want a solution that will be cross-browser compatible and afaik ActiveXObject is supported only on IE.
(Current MSFT employee in Office here. On the team that owns the link invocation handling for the native client side but not the SharePoint or JS side)
The root problem is that the browser object model doesn't give you a result for navigating to the ms-word/etc links. As I understand it that is why the built-in SharePoint open UX has 2 options. One to open in the browser and another to open in the native client. And there is interstitial UX to prompt the user if the file did not successfully open in the native client.
(And, correct, the ActiveX solution will not work even with modern Edge on windows either and is a dead-end technology wise.)
You can try using ActiveX technology to instantiate Office application as described on the detect microsoft office version using javascript thread. But Chrome is not aware of COM technology. So, any code for creating an Office application instance will fail.

Is it possible redirect user to launch scanner application?

I'm writing an application to show the uploaded documents using python3-django-1.8.1. We also want to allow user to scan a document.
As you know that, there is a print dialog in javascript.
window.print()
Is there any support in the browser to scan a document?
Is it possible to launch a scanner application on clients machine, using javascript/python?
like:
"Windows Fax and Scan" on Windows machines
"Simple Scan" on linux, etc. OR
Whatever the default scanner application on respective os of the client.
Any third party python application/js plugin allow to scan a document?
I am not too familiar with a image scanning feature, but I had faced a similar issue with a barcode scanner.
You cannot actually expect something similar to printing, as printing is a browser-enabled feature whereas scanning is something a typical browser does not do.
Moreover, JS has no capability of accessing peripherals directly. What would happen if this page would be browsed by a mobile? (A scan from the camera would be fantastic but never heard of anything like it).
Having said that, there is a scanner.js SDK:
scanner.js enables any web page to acquire images from scanners using JavaScript in most desktop browsers like IE, Chrome, Firefox and more. In most cases, software install is not required and the user can enjoy a great scanning experience.
Also there is a Twain SDK:
Dynamic Web TWAIN is a TWAIN-based scanning SDK software specifically designed for web applications.
These are supposingly dealing with your issue but I haven't used them. Scanner.js demo is not even working now on my Ubuntu machine. My guess is that they are not entirely JS-based anyway (com objects and stuff).
Other things to do is to have a small Firefox plugin developed if your case is specific (such as Intranet) so to control the users' browsers.
Last, but not least, another option would be to develop and provide a small desktop app to handle scanning and uploading.
If there is any other recommendation I would love to see it.

How can I access to USB stick from website?

I'm planning to make a login system by USB, so if you put in a USB-drive and open a specific webpage, the website asks the USB-drive for the code (e.g. by a JavaScript file, a redirect or something like that).
The problem is, because of sandboxing, you can't load or redirect to local files. I don't know a solution for this problem. Can you guys help me? I don't need specific code, just an example or something in that way.
Maybe you can read up on USB-HID. Wikipedia:
The USB human interface device class (USB HID class) is a part of the USB specification for computer peripherals: it specifies a device class (a type of computer hardware) for human interface devices such as keyboards, mice, game controllers and alphanumeric display devices.
Here are some references:
USB HID (Human Interface Device)
node-hid - Access USB HID devices from node.js
DepthJS: 'Allows any web page to interact with the Microsoft Kinect using Javascript'.
A related Stackoverflow question:
Write data to USB HID using Javascript, HTML5, or any cross platform language (supports Android)
One other possibility is to check out the Chrome HID (Human Interface Device) APIs:
Interacting with USB HID devices from web apps – via Chrome Apps, see below
Relevant Chrome API docs
Please note that for the time being, you cannot interact directly with the USB device (i.e. you cannot access any WebAPI offering that kind of fine-grained control).
Building a Chrome App (different from a Chrome Extension) may help; This article may point you in the right direction, since it also provides sample code.
The only way I can think of is putting a html file on the usb stick that essentially generates some sort of login token and gives you a link or a form to a login processor. You can then access the webpage by opening the local file first which will redirect you to the actual webpage.
This local script may include a javascript from the server to get some challenge-response-data which it hashes somehow (perhaps in combination with a password) and puts it into the form data.
Web PKI authentication from Modern Browsers may be achieved by using Browser Extension. One such extension is Signer.Digital browser extension. Use below Javascript promises from the APIs provided by Signer.Digital extension.
SignerDigital.getSelectedCertificate() to register user's certificate
SignerDigital.signHash(hash) to sign token at browser and verify at server
For all Javascript APIs refer to SO Answer https://stackoverflow.com/a/63173083/9659885
Disclaimer : I work for a company supporting the application below
Hello, you may try to use Nexu open-source application for communication with smartcards or USB tokens. It also support PKCS 12 keystores.
For example, the application is connected to the DSS webpage on the website of European Commission : see the link.

Using JavaScript in my web app to delete files on the user's smart phone

I'm a software developer from Germany and I have a special problem concerning smart phones, websites and security!
My web application - which is optimized for smart phones - allowes it to upload photo files (made by the smart phone camera) up to our webserver.
(I use the regular HTML File Control.)
It works fine!
But now we think about possibilities to delete the uploaded photos on the smart phone - via the web app!
Is there any chance to realize that?
Our users work with Firefox 17.0 for Android.
Maybe Mozilla offers proprietary JavaScript code to get access to the local smart phone devices ... ?
Or is there any possibility to change the local security settings of Firefox Mobile?
If both solutions can't be realized, could I develop a smart phone app (which is locally installed) that deletes the photos on the phone? I'm sure I could!
But then I need a possibility to start the app using my website code.
So I have the same security problem - I think so ... again I need a way to "leave" my website to get access to local devices via JavaScript or something else (to start the installed app on the phone).
Is there anybody who has an idea?
Thanks in advance.
Thomas

Gather System information using .Net web Application from Mac and Windows PC

In one of my project i have to gather full system information (hardware and software) of desktop (Windows and Mac).
While searching i found can use WMI in .net to gather windows system information and code samples are also available at codeproject.com
But i cannot manage to find how to gather system information from mac pc using website application.
Is it possible to gather system information using .net or javascript for Mac PC.
Please Help.
You can't get "full system information" without executing deployed code to the target machines (or at least breaks outside the browser sandbox).
I need to clarify that, as it seems you have the impression that you think the .NET WMI code can run in a web application and query anybody who browses to it.
Also, the WMI stands for Windows Management Instrumentation, and that ends the hope for getting it running on a Mac.
I think your best bet is looking at WBEM.

Categories