<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Sorry, but this is not the in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Accessing-camera-from-web/m-p/1116236#M74205</link>
    <description>&lt;P&gt;Sorry, but this is not the right forum to use for working out issues associated with hosted web apps. I recommend you use StackOverflow.&lt;/P&gt;

&lt;P&gt;BTW -- there is no "deviceready" in a web app, only in a Cordova app. Also, your app is not "compiled" it is "packaged" inside a webview. Unzip the APK file and you'll see. The XDK builds a standard Cordova app, so searching the web for problems associated with Cordova apps may also help. I recommend that you do not use Cordova as a way to prototype hosted web apps, they are quite different environments.&lt;/P&gt;

&lt;P&gt;p.s. There is no such thing as "navigator.camera.getPicture()" in a web app. You are relying on a Cordova plugin, which can only exist and be used in a Cordova webview. This is a fundamental difference between the Cordova webview environment and a hosted web app environment.&lt;/P&gt;</description>
    <pubDate>Sun, 16 Oct 2016 23:46:00 GMT</pubDate>
    <dc:creator>PaulF_IntelCorp</dc:creator>
    <dc:date>2016-10-16T23:46:00Z</dc:date>
    <item>
      <title>Accessing camera from web</title>
      <link>https://community.intel.com/t5/Software-Archive/Accessing-camera-from-web/m-p/1116235#M74204</link>
      <description>&lt;P&gt;I did a demo to use camera form mobile, app working fine if html file is locate inside intel XDK file when i compile the html, but if i want call camera from a php file in web, with the same code is not working ,how can i call camera form a php file up in the web? this is mi code that work local when i compile, but if i upload this code to my server, not working, just give me a little orientation please, thanks&lt;/P&gt;

&lt;PRE class="brush:xml;"&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;title&amp;gt;Capture Photo&amp;lt;/title&amp;gt;
    &amp;lt;meta name="viewport" content="width=device-width, initial-scale=1"&amp;gt;
    &amp;lt;script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type="text/javascript" src="http://netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"&amp;gt;&amp;lt;/script&amp;gt;
       &amp;lt;link href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"rel="stylesheet" type="text/css"&amp;gt;
       &amp;lt;link href="http://pingendo.github.io/pingendo-bootstrap/themes/default/bootstrap.css"rel="stylesheet" type="text/css"&amp;gt;
    &amp;lt;script type="text/javascript" charset="utf-8" src="cordova.js"&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script type="text/javascript" charset="utf-8"&amp;gt;
    
    var pictureSource;   // picture source
    var destinationType; // sets the format of returned value
    // Wait for device API libraries to load
    //
             
        
    document.addEventListener("deviceready",onDeviceReady,false);
    // device APIs are available
    //
    function onDeviceReady() {
        pictureSource=navigator.camera.PictureSourceType;
        destinationType=navigator.camera.DestinationType;
    }
    // Called when a photo is successfully retrieved
    //
        
        
        
        
    function onPhotoDataSuccess(imageData) {
      // Uncomment to view the base64-encoded image data
      // console.log(imageData);
      // Get image handle
      //
      var smallImage = document.getElementById('smallImage');
      // Unhide image elements
      //
      smallImage.style.display = 'block';
      // Show the captured photo
      // The inline CSS rules are used to resize the image
      //
      smallImage.src = "data:image/jpeg;base64," + imageData;
       document.getElementById("txtTabla").value = "data:image/jpeg;base64," + imageData;
        
    }
    // Called when a photo is successfully retrieved
    //
    function onPhotoURISuccess(imageURI) {
      // Uncomment to view the image file URI
      // console.log(imageURI);
      // Get image handle
      //
      var largeImage = document.getElementById('largeImage');
      // Unhide image elements
      //
      largeImage.style.display = 'block';
      // Show the captured photo
      // The inline CSS rules are used to resize the image
      //
      largeImage.src = imageURI;
        
       
    }
    // A button will call this function
    //
    function capturePhoto() {
      // Take picture using device camera and retrieve image as base64-encoded string
      navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 50,
        destinationType: destinationType.DATA_URL });
         
    }
    // A button will call this function
    //
    function capturePhotoEdit() {
      // Take picture using device camera, allow edit, and retrieve image as base64-encoded string
      navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality: 20, allowEdit: true,
        destinationType: destinationType.DATA_URL });
    }
    // A button will call this function
    //
    function getPhoto(source) {
      // Retrieve image file location from specified source
      navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: 50,
        destinationType: destinationType.FILE_URI,
        sourceType: source });
       
       
    }
    // Called if something bad happens.
    //
    function onFail(message) {
      alert('Failed because: ' + message);
    }
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;
     
    &amp;lt;img id="smallImage" src="" class="img-responsive" /&amp;gt;
    &amp;lt;img style="display:none;" id="largeImage" src="" class="img-responsive"/&amp;gt;
       &amp;lt;a class="btn btn-block btn-lg btn-primary" onclick="capturePhoto();"&amp;gt;&amp;lt;i class="fa fa-camera fa-fw fa-lg"&amp;gt;&amp;lt;/i&amp;gt;Tomar Evidencia &amp;lt;/a&amp;gt;
       
      
      
      &amp;lt;form class="form-horizontal" action="http://www.madraccoonstudio.com/esgari/gestion/subir.php" method="post" enctype="multipart/form-data"&amp;gt;
&amp;lt;fieldset&amp;gt;

&amp;lt;!-- Form Name --&amp;gt;
&amp;lt;legend&amp;gt;Enviar evidencia&amp;lt;/legend&amp;gt;

&amp;lt;!-- Select Basic --&amp;gt;
&amp;lt;div class="form-group"&amp;gt;
  &amp;lt;label class="col-md-4 control-label" for="estatus"&amp;gt;Estatus&amp;lt;/label&amp;gt;
  &amp;lt;div class="col-md-4"&amp;gt;
    &amp;lt;select id="estatus" name="estatus" class="form-control"&amp;gt;
      &amp;lt;option value="1"&amp;gt;Option one&amp;lt;/option&amp;gt;
      &amp;lt;option value="2"&amp;gt;Option two&amp;lt;/option&amp;gt;
    &amp;lt;/select&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;
    
    &amp;lt;input name="txtTabla" type="text" id="txtTabla" value=""&amp;gt;

&amp;lt;!-- Button --&amp;gt;
&amp;lt;div class="form-group"&amp;gt;
  &amp;lt;label class="col-md-4 control-label" for="singlebutton"&amp;gt;&amp;lt;/label&amp;gt;
  &amp;lt;div class="col-md-4"&amp;gt;
    &amp;lt;button id="singlebutton" name="singlebutton" class="btn btn-primary"&amp;gt;Subir&amp;lt;/button&amp;gt;
  &amp;lt;/div&amp;gt;
&amp;lt;/div&amp;gt;

&amp;lt;/fieldset&amp;gt;
&amp;lt;/form&amp;gt;
  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2016 18:35:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Accessing-camera-from-web/m-p/1116235#M74204</guid>
      <dc:creator>israel_p_</dc:creator>
      <dc:date>2016-10-16T18:35:45Z</dc:date>
    </item>
    <item>
      <title>Sorry, but this is not the</title>
      <link>https://community.intel.com/t5/Software-Archive/Accessing-camera-from-web/m-p/1116236#M74205</link>
      <description>&lt;P&gt;Sorry, but this is not the right forum to use for working out issues associated with hosted web apps. I recommend you use StackOverflow.&lt;/P&gt;

&lt;P&gt;BTW -- there is no "deviceready" in a web app, only in a Cordova app. Also, your app is not "compiled" it is "packaged" inside a webview. Unzip the APK file and you'll see. The XDK builds a standard Cordova app, so searching the web for problems associated with Cordova apps may also help. I recommend that you do not use Cordova as a way to prototype hosted web apps, they are quite different environments.&lt;/P&gt;

&lt;P&gt;p.s. There is no such thing as "navigator.camera.getPicture()" in a web app. You are relying on a Cordova plugin, which can only exist and be used in a Cordova webview. This is a fundamental difference between the Cordova webview environment and a hosted web app environment.&lt;/P&gt;</description>
      <pubDate>Sun, 16 Oct 2016 23:46:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Accessing-camera-from-web/m-p/1116236#M74205</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2016-10-16T23:46:00Z</dc:date>
    </item>
  </channel>
</rss>

