i need to make a app with support for access the camera on the mobile devices like iphone
See http://www.html5rocks.com/en/tutorials/getusermedia/intro/
and https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getUserMedia
I found this as well. Seems somewhat more straightforward.
http://davidwalsh.name/browser-camera
You will need to find a way to pass the picture back to Xojo.
Here the same author explains how the content of a canvas can be made into an URI, which can then be used to retrieve the picture from Xojo :
http://davidwalsh.name/convert-canvas-image
Good luck !
Wow.
I want to understandhow this javascript and html is implemented in xojo.
Can Anybody share a complete XOJO code from Michel link?
Can this be done on Mac OS? any links?
Lennox
thanks for the info
If you use a WebFileUploader and press the + button on a mobile device the user can access the camera/library that way and add the taken picture to be uploaded to the server for further processing. Might not be what you want though just a little tip
[quote=220388:@ronaldo florendo]I want to understandhow this javascript and html is implemented in xojo.
Can Anybody share a complete XOJO code from Michel link?[/quote]
Unfortunately, the material I linked to is not in Xojo, but HTML and JavaScript. The principle is there, but that will require work to be adapted to Xojo Web.
Maybe if Alexis pursues this and is kind enough to share what he obtained…
[quote=220402:@Lennox Jacob]Can this be done on Mac OS? any links?
[/quote]
This is a thread about Web. Mac OS X has different ways of accessing the camera. MBS has a solution. See http://monkeybreadsoftware.net/
Thank you for the tip.
I do have this snapshot widget I built using the WebSDK which takes a picture from the scenery camera on my Galaxy S5 if that helps.
Superb ! Thank you Wayne.
Hi Wayne,
How to use SnapshotWidget?
Ouch. I had not tested the widget on PC. On Mac with Chrome it worked flawlessly.Same thing with Chrome on PC. But Edge triggers an error :
[code]Could not execute returned javascript: Object doesn’t support property or method ‘getSources’
…/ snip/…
MediaStreamTrack.getSources(function(sourceInfos) {
var audioSource = null;
var videoSource = null;
[/code]
FireFox 40 has the same issue :
Could not execute returned javascript: MediaStreamTrack.getSources is not a function
.../...
I quickly looked at the code, I see you do check for the browser type and have mozGetUserMedia for Firefox.
Could it be the MediaStreamTrack.getSources(function(sourceInfos)
construct ?
This project came about by a sales person telling a client that “yes you can use the camera”, so I needed to prove that I could. The project is currently paused while scoping takes place. And we do have ability to tell the client which devices they can use. I also need to get the flash working at some stage.
This is also my first websdk attempt and is offered here as is.
[quote=227540:@Wayne Golding]This project came about by a sales person telling a client that “yes you can use the camera”, so I needed to prove that I could. The project is currently paused while scoping takes place. And we do have ability to tell the client which devices they can use. I also need to get the flash working at some stage.
This is also my first websdk attempt and is offered here as is.[/quote]
I see. It is quite nice already. It should not take much to have it working on all supporting browsers.
After few experimentation, I managed to have a working prototype:
Im using it on Windows 8 PC (web apps), and it works fine.
Here is the code:
BUTTON CLICKED
sub Action
SnapshotWidget1.Snap
end sub
EVENTS:
sub SnapShot(Photo as Picture)
dim f as FolderItem
'//SAVE PHOTO ON DESKTOP
f=specialfolder.desktop.child("mypic.jpg")
ImageView1.Picture = Photo
f.saveaspicture ImageView1.Picture
end sub
I’d try this from a remote device not the same one thats running the web app just to be sure
Nope
There’s no “merge conversations” in esotalk
Perhaps lock the other conversation then?
how to add snapshot widget to xojo?