Is it possible to access phone camera in system / pc browser - javascript

Recently we worked on reading a QR code in our website, with manual focus camera in the System browser (Chrome) and the same is tested with Mobile browser (chrome) with mobile camera. We succeed in doing it but, according to the end user feed back its actually taking time to read/scan with manual focus camera and its easy with mobile camera. But as per our requirement we need to implement it on PC browser with manual focus camera.
Is there any way that we can use Mobile device camera to integrate with the PC browser. Currently we are working with few JAVA based mobiles which allow mobile camera to use as web cam. Any help would be appreciated to crack this.

what I have used is cordova has many plugins that can consume using Javascript or if you use angularjs there is a version called ng-cordova.
Cordova https://cordova.apache.org/
Ng-cordova: http://ngcordova.com/
I hope that will help.

You Can Use Mobile Camera With PC Browser But It Is Difficult
Step:
Write An Application To Capture Picture From Phone And Send It To Browser .
Phone And PC Should Be At Same Network And Phone Accessed From Browser with It Local IP address To Get Pictures .
Users Most Install Your Application On They Phones And Set Static IP Adderss For Phones Example 192.168.1.100
In Website You Most Get Picture From 192.168.1.100 And Show It.

Related

Screenshare browser (android <-> PC)

Im looking for an screen-capture or screen-sharing API, which i can implement into my webapp.
Goal:
I render a webapp with flask on a raspberry and access it with an android tablet (chrome browser).
Now want to share my tablets screen (webpage) via internet, and view it in the browser of the pc.
i tried this example https://github.com/di/screenshare , but its working only locally i guess.
Or is this adaptable to share my browser of the tablet with the www?
Somebody an idea how to this?
As of today WebRTC's Screen_Capture_API is not available for mobile, though you can receive screenshares from desktop.
Browser compatability for Screen_Capture_API:-
The Screen Capture API is what you would need to use to capture a screen shot from a Web browser. It is available in Chrome.

Scanning barcode in Desktop-Browser using mobile

Is it possible that -
We scan a Bar-code by using Android device camera
Then plugging USB with a desktop
Passing the scanned Bar-code data from Mobile to PC
And filling a web-form opened in a browser in the desktop by using the data arriving through USB
If this is possible, can anyone suggest me how to implement this one? I have been looking for some solutions but those works only in mobile.
If you want to use an Android device camera, you don't need to connect the device to the USB port. Not like a webcam, there's no driver for opening Android camera straightforward on PC.
A possible workaround:
Use WebSocket for communication between the desktop browser (E.g. desktop.htm) and the mobile browser (E.g. mobile.htm).
Use WebRTC (getUserMedia) to open Android camera in the mobile browser.
Embed a JavaScript barcode SDK (E.g. ZXing or Dynamsoft JavaScript Barcode SDK) into your mobile web app.
Read barcodes and sync results from mobile.htm to desktop.htm via WebSocket.
Yes, i recomand xZing librabry: https://github.com/zxing/zxing for barcode scanner . Use the barcode scanner to write into a .txt How to Read/Write String from a File in Android or .csv How to export data to csv file in Android? file wich you can copy in your desktop. For the last part i don't have an answer..

Remote Desktop in browser through Nodejs

My requirement is to develop a web page which shows the remote desktop I am connected to. The computer I am trying to connect is on the OpenStack cloud which has a static I.P(public I.P) and can be accessed by providing login credentials.
I don't mind if there is a need to add a plugin to my browser. Is there a tool or API to support this? Glad if there is a Node js solution for this.
Have you tried the remote-control-server package?. It enables you to control your PC from your web browser on your other PC or mobile device remotely. It also supports mouse movements, scrolling, clicking and keyboard input.
You can check it out here.
https://www.npmjs.com/package/remote-control-server
Hope this helps!

How to enable Camera on Windows tablet (SurfacePro) using javascript/Cordova

I'm working for a secure Client where Camera is disabled or not allowed onsite.
We have a requirement to take a picture from bespoke javascript/SAP UI5 application using Windows Surface Pro tablet and upload image into SAP DMS. However, Camera can be used from a mobile application to take a picture.Camera can only be allowed from this application and will be disabled otherwise.
I've checked Kaspel/Cordova APIs allows capturing picture on mobile device by triggering Camera on tablet. I can use these Camera API to capture the picture from device Camera.
https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-camera/index.html
However, the requirement is to first enable the camera to allow taking a picture and then disable camera before exiting the application. Could you please guide me how can I enable the Camera from the application if it is disabled.
Kindly suggest ?
Regards,
Umesh
Whether an application has access to the camera is not the responsibility of the application, but should be configured in the MDM (mobile device management) environment. The MDM should support per-application policies to allow the camera to be used in your application, while camera-use by other applications should be restricted.
Note: When the MDM has secured the mobile device and restricted camera use, it shouldn't even be possible for an application to break through this security and switch the camera back on.

Mobile Web application running when screen is off?

I'm considering building a mobile Web application, using Jquery Mobile that will be used to track truck delivery.
I want to be able to periodically send gps coordinates back to the server? Can this be done if the screen is off?
If not can some alternate approaches be suggested..
If you are good in javascript and html you can go for phonegap. this framework will work like a native application and running from webview like browser. Since phonegap is a cross platform framework you can make your app compatible to many devices like windows phone, Apple, Android. To know more about phonegap or cordova click here
And yes phonegap does many function or features that can customize your application in many way. for example "WAKE LOCK" which keeps your application awake till you force close it.
or if you are using browser you can not run your code for long since browser is a big application android or your mobile system will close it.

Categories