How to gain Android camera permission?

  1. 7 months ago

    1) I would like to include a function that the reader can upload a photo/take a picture and show it on the storybook.

    2) I created a smart object with the following code:

    <p><input type="file" accept="image/*" name="image" id="file" onchange="loadFile(event)" style="display: none;"></input></p>
    <p><label for="file" style="cursor: pointer;">Upload Image</label></p>
    <p><img id="output" width="400"></img></p>

    var loadFile = function(event) {
    var image = document.getElementById('output');
    image.src = URL.createObjectURL([0]);

    3) It works well in xpub reader but disappears during Android testing as it requires user permission. (I haven't tried iOS yet....)

    4) I checked some articles and it seems I have to add the permission in the manifest.xml file. How can we access it? Does this line work?

    <uses-permission android:name="android.permission.CAMERA" />

  2. Deleted 7 months ago by Terry C
  3. 6 months ago

    Angelo S

    30 Jun 2020 Administrator

    Hello Terry, please write to so we can get deeper into this and evaluate the development of a feature.


or Sign Up to reply!