Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6679657
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:23:04+00:00 2026-05-26T04:23:04+00:00

I can’t figure out why this isn’t working.. can’t check this on the nokia

  • 0

I can’t figure out why this isn’t working..
can’t check this on the nokia simulator because it doesn’t simulate a camera..
and the phone app either crashes or just don’t bring any picture
I tried both Base64 method and imageURI method (with different buttons on the html page)

this is the javascript (the reason for the duplicate js for the camera is trying the different methods):

function camera (){

    $('#showpic').css('display','block').html("getting an image");
    navigator.camera.getPicture(camerasuccess,camerafail,null);
};        
function camerasuccess(imageBASE) {

    $('#showpic').css('display','block').html("we have an image");
    var imgsrc = "data:image/jpeg;base64,"+imageBASE[0];
    $('#imageplace').html('<img src ="'+imgsrc+'"/>');
    //var useimg = document.getElementById('useimage');
    //
    //useimg.style.display = 'block';
    //useimg.src = "data:image/jpeg;base64,"+imageBASE;

}

function camerafail(error) {
    $('#showpic').css('display','block').html("some error:"+error);
};

function camera2(){
    $('#showpic').css('display','block').html("getting an image");
    navigator.camera.getPicture(camera2success,camerafail,null);

};

function camera2success (imageURI){
    $('#showpic').css('display','block').html("we have an image");
    $('#debug').html(imageURI[0]);
    if (!imageURI[0]) {
        $('#debug').html("no imageURI here");
    }
    $('#imageplace').html('<img src ="'+imageURI[0]+'"/>');

and this is the markup (here also the remains of the different approaches I took):

   <div id = "camera">
        <input type = "button" id = "camera" value = "base">
        <input type = "button" id = "camera2" value = "imageURi"></br>
        <span id = "showpic" style = "display:none;">showpic</span><br/>
        <span id = "debug"></span></br>
        <div id = "imageplace"></div></br>
        <img id = "useimage" style = "display:none; width:60px; height:60px " src = ''/> 
    </div>

another notice: if it has any meaning then you should know I don’t use make to close the wgz file, just zip the www folder and change the ending to wgz, most js functions (including geolocation) work fine.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:23:04+00:00Added an answer on May 26, 2026 at 4:23 am

    I’ve got a similar problem. I am using a Nokia N8. It fires the getPicture method, and I can take a photo. However the only way to exit from the ‘taking a photo’ app is to click Back. This fires the success function, but no image data is returned.

    Looking at the API docs for Phonegap, it says that these are the supported platforms for the Camera API:

    • Android
    • Blackberry WebWorks (OS 5.0 and higher)
    • iPhone
    • Windows Phone 7 ( Mango )

    After much trial and error, this apparently only works if you expect the Camera API to return images as URIs (not the actual image data), and also set editable to true. Try something like this:

    navigator.camera.getPicture(camerasuccess, onFail, { quality: 20, allowEdit: true }); 
    
    $('#imageplace').html('<img src ="'+imageBASE+'"/>');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Can't figure out how to do this in a pretty way : I have
Can anyone help me trying to find out why this doesn't work. The brushes
Can someone please explain why this doesn't work? MyClass myClass1 = new MyClass(); object
Can't seem to figure out what's wrong with the simple getJSON call below. It's
Can anyone tell me why this doesn't work? <?php $lang = $_get[lang]; if (($lang
Can any one help me in sorting this out in sed/awk/perl Input file Start
Can anyone explain to me why this program: for(float i = -1; i <
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
Can I run this in a Windows command prompt like I can run it
Can anybody help me? What should be the datatype for this type -07:00:00 of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.