Dart Language and Android: accessing phone's camera - javascript

I'm starting a project to develop a mobile application where I'll need to access the phone's camera and retrieve a picture/photo.
However, before going to a native application, I would like to know if Dart (compiled to JavaScript, of course) could access Android phone's camera and retrieve that picture. In that case, the application would be web based.
Could Dart do it or I'll need a native application?

(It's more depending on the browser than on the language...)
There is a dedicated html input tag for this since android 3.0 but i dunno if you can easily access it from dart or if it's enough for you..?
There is also the more conventionnal Html5 mediastream (that should fit all your needs) but it wont work below android 4.4...

Yes you can access the camera.
window.navigator.getUserMedia(audio: false, video: true)
.then((MediaStream stream) {
// Stuff happens here
});
Also I've been looking at the Rikulo Gap package and it seems to be able to access the camera as well as other mobile sensors.
https://github.com/rikulo/gap

Related

Is it possible to video record the screen using MediaRecorder using javascript?

I would like to capture either part or the whole screen and record it as a video from a web page in javascript.
Currently, I can record video from a web cam with the built in MediaRecorder but I would like to know if it is possible to get screen output and use that as a stream for the MediaRecorder?
I'd like to know if there is a standard way to do this without using any 3rd party libraries? (I can record audio/web cam video in almost all the browsers as of 2018)
You can record Screen or Windows only using browser extensions (in Chrome for instance with these). Which as you can see they ask specific permissions to the browser.
Alternatively you can record content inside your web app using MediaRecorder. But unfortunately has a pretty limited support.
As you pointed out, stream from webcam is widely supported today.

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!

Dial number from web page

I want to dial number using javascript.
I have used following code
document.location.href = "tel:15555551212"
It brings me to dial screen of mobile application. But I want to make a call directly.
I have also used "callto" but it is not working.
This is not possible, unless:
the Web browser holds the CALL_PHONE permission (so that the user knows at install time that this app might place phone calls), and
the Web browser exposes some means to have you place a phone call directly, perhaps via some DOM extension or magic snippet of JavaScript
Few, if any, browsers will meet these criteria.
A hybrid application (e.g., PhoneGap) could do this, given the proper permission and some API to enable it (e.g., PhoneGap plugin, if it is not part of the standard PhoneGap API).
You will probably need to use apache cordova to get access to native device APIs, including the one you can dial with. Link to the respective plugin
This is obviosuly only possible on mobile devices, and this plugin can only operate on iOS and Android. For more information about cordova, see this Link.

How to access my computer's camera in a desktop Safari web application

I'm working on a web application and I need to be able to access my computer's camera in Safari much like Firefox and Chrome are able to through the use of getUserMedia. What is Safari's way of handling native camera access when on a desktop? Do I need to use flash or can I use html/javascript?

Somehow access Android body sensor from a web page?

I'd like to create a web page which can access a body sensor on an Android tablet (to detect if someone is standing in front of the tablet).
I'd love to do this with a web page (an actual web page, not a PhoneGap/Cordova app). I've seen demos of accessing the webcam from a web page via HTML5/JS in Opera. I'd love to do the same with a body sensor.
Is there ANY way to achieve this? I'm okay with using a browser plugin if necessary or even a customed Android browser (that supports HTML5/CSS3).
Alternatively, is this even possible with PhoneGap/Cordova?

Categories