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

  • Home
  • SEARCH
  • 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 9174939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T16:50:05+00:00 2026-06-17T16:50:05+00:00

I have a blackberry APP using the camera feature. The code base comes from

  • 0

I have a blackberry APP using the camera feature.

The code base comes from the “sample app” provided within PhoneGap 2.3.0

The index HTML has the line added

  <input type="button" value="Take Picture" onclick="app.takePhoto();" />

The index.js has the functions added:

takePhoto: function(){
    navigator.camera.getPicture(this.cameraSuccess, 
                                this.cameraError, 
                                {   quality: 50, 
                                    destinationType: Camera.DestinationType.DATA_URL
                                } );
},
cameraSuccess: function(imageData){
    console.log(imageData);
    var image = document.getElementById('myImage');
    image.src = "data:image/jpeg;base64," + imageData;
},
cameraError: function(){
    alert("error!");
}

If I run the Ripple Simulator, the error console in chrome reads:

Received Event: deviceready cordova-2.3.0.js:8165
Received Event: deviceready ripple.js:39
blob:http%3A//localhost/1b218c8e-6902-4780-a652-8f7f4d52fe28 cordova-2.3.0.js:8165
blob:http%3A//localhost/1b218c8e-6902-4780-a652-8f7f4d52fe28 ripple.js:39
GET data:image/jpeg;base64,blob:http%3A//localhost/1b218c8e-6902-4780-a652-8f7f4d52fe28  

If I run the simulator, after adding an image as a camera data I get an Error pop up the error log reads:

1:01:16.054: cordovaExample [2013-01-14 18:55:03.858]: Error in error callback: Camera1387674010 = ReferenceError: Can't find variable: imageData

When I run on a device, I don’t actually know how to read the error output.

Based on what I’ve shown, why might it be the case that my Phone Gap application isn’t taking a photo on the blackberry device?

  • 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-06-17T16:50:05+00:00Added an answer on June 17, 2026 at 4:50 pm

    Phonegap DestinationType.DATA_URL option don’t work well on some BB devices, mostly newer ones. Because modern phones (like BB 9800) have a better camera they also produce a larger pictures, thus converting them to BASE64 string can cause memory problems and empty imageData variable.

    You can test this by lowering targetWidth and targetHeight. If it works on lower resolutions then this is your problem.

    It can be solved by using FILE_URI instead of DATA_URL. But you should try it either way.

    In case FILE_URI is not working then problem is in BB camera.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: Using simpler code. I have a blackberry app that until recently (I upgraded
I have written a BlackBerry app that RSA encrypts a message using PKCS1FormatterEngine. This
I have developed a blackberry app, in which I am using Persistent Storage to
I have just started the Hello World App using Blackberry Eclipse Plugin. I have
I have a mobile app using JQuery Mobile. Because of issues with blackberry I
I am using the Blackberry jre 6 to create an app. I have a
My Problem... I have accessed the Camera App from my third party app ,
I have a mobile app that I developed using PhoneGap (and html/css/javascript) and there
i have an app in Blackberry, I was Build in using Jquery Mobile, but
I am using phonegap and sqlite to develop cross-platform mobile app for android,ios,blackberry.For reference

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.