Skip to content Skip to sidebar Skip to footer

Android App Reverts Back To Index Page After Taking A Picture

So i have this app i'm building and i'm a newbie to android apps. I am using phonegap to assist in making things easier. i used their example they have posted and when take the pic

Solution 1:

Its not your code.

The error is caused by poorly written Camera application.

Try installing a different Camera App - I use Go Camera 360

Solution 2:

I haven't used this, but I suspect that what you're seeing is a result of this line:

<a href="#" onclick="capturePhoto();"data-role="button">

(this has nothing to do with Android, obviously, since they're doing this via the web browser's connection to the underlying Android system).

href="#" will always go to the same page it's currently in. Presumably it has taken you through some steps (that looks like "pages" but in fact are just divs being hidden and displayed in some sequence) and it reloads the page, giving you the impression that you're "going" to the index page (when in fact you never left).

Try putting the location of your destination page in that href to see what happens.

And welcome to Stack. Don't forget to mark answers as correct, and upvote the ones that are the most useful.

-Cheers.

Solution 3:

Please make sure you have the following attribute in your main activity tag in your AndroidManifest.xml

android:configChanges="orientation|keyboardHidden"

without it the orientation change will force the WebView to reload.

Post a Comment for "Android App Reverts Back To Index Page After Taking A Picture"