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 8560799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:21:34+00:00 2026-06-11T16:21:34+00:00

[EDIT] I actually solved this adding the following line to my activity manifest: android:configChanges=orientation|keyboardHidden

  • 0

[EDIT]

I actually solved this adding the following line to my activity manifest:

android:configChanges="orientation|keyboardHidden"

I’m trying to save an image captured with my android phone using phonegap, however 80% of the time I press the save button, after taking the picture, my app just dies…

I’ve seen that this is a common problem with phonegap + android. I’ve already tried lowering the quality of the image, cleaning phone memory, erasing the cache directory of the app… Nothing so far, I still get this random behavior.

I’ve tried using imageData and imageURI, but still get the error.

Something to note is that everytime I rotate the phone, my app dies. Some times when I save an image, the screen automatically rotates, and that also kill the app.

Here is the code I have so far…

            // Called when a photo is successfully retrieved
            //
            function onPhotoURISuccess(imageURI) {
                // Uncomment to view the image file URI
                // console.log(imageURI);

                $('#my_div') // this div belongs to my html markup (see bellow)
                    .empty()
                    .append(
                        $('<image>')
                            .attr('src', imageURI)
                            .attr('width', '100')
                            .attr('height', '100')
                            .css({
                                'background-color' : 'red',
                                 '-webkit-border-radius': '15px',
                                 '-moz-border-radius': '15px',
                                 'border-radius': '15px'
                            })
                );
            }

            // A button will call this function
            //
            function getPhoto(source) {
                // Retrieve image file location from specified source
                navigator.camera.getPicture(
                    function (imageUri) {
                        onPhotoURISuccess(imageUri, photo_div_id);   
                    }, 
                    onFail, {
                        quality: 30,
                        destinationType: Camera.DestinationType.FILE_URI,
                        sourceType: source
                    }
                );
            }

<div   id="my_div" class= "iconP">
   <input type="button"  name="photo_1" id="photo_1" onclick ="getPhoto()" value="photo 1"/>
</div>
  • 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-11T16:21:36+00:00Added an answer on June 11, 2026 at 4:21 pm

    You need to add more to your mainfest than that, otherwise you’ll run into this problem again. Add the following: android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"

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

Sidebar

Related Questions

edit* I'm dumb... Thanks for helping me this question is solved. * In my
Edit 2: Actually SomeEventHandler is more concise than OnSomeEventHandler : If I let Visual
Normally, you don't actually edit a file in vim. If you run vim foo
EDIT 07/14 As Bill Burgess mentionned in a comment of his answer, this question
EDIT : It turned out that this can only be done through an external
I have been trying to get up to speed on Named Pipes this week.
EDIT I solved the issue by forking the process instead of using threads. From
EDIT: The code marked as not working was actually working. It was because of
PROBLEM SOLVED: I was overlooking a very simple issue, and that is that this
last.fm has this nifty feature when you're adding an event. you have the Artists

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.