Return from camera not reliable on Android

4,090 views
Skip to first unread message

tvo

unread,
Dec 3, 2010, 3:10:24 PM12/3/10
to phonegap
Has anyone ever had any problems with the phonegap camera code on
Android? I find that the code doesn't always return from the camera
screen properly.

When my app is first started everything works fine but after a while
when returning from the camera screen none of the callbacks I set in
navigator.camera.getPicture() are called.

I then have to force quit the application and start it again for it to
work again. This issue occurs no matter if I user DATA_URL or FILE_URI
as destination. I am using Phonegap 0.9.2.

The issue doesn't seem to occur on the Android emulator but I've been
to reproduce it on all real phones that I have access to (HTC desire
w/ 2.2 and Samsung Galaxy Tab w/ 2.2).

I've seen many reports of this problem but I haven't seen any solution
or explanation of what is going on.

Can someone confirm that they are experiencing the same issue?

Thanks.

Bryce Curtis

unread,
Dec 3, 2010, 4:49:16 PM12/3/10
to phonegap
Try turning off multitasking to see if it helps. In your java app,
add:

super.setProperty("keepRunning", false);

I saw the same problem when I tested after about 15 image retrievals
from the photo album. When I changed this, it ran 32 times and never
failed.

Let me know if this solves your problem and I will change the camera
code to pause execution when camera is displayed (without having to
turn multitasking off).

Regards,
Bryce

tvo

unread,
Dec 3, 2010, 7:12:29 PM12/3/10
to phonegap
Hi Bryce, thanks for your help, where should I add the setProperty()
line? When I put it in the onCreate() function in app.java, the
compiler complains that setProperty() is undefined for the type
DroidGap.

Let me know. Thanks!

Bryce Curtis

unread,
Dec 4, 2010, 1:44:32 AM12/4/10
to phonegap
Sorry, you should use super.setBooleanProperty("keepRunning", false).

tvo

unread,
Dec 4, 2010, 3:59:12 PM12/4/10
to phonegap
setBooleanProperty() is also not defined for Droidgap. Am I inserting
this code at the right place?

Bryce Curtis

unread,
Dec 4, 2010, 4:34:59 PM12/4/10
to phonegap
Properties were added after 0.9.2, so you will either need to grab
latest code from github or wait a week for 0.9.3 to be released.

tvo

unread,
Dec 6, 2010, 4:17:21 PM12/6/10
to phonegap
I downloaded the latest code from github and disabled multitasking. It
seems to work, I haven't been able to get it to fail like before.

james

unread,
Dec 7, 2010, 2:58:32 PM12/7/10
to phonegap
Hi tvo,

I am having a problem with Android camera, but am not sure how you
have disabled multitasking, can you please elaborate? I have
downloaded the latest github, and everything in the phonegap example
works except taking photos. Where abouts in the DroidGap.java file do
I put the following line of code please (if that is what you did)?


super.setBooleanProperty("keepRunning", false)


Thanks for your help,

James

tvo

unread,
Dec 7, 2010, 10:05:05 PM12/7/10
to phonegap
Hi James,

I put that line in the onCreate function right above the line:

super.onCreate(savedInstanceState);

I hope this helps. Let me know if that fixed it for you too. I'm still
hearing reports from users (of my app) that the camera is not working
well. I don't have enough handsets to test with to be sure sure if
those problems are related.

Bryce Curtis

unread,
Dec 7, 2010, 10:49:13 PM12/7/10
to phonegap
Here is how to disable multitasking:

public class Demo extends DroidGap {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

super.setIntegerProperty("splashscreen", R.drawable.sandy);
super.setBooleanProperty("keepRunning", false);
super.loadUrl("file:///android_asset/www/index.html", 2000);
}
}

BTW, you won't need to do this once 0.9.3 is available. Multitasking
will be temporarily disabled when the camera is displayed. It will be
restored to original setting when camera is closed.

Bryce
Message has been deleted

Bruno43

unread,
Dec 7, 2010, 4:06:13 PM12/7/10
to phonegap
I have downloaded the lastest builds from:

https://github.com/phonegap/phonegap/tree/master/Android

To upgrade do I just replace the original files (.js and .jar) and
rebuild the .jar path?

If so then I am still get the error that it is not defined for
droidgap.

Any help would be much appreciated.

Thank you.

Simon MacDonald

unread,
Dec 8, 2010, 2:55:36 PM12/8/10
to phonegap
That's not the most up to date JAR and JS file.  You are better off getting the source from:


and building the JAR/JS yourself.  As you can see from that page, Bryce just checked in the fix yesterday.

Simon Mac Donald
http://hi.im/simonmacdonald


On Mon, Dec 6, 2010 at 3:53 PM, Bruno43 <archa...@gmail.com> wrote:
I am also having this problem.

I grabbed the latest 0.9.3. code from github and I am still getting
the error:
The method setBooleanProperty(String, boolean) is undefined for the
type DroidGap   App.java        /CordApp/src/com/phonegap/cordapp       line 13
--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com

Bruno43

unread,
Dec 9, 2010, 1:52:43 PM12/9/10
to phonegap
Although my return to camera is more reliable than it was it is still
not 100% reliable.

I got the source code from here:
https://github.com/phonegap/phonegap-android

And bult the jar/js using this tutorial:
http://wiki.phonegap.com/w/page/16494774/Getting-started-with-Android-PhoneGap-in-Eclipse

There doesn't seem to be a 100% way to replicate the issue but it will
still, occasionally, restart the app or it might crash with an
'unexpected' error.

I was still not able to use the booleanproperty with this version, is
this correct?

Thank you.

tvo

unread,
Dec 9, 2010, 2:45:12 PM12/9/10
to phonegap
After a lot more testing this is consistent with what I see on my
side. The return from camera is better but not 100%.

On Dec 9, 10:52 am, Bruno43 <archange...@gmail.com> wrote:
> Although my return to camera is more reliable than it was it is still
> not 100% reliable.
>
> I got the source code from here:https://github.com/phonegap/phonegap-android
>
> And bult the jar/js using this tutorial:http://wiki.phonegap.com/w/page/16494774/Getting-started-with-Android...

tvo

unread,
Dec 10, 2010, 4:06:07 AM12/10/10
to phonegap
Hi Bryce,

Can you explain what you think is going on? Why do you think disabling
multi-tasking will make things better? Is there any chance of getting
the camera working 100%? This is the only thing holding back my app
from release.

Thanks.

Bruno43

unread,
Dec 16, 2010, 10:57:53 AM12/16/10
to phonegap
I saw that the github was updated once again on the 9th.

It looks like it fixed the crashing but still randomly would restart
the app.

Thanks.

Simon MacDonald

unread,
Dec 16, 2010, 2:34:16 PM12/16/10
to phonegap
Hi all,

Bryce is off on a well deserved vacation so I'm looking into the camera issues a bit.  So far I haven't been able to make the app crash or restart.  I'm using a PhoneGap built directly from GitHub and my Android 2.1 device.

Does anyone have a reproduction scenario that I could look into?

Bruno43

unread,
Dec 16, 2010, 3:48:04 PM12/16/10
to phonegap
I am running on Android 2.2

It seems like the most assured way to get it to restart the app is to
goto take the picture and wait more than 30 seconds to take the photo.
When it goes to return to display the picture it restarts the app.

On Dec 16, 2:34 pm, Simon MacDonald <simon.macdon...@gmail.com> wrote:
> Hi all,
>
> Bryce is off on a well deserved vacation so I'm looking into the camera
> issues a bit.  So far I haven't been able to make the app crash or restart.
>  I'm using a PhoneGap built directly from GitHub and my Android 2.1 device.
>
> Does anyone have a reproduction scenario that I could look into?
>
> Simon Mac Donaldhttp://hi.im/simonmacdonald
> > phonegap+u...@googlegroups.com<phonegap%2Bunsubscribe@googlegroups.c om>

tvo

unread,
Dec 16, 2010, 6:14:56 PM12/16/10
to phonegap
I haven't tested with the latest code (from december 9th) but in the
past, changing orientation of the phone in the camera screen always
caused my app to restart upon returning from the camera.
> > > phonegap+u...@googlegroups.com<phonegap%2Bunsubscr...@googlegroups.c om>

ericburnley

unread,
Dec 17, 2010, 11:35:32 AM12/17/10
to phonegap
I've experienced the same thing on Android 2.2, Droid Incredible. I
had a Phonegap app with camera working 100% on Android 2.1, and once
my phone was updated to 2.2 I started seeing similar behavior to what
these guys mention. Sometimes the app opens the camera, grabs a pic,
returns the data to the app, and completes successfully. Sometimes it
crashes/force closes - when it does, it always crashes on returning
from the camera to the app.

Looking forward to 0.9.3! Work will be quiet next week, so I'm hoping
to hack some. Good luck w/ the final testing.

On Dec 16, 1:34 pm, Simon MacDonald <simon.macdon...@gmail.com> wrote:
> Hi all,
>
> Bryce is off on a well deserved vacation so I'm looking into the camera
> issues a bit.  So far I haven't been able to make the app crash or restart.
>  I'm using a PhoneGap built directly from GitHub and my Android 2.1 device.
>
> Does anyone have a reproduction scenario that I could look into?
>
> Simon Mac Donaldhttp://hi.im/simonmacdonald
> > phonegap+u...@googlegroups.com<phonegap%2Bunsu...@googlegroups.com>

Alex

unread,
Dec 22, 2010, 1:29:30 AM12/22/10
to phonegap
Hello
i just checked out 0.9.3 and the camera is still very flaky. I tried
both
android 2.1 and 2.2 I have turned off multi tasking.
I am running on T-mobile G1 with cyanogen.
any other suggestions ?
thanks




On Dec 3, 4:49 pm, Bryce Curtis <curtis.br...@gmail.com> wrote:
> Try turning off multitasking to see if it helps.  In your java app,
> add:
>
> super.setProperty("keepRunning", false);
>
> I saw the same problem when I tested after about 15 image retrievals
> from the photo album.  When I changed this, it ran 32 times and never
> failed.
>
> Let me know if this solves your problem and I will change thecamera
> code to pause execution whencamerais displayed (without having to
> turn multitasking off).
>
> Regards,
> Bryce
>
> On Dec 3, 2:10 pm, tvo <trun...@gmail.com> wrote:
>
> > Has anyone ever had any problems with the phonegapcameracode on
> > Android? I find that the code doesn't always return from thecamera
> > screen properly.
>
> > When my app is first started everything works fine but after a while
> > when returning from thecamerascreen none of the callbacks I set in

Simon MacDonald

unread,
Dec 30, 2010, 10:42:51 AM12/30/10
to phonegap
Hi all,

I'm having a real hard time reproducing the issue on my Android 2.1
device. I haven't upgraded to 2.2 as another member of the group has
already upgraded and we want to cover as many different Android OS
versions as possible.

However, I've followed up a lead that Bryce was looking at before he
headed off for vacation. I've got a new phonegap.jar file that frees
up memory after each picture is taken. If anyone would like to
volunteer to try it out it would be greatly appreciated.

Thanks...

> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com

Jori

unread,
Dec 23, 2010, 11:14:15 AM12/23/10
to phonegap
I started testing PhoneGap today as I need an image upload app for iOS
and Android.

I tried the Sample app and with my HTC Legend /w 2.2 (CyanogenMod6
based) it fails to retrieve image every time using Android's own
camera app (I have turned MT off). When tested with Desire /w 2.2 and
HTC's camera app it worked. So I'm also up for testing changes if
needed :)

-Jori

Ps. this was with latest phonegap from github

Jeff Thorn

unread,
Apr 28, 2011, 4:30:14 PM4/28/11
to phon...@googlegroups.com
Hi Everyone,
I was just curious if there was any news on this issue. I am still experiencing it on my Motorola Droid (original) running Android 2.2.2 and PhoneGap 0.9.4. 

Perhaps it has something to do with the way Android manages tasks and processes. The OS can kill a process that is not active any time it needs to reclaim resources. When the camera launches, I think my main phonegap Activity is getting destroyed. When it is restored, Phonegap is not initialized properly and the html page that launched the camera no longer works. 

As everyone mentioned, this is hard to reproduce since you can't simulate when the OS will destroy activities. You also can't debug it because when the Activity starts back up, it has a different PID. 

Any thoughts?

Thanks,
Jeff

Adrian5555

unread,
May 22, 2011, 1:32:26 PM5/22/11
to phonegap
I am getting the same problems with Samsung Galaxy S 2.2

After accessing photo from camera, the Phonegap app will often
restart. If i just store the image and not make any attempt to display
then crash is less likely. If i try to show a preview then crash is
very likely

Adrian5555

unread,
May 22, 2011, 1:48:02 PM5/22/11
to phonegap
Just tried the very basic example from the Phonegap Docs page and the
app will restart when taking a picture with the Galaxy S camera and
clicking Save

Taking a picture from the library works fine

Will have to only allow picture from Library in Android

Dre

unread,
Dec 15, 2011, 1:26:26 PM12/15/11
to phon...@googlegroups.com
Dear Simon McDonald,

I recreated the issue using a simple native Android app, without PhoneGap
 and confirmed that the problem is because that onActivityResult fires prematurely, 
when it has nothing to return yet. There was no such issue with Samsung, LG and 
HTC models I also tested on, but I discovered an issue with Motorola. 

I posted the fix on my blog post which includes the post I wrote to the Motorola 
developers: http://andrea.levinge.me/?p=132 which also references the PhoneGap googlegroups. 

Dear Greg Wilson,

I am also experiencing the same issue. I am attaching a very simple example (CameraTest) that causes my entire app to restart. The culprit is the simple line "
startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);"

It doesn't pass the result back to the app. When it takes a photo, it is supposed to save a simple thumbnail to an imageview. Instead, it forces the app to restart completely.

Works on Samsung Galaxy S2 and LG Optimus, and every other phone we've tried but not on a Motorola Droid 3 on Android 2.3.4.

There is an entire thread here that describes people having the exact same issue, mostly with Motorola phones and some LG phones.

According to this thread http://comments.gmane.org/gmane.comp.handhelds.phonegap/16506 replied to by one of the PhoneGap developers, this issue is caused by the vendor. Simon replies - "It sounds like you are suffering from the issue that the default intent for taking picture/video does not call onActivityResult properly...This is a vendor bloatware issue and I'm not sure what I can do to fix it."

Kind regards,

Andrea

Attachment CameraTest.zip 53 KB 

Basically the fix is to set flags on the Intent:

cameraIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

and it will work.

I would like to suggest the contribution of this fix to PhoneGap because many 
Motorola devices are affected, and judging by the length of this thread many
developers are unable to use their  camera/video/audio recording through 
PhoneGap because of it, me included. I wonder if you would be the 
person to talk to about it? 

Thanks,

Andrea

Simon MacDonald

unread,
Dec 16, 2011, 10:19:10 AM12/16/11
to phon...@googlegroups.com
Hey Andrea,

That is awesome that you've found a fix for this issue. I've been able to try it out on my Samsung Galaxy phone and tablet and it doesn't cause any ill effects on those phones. I'm going to submit a pull request on PhoneGap and get some folks with other devices to test it out before it becomes part of an upcoming PhoneGap release.

If you want to add it in yourself you just need to grab the source code from:


Then edit the file framework/src/com/phonegap/CameraLauncher.java and add:

        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

after:

        Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");

which should be line 162. Then if you recompile the jar you should be all set to go.

--

Chip

unread,
Dec 16, 2011, 2:35:50 PM12/16/11
to phonegap
Hi,

Any chance you can post the jar file somewhere so those of us who are
not Java programmers can rebuild our phonegap app to make our Motorola
users happy?

--chip

On Dec 16, 10:19 am, Simon MacDonald <simon.macdon...@gmail.com>
wrote:


> Hey Andrea,
>
> That is awesome that you've found a fix for this issue. I've been able to
> try it out on my Samsung Galaxy phone and tablet and it doesn't cause any
> ill effects on those phones. I'm going to submit a pull request on PhoneGap
> and get some folks with other devices to test it out before it becomes part
> of an upcoming PhoneGap release.
>
> If you want to add it in yourself you just need to grab the source code
> from:
>
> https://github.com/callback/callback-android
>
> Then edit the file framework/src/com/phonegap/CameraLauncher.java and add:
>

>         intent.setFlags(Intent.*FLAG_ACTIVITY_CLEAR_TOP*);
>
> after:
>
>         Intent intent = *new* Intent("android.media.action.IMAGE_CAPTURE");


>  which should be line 162. Then if you recompile the jar you should be all
> set to go.
>

> Simon Mac Donaldhttp://hi.im/simonmacdonald


>
>
>
>
>
>
>
> On Thu, Dec 15, 2011 at 1:26 PM, Dre <mslevi...@gmail.com> wrote:
> > Dear Simon McDonald,
>
> > I recreated the issue using a simple native Android app, without PhoneGap
> >  and confirmed that the problem is because that onActivityResult fires
> > prematurely,
> > when it has nothing to return yet. There was no such issue with Samsung,
> > LG and
> > HTC models I also tested on, but I discovered an issue with Motorola.
>
> > I posted the fix on my blog post which includes the post I wrote to the
> > Motorola

> > developers:http://andrea.levinge.me/?p=132which also references the


> > PhoneGap googlegroups.
>
> > Dear Greg Wilson,
>
> > I am also experiencing the same issue. I am attaching a very simple
> > example (CameraTest) that causes my entire app to restart. The culprit is
> > the simple line "
> > startActivityForResult(cameraIntent, CAMERA_PIC_REQUEST);"
>
> > It doesn't pass the result back to the app. When it takes a photo, it is
> > supposed to save a simple thumbnail to an imageview. Instead, it forces the
> > app to restart completely.
>
> > Works on Samsung Galaxy S2 and LG Optimus, and every other phone we've
> > tried but not on a Motorola Droid 3 on Android 2.3.4.
>
> > There is an entire thread here that describes people having the exact same
> > issue, mostly with Motorola phones and some LG phones.
>
> > According to this thread

> >http://comments.gmane.org/gmane.comp.handhelds.pho**negap/16506<http://comments.gmane.org/gmane.comp.handhelds.phonegap/16506> replied


> > to by one of the PhoneGap developers, this issue is caused by the vendor.
> > Simon replies - "It sounds like you are suffering from the issue that the
> > default intent for taking picture/video does not call onActivityResult
> > properly...This is a vendor bloatware issue and I'm not sure what I can do
> > to fix it."
>
> > Kind regards,
>
> > Andrea
> > Attachments:
>

> >> [image: Attachment] CameraTest.zip 53 KB<http://community.developer.motorola.com/mtrl/attachments/mtrl/Android...>

Simon MacDonald

unread,
Dec 19, 2011, 11:26:09 AM12/19/11
to phon...@googlegroups.com
Here are PhoneGap 1.3 jar/js built with the fix Andrea suggested. I've not made any testing of this combo so try it at your own risk.

Chip

unread,
Dec 20, 2011, 2:48:43 PM12/20/11
to phonegap
Thanks Simon!

Unfortunately, I just tried it on a Motorola Droid X, and it still
restarts the app when clicking "Done" after taking a photo.

--chip

On Dec 19, 11:26 am, Simon MacDonald <simon.macdon...@gmail.com>
wrote:


> Here are PhoneGap 1.3 jar/js built with the fix Andrea suggested. I've not
> made any testing of this combo so try it at your own risk.
>
> http://dl.dropbox.com/u/887989/top/phonegap-1.3.0.jarhttp://dl.dropbox.com/u/887989/top/phonegap-1.3.0.js
>

> > > > developers:http://andrea.levinge.me/?p=132whichalso references the

Andrea Levinge

unread,
Dec 21, 2011, 8:39:35 AM12/21/11
to phon...@googlegroups.com
Hi Chip, 

You said

"Unfortunately, I just tried it on a Motorola Droid X, and it still
restarts the app when clicking "Done" after taking a photo."

Can you try the sample Camera code here:

then tell me if that crashes? The above code *should* crash without the fix, if we have the same bug.

Otherwise we probably have unrelated issues.

Kind regards,

Andrea

Chip

unread,
Dec 21, 2011, 11:30:51 AM12/21/11
to phonegap
Hi Andrea,

Just tried it on a Droid X running 2.3.

Most of the time, when you click done after taking a photo, it returns
to the camera (which I assume is an app crash/restart).

Some of the time, it shows the photo with the Hello World message
(which I assume means it didn't restart). Also, when it is showing
that message, if you change the orientation, it does a full crash
(with a pop-up crash notification).

--chip

On Dec 21, 8:39 am, Andrea Levinge <and...@levinge.me> wrote:
> Hi Chip,
>
> You said
> "Unfortunately, I just tried it on a Motorola Droid X, and it still
> restarts the app when clicking "Done" after taking a photo."
>
> Can you try the sample Camera code here:http://community.developer.motorola.com/mtrl/attachments/mtrl/Android...

Chip

unread,
Dec 23, 2011, 9:54:05 AM12/23/11
to phonegap
Has anyone else tried this fix in their app? Did it fix the Motorola
problem?

--chip

On Dec 19, 11:26 am, Simon MacDonald <simon.macdon...@gmail.com>
wrote:
> Here are PhoneGap 1.3 jar/js built with the fix Andrea suggested. I've not
> made any testing of this combo so try it at your own risk.
>
> http://dl.dropbox.com/u/887989/top/phonegap-1.3.0.jarhttp://dl.dropbox.com/u/887989/top/phonegap-1.3.0.js
>
> > > > developers:http://andrea.levinge.me/?p=132whichalso references the

mikej

unread,
Jan 20, 2012, 1:17:06 PM1/20/12
to phonegap
I've been dealing with this problem on android 2.2.x and 2.3.x, and I
haven't been able to find a fix for it yet.
I tried the previously mentioned fix, though no luck.

It works fine in android 2.1.x

On Dec 23 2011, 8:54 am, Chip <c...@quickcatchlabs.com> wrote:
> Has anyone else tried this fix in their app?  Did it fix the Motorola
> problem?
>
> --chip
>
> On Dec 19, 11:26 am, Simon MacDonald <simon.macdon...@gmail.com>
> wrote:
>
>
>
>
>
>
>
> > Here are PhoneGap 1.3 jar/js built with the fix Andrea suggested. I've not
> > made any testing of this combo so try it at your own risk.
>
> >http://dl.dropbox.com/u/887989/top/phonegap-1.3.0.jarhttp://dl.dropbo...
> > > > > I recreated the issue using a simple nativeAndroidapp, without
> > > PhoneGap
> > > > >  and confirmed that the problem is because that onActivityResult fires
> > > > > prematurely,
> > > > > when it has nothing to return yet. There was no such issue with
> > > Samsung,
> > > > > LG and
> > > > > HTC models I also tested on, but I discovered an issue with Motorola.
>
> > > > > I posted the fix on my blog post which includes the post I wrote to the
> > > > > Motorola
> > > > > developers:http://andrea.levinge.me/?p=132whichalsoreferences the

jski...@sgstech.com

unread,
Apr 3, 2012, 11:00:55 AM4/3/12
to phon...@googlegroups.com
Is there any new news on this?  Are we out of luck if our customers have the Droid?
> > > > > phonegap+unsubscribe@googlegroups.com
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > > > > For more info on PhoneGap or to download the code go
> > > towww.phonegap.com
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "phonegap" group.
> > > To post to this group, send email to phon...@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > phonegap+unsubscribe@googlegroups.com

Chip

unread,
May 31, 2012, 9:56:50 PM5/31/12
to phonegap
I'm wondering the same thing. We're up to PhoneGap 1.7 now and the
problem has not been fixed.

Note that other apps seem to have no problem using the camera on the
Droid, so there is something different about how PhoneGap accesses the
camera or stores the photo (I'm also using FILE_URI, which is supposed
to be safer than DATA_URL).

On Apr 3, 11:00 am, "jskin...@sgstech.com" <jskin...@sgstech.com>
wrote:
> > > > > > > phonegap+u...@googlegroups.com
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > > > > > > For more info on PhoneGap or to download the code go
> > > > > towww.phonegap.com
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "phonegap" group.
> > > > > To post to this group, send email to phon...@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > phonegap+u...@googlegroups.com

offshorewahoo

unread,
Jun 6, 2012, 2:45:16 PM6/6/12
to phon...@googlegroups.com
We are in the same boat, pretty much dead in the water with no paddle here. I see a lot of threads on this over the past 6 months and Simon has done a great job interacting with people who claim to have a fix for it.  A couple of those threads looked darn promising.  Simon, can you please chime in here and let us know the current status of this?  It would be great to know if there is a fix on the horizon even if it is not until PG 1.8 or 1.9.  Then we can all stop spending time investigating this and just wait for it to come through PhoneGap itself.  Thanks so much!
> > > > > > > phonegap+unsubscribe@googlegroups.com
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/phonegap?hl=en?hl=en
>
> > > > > > > For more info on PhoneGap or to download the code go
> > > > > towww.phonegap.com
>
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "phonegap" group.
> > > > > To post to this group, send email to phon...@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > phonegap+unsubscribe@googlegroups.com

offshorewahoo

unread,
Jun 7, 2012, 9:54:02 AM6/7/12
to phon...@googlegroups.com
Okay, this is very strange. I had just written some "duct tape" code that was intended to work around this issue by restoring my application state and launching getPicture using the Gallery.  I made a new build using PhoneGap Build on Cordova 1.7.0, and now... it.... um... works.  No, no, I mean it "just works".  I am not able to reproduce the problem and I am also not able to test my duct tape.  This is, of course, a great thing.  But now I want to know what changed?  Did someone patch PhoneGap Build 1.7.0?  I will ask that question on the PGB GetSatisfaction site.  But the rest of you might want to know about this, so here you go!

Simon MacDonald

unread,
Jun 11, 2012, 1:09:28 PM6/11/12
to phon...@googlegroups.com
All, I would love to have a fix for this problem. Sadly I need to get a reproduction scenario for this issue. I can't get the damn thing to fail on any of my devices. If anyone has a solid repo scenario I would love for you to share it with me.

Simon Mac Donald
http://hi.im/simonmacdonald


Diego Trigo

unread,
Jun 12, 2012, 8:14:49 AM6/12/12
to phon...@googlegroups.com
Here you go:
-OS: Android 4.01
-Hardware: Samsung Galaxy Nexus
-Code: The given camera capture example on the Phonegap page...

It has 3 behaviors:
-Crashes or;
-Restats or:
-Works... 

More often the first and second example...

Let me know if you need more info...

Diego

filmaj

unread,
Jun 12, 2012, 1:37:22 PM6/12/12
to phonegap
Diego, do you just keep taking a picture? What are the repro steps?
> >>>> > > > >http://dl.dropbox.com/u/**887989/top/phonegap-1.3.0.**
> >>>> jarhttp://dl.dropbo.<http://dl.dropbox.com/u/887989/top/phonegap-1.3.0.jarhttp://dl.dropbo.>..
>
> >>>> > > > > Simon Mac Donaldhttp://hi.im/**simonmacdonald<http://hi.im/simonmacdonald>
> >>>> > > > > > >https://github.com/callback/**callback-android<https://github.com/callback/callback-android>
>
> >>>> > > > > > > Then edit the file framework/src/com/phonegap/**CameraLauncher.java
>
> >>>> > > and
> >>>> > > > > > add:
>
> >>>> > > > > > >         intent.setFlags(Intent.*FLAG_**ACTIVITY_CLEAR_TOP*);
>
> >>>> > > > > > > after:
>
> >>>> > > > > > >         Intent intent = *new*
> >>>> > > > > > Intent("android.media.action.**IMAGE_CAPTURE");
> >>>> > > > > > >  which should be line 162. Then if you recompile the jar
> >>>> you
> >>>> > > should be
> >>>> > > > > > all
> >>>> > > > > > > set to go.
>
> >>>> > > > > > > Simon Mac Donaldhttp://hi.im/**simonmacdonald<http://hi.im/simonmacdonald>
>
> >>>> > > > > > > On Thu, Dec 15, 2011 at 1:26 PM, Dre <mslevi...@gmail.com>
> >>>> wrote:
> >>>> > > > > > > > Dear Simon McDonald,
>
> >>>> > > > > > > > I recreated the issue using a simple nativeAndroidapp,
> >>>> without
> >>>> > > > > > PhoneGap
> >>>> > > > > > > >  and confirmed that the problem is because that
> >>>> onActivityResult
> >>>> > > fires
> >>>> > > > > > > > prematurely,
> >>>> > > > > > > > when it has nothing to return yet. There was no such
> >>>> issue with
> >>>> > > > > > Samsung,
> >>>> > > > > > > > LG and
> >>>> > > > > > > > HTC models I also tested on, but I discovered an issue
> >>>> with
> >>>> > > Motorola.
>
> >>>> > > > > > > > I posted the fix on my blog post which includes the post
> >>>> I wrote
> >>>> > > to the
> >>>> > > > > > > > Motorola
> >>>> > > > > > > > developers:http://andrea.**levinge.me/?p=**
> >>>> 132whichalsoreferencesthe<http://andrea.levinge.me/?p=132whichalsoreferencesthe>
> >>>> > > > > > > > PhoneGap googlegroups.
>
> >>>> > > > > > > > Dear Greg Wilson,
>
> >>>> > > > > > > > I am also experiencing the same issue. I am attaching a
> >>>> very
> >>>> > > simple
> >>>> > > > > > > > example (CameraTest) that causes my entire app to
> >>>> restart. The
> >>>> > > culprit
> >>>> > > > > > is
> >>>> > > > > > > > the simple line "
> >>>> > > > > > > > startActivityForResult(**cameraIntent,
> >>>> CAMERA_PIC_REQUEST);"
>
> >>>> > > > > > > > It doesn't pass the result back to the app. When it takes
> >>>> a
> >>>> > > photo, it
> >>>> > > > > > is
> >>>> > > > > > > > supposed to save a simple thumbnail to an imageview.
> >>>> Instead, it
> >>>> > > > > > forces the
> >>>> > > > > > > > app to restart completely.
>
> >>>> > > > > > > > Works on Samsung Galaxy S2 and LG Optimus, and every
> >>>> other phone
> >>>> > > we've
> >>>> > > > > > > > tried but not on a Motorola Droid 3 onAndroid2.3.4.
>
> >>>> > > > > > > > There is an entire thread here that describes people
> >>>> having the
> >>>> > > exact
> >>>> > > > > > same
> >>>> > > > > > > > issue, mostly with Motorola phones and some LG phones.
>
> >>>> > > > > > > > According to this thread
> >>>> > > > > > > >http://comments.gmane.org/**gmane.comp.handhelds.pho****
> >>>> negap/16506<http://comments.gmane.org/gmane.comp.handhelds.pho**negap/16506><
>
> >>>> > > > > >http://comments.gmane.org/**gmane.comp.handhelds.phonegap/**
> >>>> 16506 <http://comments.gmane.org/gmane.comp.handhelds.phonegap/16506>>
> >>>> > > replied
> >>>> > > > > > > > to by one of the PhoneGap developers, this issue is
> >>>> caused by
> >>>> > > the
> >>>> > > > > > vendor.
> >>>> > > > > > > > Simon replies - "It sounds like you are suffering from
> >>>> the issue
> >>>> > > that
> >>>> > > > > > the
> >>>> > > > > > > > default intent for taking picture/video does not call
> >>>> > > onActivityResult
> >>>> > > > > > > > properly...This is a vendor bloatware issue and I'm not
> >>>> sure
> >>>> > > what I
> >>>> > > > > > can do
> >>>> > > > > > > > to fix it."
>
> >>>> > > > > > > > Kind regards,
>
> >>>> > > > > > > > Andrea
> >>>> > > > > > > > Attachments:
>
> >>>> > > > > > > >> [image: Attachment] CameraTest.zip 53 KB<
>
> >>>> > >http://community.developer.**motorola.com/mtrl/attachments/**
> >>>> mtrl/Android..<http://community.developer.motorola.com/mtrl/attachments/mtrl/Android..>.>
>
> >>>> > > > > > > > Basically the fix is to set flags on the Intent:
>
> >>>> > > > > > > > cameraIntent.setFlags(Intent.**FLAG_ACTIVITY_CLEAR_TOP);
>
> >>>> > > > > > > > and it will work.
>
> >>>> > > > > > > > I would like to suggest the contribution of this fix to
> >>>> PhoneGap
> >>>> > > > > > because
> >>>> > > > > > > > many
> >>>> > > > > > > > Motorola devices are affected, and judging by the length
> >>>> of this
> >>>> > > thread
> >>>> > > > > > > > many
> >>>> > > > > > > > developers are unable to use their  camera/video/audio
> >>>> recording
> >>>> > > > > > through
> >>>> > > > > > > > PhoneGap because of it, me included. I wonder if you
> >>>> would be
> >>>> > > the
> >>>> > > > > > > > person to talk to about it?
>
> >>>> > > > > > > > Thanks,
>
> ...
>
> read more »

Simon MacDonald

unread,
Jun 12, 2012, 1:57:04 PM6/12/12
to phon...@googlegroups.com
I am using this the Full Example code un-edited from: 

I have run the same test on the following devices:

Samsung Galaxy S - Android 2.3.5
Samsung Galaxy Note - Android 2.3.6
Samsung Tab 10.1 - Android 3.1

I'm running PhoneGap 1.8 and I ran my app using the code from the docs example. For each of the devices I took 10 pictures in a row using the "Capture Photo" button. I was not able to reproduce a crash or app restart. 

Please let me know if I'm running the test incorrectly.

Diego Trigo

unread,
Jun 13, 2012, 7:33:17 PM6/13/12
to phon...@googlegroups.com
I'm running PhoneGap 1.8 also...
Maybe the issue is with Android 4.x?

I tested it using Galaxy S2 yesterday (Android 4.03) and had the same problem.
Crashing / restarting after each picture...

Will test it with an old Android phone (2.xx) tonight and will post the result here...


UPDATE:
Just tested now, and it seems it's working. The same code that was not working yesterday...
The only difference is that I'm not running from Eclipse (pressing the PLAY button). 
Now I'm clicking on the app icon, not plugged to the computer...

Does it make any sense?

Thanks,
Diego

Simon MacDonald

unread,
Jun 14, 2012, 9:10:56 AM6/14/12
to phon...@googlegroups.com
No, that really doesn't make too much sense but nothing about this
problem has made sense.

Anyway, I'm looking hard at the camera code right now doing a bit of a
refactor on it.

Simon Mac Donald
http://hi.im/simonmacdonald


>>>>>>> > > > > > > > phonegap+u...@googlegroups.com
>>>>>>> > > > > > > > For more options, visit this group at
>>>>>>> > > > > > > >http://groups.google.com/group/phonegap?hl=en?hl=en
>>>>>>> >
>>>>>>> > > > > > > > For more info on PhoneGap or to download the code go
>>>>>>> > > > > > towww.phonegap.com
>>>>>>> >
>>>>>>> > > > > > --
>>>>>>> > > > > > You received this message because you are subscribed to the
>>>>>>> > > > > > Google
>>>>>>> > > > > > Groups "phonegap" group.
>>>>>>> > > > > > To post to this group, send email to
>>>>>>> > > > > > phon...@googlegroups.com
>>>>>>> > > > > > To unsubscribe from this group, send email to
>>>>>>> > > > > > phonegap+u...@googlegroups.com
>>>>>>> > > > > > For more options, visit this group at
>>>>>>> > > > > >http://groups.google.com/group/phonegap?hl=en?hl=en
>>>>>>> >
>>>>>>> > > > > > For more info on PhoneGap or to download the code go
>>>>>>> > > towww.phonegap.com
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "phonegap" group.
>>>>> To post to this group, send email to phon...@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> phonegap+u...@googlegroups.com
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/phonegap?hl=en?hl=en
>>>>>
>>>>> For more info on PhoneGap or to download the code go to
>>>>> www.phonegap.com
>>>>
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "phonegap" group.
>>> To post to this group, send email to phon...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> phonegap+u...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/phonegap?hl=en?hl=en
>>>
>>> For more info on PhoneGap or to download the code go to www.phonegap.com
>>
>>
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to
> phonegap+u...@googlegroups.com

Simon MacDonald

unread,
Jun 14, 2012, 2:56:06 PM6/14/12
to phon...@googlegroups.com

Russ,

Switch to a FILE_URI. Using a DATA_URL on phones with high mega pixel cameras will cause out of memory exceptions. There is nothing we can do if there is an OOM problem in the JVM.

Simon

On Jun 14, 2012 2:29 PM, "Russ Anderson" <russ.a...@gmail.com> wrote:

I'm having very similar problems - with a modern device I can't get the camera to work.  My camera-initialising code is a very standard http://pastebin.com/74wn5gZH

With Cordova 1.8 and 1.7 I'm getting a failure to return either a success or a fail from the camera (I check that by uncommenting the navigator.notification.alert() commands and getting neither of them) on a Galaxy Nexus on Android 4.04, but the same code runs successfully on a Nexus One running 2.3.6 just fine.  The code also works fine on an iPhone 4S.


Is there anything I could try or test that might help? 






On Thursday, 14 June 2012 14:10:56 UTC+1, Simon wrote:
No, that really doesn't make too much sense but nothing about this
problem has made sense.

Anyway, I'm looking hard at the camera code right now doing a bit of a
refactor on it.

Simon Mac Donald
http://hi.im/simonmacdonald


20sande...@gmail.com

unread,
Jun 14, 2012, 2:57:29 PM6/14/12
to phon...@googlegroups.com
Hi, I am also facing similar problem with camera API on Android phones. After selecting a photo from photo gallery it doesn't return with the photo url. It happens randomly.
Sent from my BlackBerry® on Reliance Mobile, India's No. 1 Network. Go for it!

From: Russ Anderson <russ.a...@gmail.com>
Date: Thu, 14 Jun 2012 07:51:36 -0700 (PDT)
Subject: Re: [PhoneGap] Re: Return from camera not reliable on Android


I'm having very similar problems - with a modern device I can't get the camera to work.  My camera-initialising code is a very standard http://pastebin.com/74wn5gZH

With Cordova 1.8 and 1.7 I'm getting a failure to return either a success or a fail from the camera (I check that by uncommenting the navigator.notification.alert() commands and getting neither of them) on a Galaxy Nexus on Android 4.04, but the same code runs successfully on a Nexus One running 2.3.6 just fine.  The code also works fine on an iPhone 4S.


Is there anything I could try or test that might help? 






On Thursday, 14 June 2012 14:10:56 UTC+1, Simon wrote:
No, that really doesn't make too much sense but nothing about this
problem has made sense.

Anyway, I'm looking hard at the camera code right now doing a bit of a
refactor on it.

Simon Mac Donald
http://hi.im/simonmacdonald


Will

unread,
Jun 14, 2012, 3:45:39 PM6/14/12
to phon...@googlegroups.com
P.S. Targeting SDK v7 and testing on Droid 2 global.

On Thursday, June 14, 2012 3:37:06 PM UTC-4, Will wrote:
Hi Simon, I've noticed that rotating the phone while in camera appears to be causing my app to restart.

JS is pretty much the standard camera example except I've combined all the functions (take pic, get from library, etc) into one call that takes a parameter passed from the html onclick event:

var pictureSource, destinationType;   // picture source




// Cordova is ready to be used!
function onDeviceReady() {
    pictureSource = navigator.camera.PictureSourceType;
    destinationType = navigator.camera.DestinationType;
    alert ("fresh start");
}

//After taking picture or getting it from the library
function onSuccess(imageURI) {
//Stick it in the DOM
    var image = document.getElementById('myImage');
    image.src = imageURI;
    alert("success");
    //then show the metadata fields and put the cursor in the first field
    $("#rightside").show();
    $("#caption").focus();
}

//Fail function for image retrieval
function onFail(message) {
    alert('Failed because: ' + message);
}

//image retrieval function
function getPhoto(source) {
    // Retrieve image file location from specified source
    navigator.camera.getPicture(onSuccess, onFail, {quality: 50,
    destinationType: navigator.camera.DestinationType.FILE_URI,
    sourceType: source,
    correctOrientation: true}
    );
}

//Wait for Cordova to connect with the device+
document.addEventListener("deviceready", onDeviceReady, false);

I also have this entry in AndroidManifest (as an attribute of the activity, not the app) to prevent the app from restarting when the phone is rotated while the app itself is open:
android:configChanges="orientation|keyboardHidden"

Any suggestions?
>>>>>>> > > > > > > > For more options, visit this group at
>>>>>>> > > > > > > >http://groups.google.com/group/phonegap?hl=en?hl=en
>>>>>>> >
>>>>>>> > > > > > > > For more info on PhoneGap or to download the code go
>>>>>>> > > > > > towww.phonegap.com
>>>>>>> >
>>>>>>> > > > > > --
>>>>>>> > > > > > You received this message because you are subscribed to the
>>>>>>> > > > > > Google
>>>>>>> > > > > > Groups "phonegap" group.
>>>>>>> > > > > > To post to this group, send email to
>>>>>>> > > > > > phon...@googlegroups.com
>>>>>>> > > > > > To unsubscribe from this group, send email to
>>>>>>> > > > > > For more options, visit this group at
>>>>>>> > > > > >http://groups.google.com/group/phonegap?hl=en?hl=en
>>>>>>> >
>>>>>>> > > > > > For more info on PhoneGap or to download the code go
>>>>>>> > > towww.phonegap.com
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "phonegap" group.
>>>>> To post to this group, send email to phon...@googlegroups.com
>>>>> To unsubscribe from this group, send email to
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/phonegap?hl=en?hl=en
>>>>>
>>>>> For more info on PhoneGap or to download the code go to
>>>>> www.phonegap.com
>>>>
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "phonegap" group.
>>> To post to this group, send email to phon...@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> For more options, visit this group at
>>> http://groups.google.com/group/phonegap?hl=en?hl=en
>>>
>>> For more info on PhoneGap or to download the code go to www.phonegap.com
>>
>>
> --
> You received this message because you are subscribed to the Google
> Groups "phonegap" group.
> To post to this group, send email to phon...@googlegroups.com
> To unsubscribe from this group, send email to

Simon MacDonald

unread,
Jun 20, 2012, 12:15:05 PM6/20/12
to phon...@googlegroups.com
What is being reported in "adb logcat" when you reproduce the issue? Also, can I see you manifest.xml?

Will

unread,
Jun 20, 2012, 5:52:47 PM6/20/12
to phon...@googlegroups.com
Most of this seems to happen whether the camera function returns success or the app restarts.

Also, seems to be happening now regardless of orientation/ orientations changes.

Logcat.
06-20 17:50:17.873: V/MotoCamera(24243): closeCamera - mCameraDevice.stopPreview returned
06-20 17:50:17.873: D/CameraHal(1207): stopPreview
06-20 17:50:17.873: I/HPAndroidHAL(1207): APILOG: S1Up
06-20 17:50:17.881: D/CameraHal(1207): CameraHal release
06-20 17:50:17.881: D/CameraHal(1207): deinitPvOverlay()
06-20 17:50:17.881: I/HPAndroidHAL(1207): APILOG: DeinitializePreviewMemory
06-20 17:50:17.944: I/HPAndroidHAL(1207): Exiting thread OMAPHAL_Thread (ID: 0x8fb28)
06-20 17:50:17.952: D/TIOverlay(1309): overlay_destroyOverlay:IN dev (0x29e200) and overlay (0x5882f0)
06-20 17:50:17.952: I/TIOverlay(1309): Destroying overlay/fd=231/obj=005882f0
06-20 17:50:17.952: D/TIOverlay(1309): overlay_destroyOverlay:OUT
06-20 17:50:17.959: I/HPAndroidHAL(1207): APILOG: ExitHPLibraries
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread CaptureDirectorThread (ID: 0x192560)
06-20 17:50:17.959: I/HPAndroidHAL(1207): APILOG: state machine shutting down...
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread HALThread (ID: 0x190138)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread AutoExposureThread (ID: 0x190178)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread RenderingAnalysisModule (ID: 0x1901b8)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread BoxcarThread (ID: 0x1901f8)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread S2ProcessingThread (ID: 0x190238)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread LensThread (ID: 0x190278)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread FocusThread (ID: 0x192290)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread paxelMotionThread (ID: 0x1922e8)
06-20 17:50:17.959: I/HPAndroidHAL(1207): Exiting thread CallbackThread (ID: 0x192490)
06-20 17:50:17.967: I/HPAndroidHAL(1207): Exiting thread FlickerThread (ID: 0x1924d0)
06-20 17:50:17.967: I/HPAndroidHAL(1207): Exiting thread FaceDetectThread (ID: 0x192520)
06-20 17:50:17.975: I/HPAndroidHAL(1207): Exiting thread S2PostProcessingThread (ID: 0x1925a0)
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: components shutting down...
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: all components uninitialized.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 17.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 16.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 15.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 9.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 8.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 7.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 6.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 5.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 4.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 3.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 2.
06-20 17:50:17.975: I/HPAndroidHAL(1207): APILOG: Destroying Component 1.
06-20 17:50:17.983: I/HPAndroidHAL(1207): APILOG: Destroying Component 0.
06-20 17:50:18.022: I/HPAndroidHAL(1207): APILOG: all components destroyed.
06-20 17:50:18.022: I/HPAndroidHAL(1207): APILOG: library shutdown complete.
06-20 17:50:18.022: D/CameraHal(1207): CameraHal destructor
06-20 17:50:18.022: D/CameraHal(1207): CameraHal release
06-20 17:50:18.022: D/CameraSettings(1207): CameraSettings destructor
06-20 17:50:18.022: D/MotoOnScreenControllerOpenGL(24243): updateZoom() - current zoom is 0
06-20 17:50:18.022: D/MotoCamera(24243): closeCamera() - Exit
06-20 17:50:18.022: D/MotoCamera(24243): interruptThumbnailThread
06-20 17:50:18.022: D/MotoCamera(24243): onPause() - Exit
06-20 17:50:18.045: I/ActivityManager(1309): Start proc org.koperwlabs.toadygram for activity org.koperwlabs.toadygram/.ToadyGramActivity: pid=24464 uid=10053 gids={1006, 3003, 1015}
06-20 17:50:18.053: V/MediaPlayerService(1207): disconnect(93) from pid 1207
06-20 17:50:18.053: V/StagefrightPlayer(1207): reset
06-20 17:50:18.053: V/StagefrightPlayer(1207): ~StagefrightPlayer
06-20 17:50:18.053: V/StagefrightPlayer(1207): reset
06-20 17:50:18.053: V/MediaPlayerService(1207): Client(93) destructor pid = 1207
06-20 17:50:18.053: V/AudioSink(1207): close
06-20 17:50:18.053: V/MediaPlayerService(1207): disconnect(93) from pid 1207
06-20 17:50:18.053: V/MediaPlayerService(1207): disconnect(94) from pid 1207
06-20 17:50:18.053: V/StagefrightPlayer(1207): reset
06-20 17:50:18.053: V/StagefrightPlayer(1207): ~StagefrightPlayer
06-20 17:50:18.053: V/StagefrightPlayer(1207): reset
06-20 17:50:18.053: V/MediaPlayerService(1207): Client(94) destructor pid = 1207
06-20 17:50:18.053: V/AudioSink(1207): close
06-20 17:50:18.053: V/MediaPlayerService(1207): disconnect(94) from pid 1207
06-20 17:50:18.069: E/dalvikvm(24464): could not disable core file generation for pid 24464: Operation not permitted
06-20 17:50:18.116: D/dalvikvm(24464): Debugger has detached; object registry had 1 entries
06-20 17:50:18.139: D/MotoCamera(24243): surfaceDestroyed() - Enter
06-20 17:50:18.139: D/MotoCamera(24243): stopPreview() - Enter
06-20 17:50:18.139: D/MotoCamera(24243): stopPreview() - Exit
06-20 17:50:18.139: D/MotoCamera(24243): surfaceDestroyed() - Exit
06-20 17:50:18.217: I/CordovaLog(24464): Changing log level to DEBUG(3)
06-20 17:50:18.217: I/CordovaLog(24464): Found preference for classicRender
06-20 17:50:18.217: D/DroidGap(24464): DroidGap.onCreate()
06-20 17:50:18.217: D/DroidGap(24464): DroidGap.loadUrl(file:///android_asset/www/index.html)
06-20 17:50:18.217: D/DroidGap(24464): DroidGap: url=file:///android_asset/www/index.html baseUrl=file:///android_asset/www/
06-20 17:50:18.272: D/DroidGap(24464): DroidGap.init()
06-20 17:50:18.303: D/PluginManager(24464): init()
06-20 17:50:18.319: D/SoftKeyboardDetect(24464): Ignore this event
06-20 17:50:18.381: D/SoftKeyboardDetect(24464): Ignore this event
06-20 17:50:18.444: D/SoftKeyboardDetect(24464): Ignore this event
06-20 17:50:18.452: D/szipinf(24464): Initializing inflate state
06-20 17:50:18.452: D/szipinf(24464): Initializing zlib to inflate
06-20 17:50:18.459: D/szipinf(24464): Initializing inflate state
06-20 17:50:18.467: I/ActivityManager(1309): Displayed org.koperwlabs.toadygram/.ToadyGramActivity: +435ms
06-20 17:50:18.475: D/MotoCamera(24243): onStop() - Enter
06-20 17:50:18.475: D/MotoCamera(24243): onStop() - Exit
06-20 17:50:18.483: D/szipinf(24464): Initializing zlib to inflate
06-20 17:50:18.483: D/MotoCamera(24243): onDestroy() - Enter
06-20 17:50:18.498: D/MotoCamera(24243): closeCamera() - Enter
06-20 17:50:18.506: D/MotoCamera(24243): closeCamera() - Exit
06-20 17:50:19.202: I/Database(24464): sqlite returned: error code = 14, msg = cannot open file at source line 25467
06-20 17:50:19.280: I/DroidGap(24464): WARNING: Back Button Default Behaviour will be overridden.  The backbutton event will be fired!
06-20 17:50:19.334: D/dalvikvm(24464): GC_EXTERNAL_ALLOC freed 286K, 43% free 3327K/5767K, external 2755K/2773K, paused 28ms
06-20 17:50:21.889: W/InputManagerService(1309): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@40ac3a20
06-20 17:50:22.764: I/ActivityManager(1309): Start proc com.google.android.apps.maps:NetworkLocationService for service com.google.android.apps.maps/com.google.android.location.internal.server.NetworkLocationService: pid=24485 uid=10078 gids={3003, 1015}
06-20 17:50:23.756: D/szipinf(24485): Initializing inflate state
06-20 17:50:23.756: D/szipinf(24485): Initializing zlib to inflate
06-20 17:50:24.069: I/ActivityManager(1309): Start proc com.google.android.apps.maps:FriendService for broadcast com.google.android.apps.maps/com.google.googlenav.friend.android.ServiceReceiver: pid=24500 uid=10078 gids={3003, 1015}
06-20 17:50:24.108: D/dalvikvm(1206): GC_EXPLICIT freed 11K, 45% free 3009K/5379K, external 2357K/2773K, paused 41ms
06-20 17:50:24.178: D/dalvikvm(1206): GC_EXPLICIT freed <1K, 45% free 3009K/5379K, external 2357K/2773K, paused 67ms
06-20 17:50:24.217: D/dalvikvm(1206): GC_EXPLICIT freed <1K, 45% free 3009K/5379K, external 2357K/2773K, paused 44ms
06-20 17:50:24.303: D/dalvikvm(24485): GC_CONCURRENT freed 1107K, 46% free 3937K/7175K, external 2357K/2773K, paused 2ms+29ms
06-20 17:50:24.319: I/dalvikvm(24485): Total arena pages for JIT: 11
06-20 17:50:24.405: W/PackageManager(1309): setEnabledSetting(ENABLED) - would have exited here
06-20 17:50:25.288: I/ActivityManager(1309): Start proc com.google.android.apps.maps:LocationFriendService for broadcast com.google.android.apps.maps/com.google.googlenav.friend.reporting.LocationReportingIntentReceiver: pid=24507 uid=10078 gids={3003, 1015}
06-20 17:50:25.538: D/dalvikvm(1309): GC_EXPLICIT freed 1477K, 35% free 9163K/14023K, external 5220K/6508K, paused 102ms
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.twitter, packageName=com.motorola.blur.provider.twitter
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.picasa, packageName=com.motorola.blur.provider.picasa
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.youtube, packageName=com.motorola.blur.provider.youtube
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.facebook, packageName=com.motorola.blur.provider.facebook
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.lastfm, packageName=com.motorola.blur.provider.lastfm
06-20 17:50:35.327: D/Sources(1470): MOTO: Caching (writable) contact source type from acct type: com.motorola.android.buacontactadapter
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.email, packageName=com.motorola.blur.provider.email
06-20 17:50:35.327: D/Sources(1470): MOTO: Caching (writable) contact source type from acct type: com.motorola.blur.provider.activesync
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.flickr, packageName=com.motorola.blur.provider.flickr
06-20 17:50:35.327: D/Sources(1470): MOTO: Caching (writable) contact source type from acct type: com.motorola.blur.provider.yahoo
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.myspace, packageName=com.motorola.blur.provider.myspace
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.orkut, packageName=com.motorola.blur.provider.orkut
06-20 17:50:35.327: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.linkedin, packageName=com.motorola.blur.provider.linkedin
06-20 17:50:35.334: D/Sources(1470): MOTO: Caching (read only) contact source type from acct type: com.motorola.contacts.preloaded
06-20 17:50:35.334: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.photobucket, packageName=com.motorola.blur.provider.photobucket
06-20 17:50:35.334: D/Sources(1470): Creating external source for type=com.facebook.auth.login, packageName=com.facebook.katana
06-20 17:50:35.334: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.skyrock, packageName=com.motorola.blur.provider.skyrock
06-20 17:50:35.342: I/ActivityManager(1309): Start proc com.android.vending for broadcast com.android.vending/com.google.android.finsky.receivers.PackageMonitorReceiver$RegisteredReceiver: pid=24518 uid=10036 gids={3003, 1015}
06-20 17:50:35.803: I/ActivityThread(24518): Pub com.google.android.finsky.QSBSuggestionsProvider: com.google.android.finsky.providers.QSBSuggestionsProvider
06-20 17:50:35.866: I/ActivityThread(24518): Pub com.google.android.finsky.AppIconProvider: com.google.android.finsky.providers.AppIconProvider
06-20 17:50:36.202: I/ActivityThread(24518): Pub com.google.android.finsky.RecentSuggestionsProvider: com.google.android.finsky.providers.RecentSuggestionsProvider
06-20 17:50:36.272: W/PackageManager(1309): setEnabledSetting(ENABLED) - would have exited here
06-20 17:50:37.100: D/dalvikvm(24518): DexOpt: couldn't find static field
06-20 17:50:37.100: W/dalvikvm(24518): VFY: unable to resolve static field 97 (BLOCKED) in Landroid/net/NetworkInfo$DetailedState;
06-20 17:50:37.100: D/dalvikvm(24518): VFY: replacing opcode 0x62 at 0x0024
06-20 17:50:37.108: D/dalvikvm(24518): VFY: dead code 0x0026-0029 in Lcom/google/android/finsky/utils/Utils;.isBackgroundDataEnabled (Landroid/content/Context;)Z
06-20 17:50:38.295: D/Finsky(24518): [1] DailyHygiene.goMakeHygieneIfDirty: No need to run daily hygiene.
06-20 17:50:38.561: D/RadioSignalLevel(1384): evdo dbmLevel: 4, snrLevel: 1
06-20 17:50:38.881: D/Finsky(24518): [1] 2.run: Loaded library for account: [0R7Pt18noHTETNUVUNLFyAWw2tE]
06-20 17:50:38.881: D/Finsky(24518): [1] 2.run: Finished loading 1 libraries.
06-20 17:50:38.905: D/dalvikvm(24518): DexOpt: couldn't find field Landroid/content/res/Configuration;.smallestScreenWidthDp
06-20 17:50:38.905: W/dalvikvm(24518): VFY: unable to resolve instance field 78
06-20 17:50:38.905: D/dalvikvm(24518): VFY: replacing opcode 0x52 at 0x001e
06-20 17:50:38.905: D/dalvikvm(24518): VFY: dead code 0x0020-0021 in Lcom/google/android/finsky/api/DfeApiContext;.getSmallestScreenWidthDp (Landroid/content/Context;)Ljava/lang/String;
06-20 17:50:38.920: D/DfeApi(24518): [1] DfeApiContext.getSmallestScreenWidthDp: smallestScreenWidthDp does not exist, using pre-ics hack.
06-20 17:50:41.663: I/TempNotiServices(24279): msg.what: 1
06-20 17:50:41.663: I/TempNotiServices(24279): handlerMsgcounter2
06-20 17:50:47.131: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.twitter, packageName=com.motorola.blur.provider.twitter
06-20 17:50:47.131: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.picasa, packageName=com.motorola.blur.provider.picasa
06-20 17:50:47.139: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.youtube, packageName=com.motorola.blur.provider.youtube
06-20 17:50:47.139: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.facebook, packageName=com.motorola.blur.provider.facebook
06-20 17:50:47.147: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.lastfm, packageName=com.motorola.blur.provider.lastfm
06-20 17:50:47.155: D/Sources(1470): MOTO: Caching (writable) contact source type from acct type: com.motorola.android.buacontactadapter
06-20 17:50:47.155: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.email, packageName=com.motorola.blur.provider.email
06-20 17:50:47.163: D/Sources(1470): MOTO: Caching (writable) contact source type from acct type: com.motorola.blur.provider.activesync
06-20 17:50:47.163: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.flickr, packageName=com.motorola.blur.provider.flickr
06-20 17:50:47.163: D/Sources(1470): MOTO: Caching (writable) contact source type from acct type: com.motorola.blur.provider.yahoo
06-20 17:50:47.163: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.myspace, packageName=com.motorola.blur.provider.myspace
06-20 17:50:47.163: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.orkut, packageName=com.motorola.blur.provider.orkut
06-20 17:50:47.178: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.linkedin, packageName=com.motorola.blur.provider.linkedin
06-20 17:50:47.186: D/Sources(1470): MOTO: Caching (read only) contact source type from acct type: com.motorola.contacts.preloaded
06-20 17:50:47.186: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.photobucket, packageName=com.motorola.blur.provider.photobucket
06-20 17:50:47.186: D/Sources(1470): Creating external source for type=com.facebook.auth.login, packageName=com.facebook.katana
06-20 17:50:47.186: D/Sources(1470): Creating external source for type=com.motorola.blur.provider.skyrock, packageName=com.motorola.blur.provider.skyrock
06-20 17:51:18.803: D/libgps(1309): status_cb: GPS_STATUS_ENGINE_OFF (4)


Full manifest.xml:
```
<?xml version="1.0" encoding="utf-8"?>
    package="org.koperwlabs.toadygram"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="7" />

<supports-screens 
   android:largeScreens="true" 
   android:normalScreens="true" 
   android:smallScreens="true" 
   android:resizeable="true" 
   android:anyDensity="true" />
   
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> 
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.BROADCAST_STICKY" />
    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        
         >
        <activity
            android:name=".ToadyGramActivity"
            android:label="@string/app_name" 
            android:configChanges="orientation|keyboardHidden"
            >

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
```
Hope this helps...

Ravishankar Veeraghanta

unread,
Jun 21, 2012, 5:48:20 AM6/21/12
to phonegap
I recollect having similar issues doing a native Android app about a
year ago. The issues were related to the way Android handles bitmaps
and does garbage collection. From android 3.0 onwards the allocation
of bitmaps is no longer done on the native heap so ideally the newer
phones should not be facing this issue.
http://stackoverflow.com/questions/8996655/android-bitmap-and-memory-management
http://code.google.com/p/android/issues/detail?id=11089

From the way the problem has been described and the fact that it is
difficult to reproduce seems to point to a possible memory (Apologies
for the armchair analysis).
The camera code seems to be handling the bitmaps fine. In my app in
addition to the bitmap.recycle I had aggressively set all objects
including output streams and file objects to null.

Regards,
Ravi
> source type...
>
> read more »

Jeff Thorn

unread,
Jun 21, 2012, 8:58:49 AM6/21/12
to phon...@googlegroups.com
Like Ravi, I recall having a similar issue as well. Because of the memory constraints, the OS would kill my app while the camera app was running. When the camera app ends, my app would get "re-created" again. Its been a while, but I believe I solved the problem by carefully preserving my state before launching the camera and making sure to check for the saved state during OnCreate. 


--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to

For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com



--

Jeff Thorn
Principal Software Architect

Will

unread,
Aug 29, 2012, 3:07:02 PM8/29/12
to phon...@googlegroups.com
My understanding is that when the Camera launches, the Cordova Activity is "stopped," which means it sometimes get destroyed by Android OS to free up memory.

I'm trying to implement Christopher Bailey's solution/workaround to restart the application using savedInstanceState but not having much success.

Here's what I've done so far:

Created a copy of the CameraLauncher class with relevant private vars made public (Is there a way to do this by extending the existing class)
Modified plugins.xml to map CameraLauncher to new PersistentCamera.
Added Chris's code to my activity and the app.js
 
I noticed that the app crashes (will not load) unless I call super.onCreate before Super.loadUrl, so I added this to the top of the onCreate function. Also, since my callback functions are scoped to the getPhoto function, I have a conditional statement in my onDeviceReady function that calls getPhoto and passes it a flag that executes the rest of Chris's js.

I have two sets of logcats:
If I put super.onCreate at the top of the activity, I get this.
If I put it inside the conditional (only executes if savedInstanceState is null or .isEmpty()) I get this.

I'm running Cordova 2.0 on a Droid 2 Global, min-sdk is 7.
I can usually force a restart by activating the camera and rotating the phone while the camera loads.

Any ideas, suggestions, obvious errors to my approach/syntax?

Will

unread,
Sep 4, 2012, 9:58:08 PM9/4/12
to phon...@googlegroups.com
Making some progress...

I tracked down the logcat error to a null webview which I mitigated by calling super.loadUrl (or super.init()) before trying to recreate the camera from savedInstanceState. Now I just need to figure out the javascript syntax to invoke the callbacks.

Arthur André Silva salviano

unread,
Sep 19, 2012, 3:38:55 PM9/19/12
to phonegap
You can prevent the android close or restart the activity of PhoneGap?
super.setBooleanProperty ("keepRunning", false); not resolved.

On 4 set, 22:58, Will <will.ko...@gmail.com> wrote:
> Making some progress...
>
> I tracked down the logcat error to a null webview which I mitigated by
> calling super.loadUrl (or super.init()) before trying to recreate the
> camera from savedInstanceState. Now I just need to figure out the
> javascript syntax to invoke the callbacks.
>
>
>
>
>
>
>
> On Wednesday, August 29, 2012 3:07:03 PM UTC-4, Will wrote:
>
> > My understanding is that when the Camera launches, the Cordova Activity is
> > "stopped<http://developer.android.com/reference/android/app/Activity.html#onSa...>,"
> > which means it sometimes get destroyed<https://issues.apache.org/jira/browse/CB-14>by Android OS to free up memory.
>
> > I'm trying to implement Christopher Bailey's solution/workaround<https://issues.apache.org/jira/browse/CB-14#comment-13260659>to restart the application using savedInstanceState but not having much
> > success.
>
> > Here's what I've done so far:
>
> > Created a copy of the CameraLauncher class with relevant private vars
> > made public <https://gist.github.com/3514804> (Is there a way to do this
> > by extending the existing class)
> > Modified plugins.xml <https://gist.github.com/3514885> to map
> > CameraLauncher to new PersistentCamera.
> > Added Chris's code to my activity <https://gist.github.com/3514795> and
> > the app.js <https://gist.github.com/3514870>
>
> > I noticed that the app crashes (will not load) unless I call
> > super.onCreate before Super.loadUrl, so I added this to the top of the
> > onCreate function. Also, since my callback functions are scoped to the
> > getPhoto function, I have a conditional statement in my onDeviceReady
> > function that calls getPhoto and passes it a flag that executes the rest of
> > Chris's js.
>
> > I have two sets of logcats:
> > If I put super.onCreate at the top of the activity, I get this<https://gist.github.com/3514982>
> > .
> > If I put it inside the conditional (only executes if savedInstanceState is
> > null or .isEmpty()) I get this <https://gist.github.com/3514908>.
>
> > I'm running Cordova 2.0 on a Droid 2 Global, min-sdk is 7.
> > I can usually force a restart by activating the camera and rotating the
> > phone while the camera loads.
>
> > Any ideas, suggestions, obvious errors to my approach/syntax?
>
> > On Thursday, June 21, 2012 5:48:20 AM UTC-4, Ravishankar Veeraghanta wrote:
>
> >> I recollect having similar issues doing a native Android app about a
> >> year ago. The issues were related to the way Android handles bitmaps
> >> and does garbage collection. From android 3.0 onwards the allocation
> >> of bitmaps is no longer done on the native heap so ideally the newer
> >> phones should not be facing this issue.
>
> >>http://stackoverflow.com/questions/8996655/android-bitmap-and-memory-...
> ...
>
> mais »

Smart

unread,
Sep 20, 2012, 4:03:15 PM9/20/12
to phon...@googlegroups.com
yes i have also faces the same issue. mostly on ICS..
after saving the snap, app sometimes exits.. first i though it was orientation error, but even after fixing it.it just exited..

i was facing orientation error on Gingerbread though.. after fixing it, everything started to work file on ginger
On Friday 21 September 2012 12:39 AM, John Saya wrote:
I think PhoneGap is great, but I have been experiencing this same issue since 0.9.2.  I'm now using 2.0.0 and still experiencing the random crashing due to Android's GC, after taking a picture or selecting one from the gallery.  Is there any hope that a version in the near future will permanently solve this problem?

Thanks

John


On Tuesday, September 4, 2012 5:25:19 PM UTC-4, Arthur André Silva salviano wrote:
I'm having the same problems as the others. Sometimes it takes the picture usually resumes in the other app.

I've started using version 2.0.0 Cordova but I see that this problem lasts a long time since the early versions.

Any news on the problem?

Em sexta-feira, 3 de dezembro de 2010 18h10min24s UTC-2, tvo escreveu:
Has anyone ever had any problems with the phonegap camera code on
Android? I find that the code doesn't always return from the camera
screen properly.

When my app is first started everything works fine but after a while
when returning from the camera screen none of the callbacks I set in
navigator.camera.getPicture() are called.

I then have to force quit the application and start it again for it to
work again. This issue occurs no matter if I user DATA_URL or FILE_URI
as destination. I am using Phonegap 0.9.2.

The issue doesn't seem to occur on the Android emulator but I've been
to reproduce it on all real phones that I have access to (HTC desire
w/ 2.2 and Samsung Galaxy Tab w/ 2.2).

I've seen many reports of this problem but I haven't seen any solution
or explanation of what is going on.

Can someone confirm that they are experiencing the same issue?

Thanks.
--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
 
 

Simon MacDonald

unread,
Sep 20, 2012, 4:22:21 PM9/20/12
to phon...@googlegroups.com
We are going to start some major re-workings tomorrow that will bring
the Camera code into the PhoneGap library. We will no longer be firing
an Intent to handle this. Please don't ask when it will be done as we
have not speced it yet.

Simon Mac Donald
http://hi.im/simonmacdonald


Marc Syp

unread,
Jul 12, 2014, 3:44:56 AM7/12/14
to phon...@googlegroups.com

This problem still persists in Cordova 3.3.   Is anybody working on this?  I am using the Capture plugin, and it is a real shame to release an app with this flaky behavior, even if it only happens one in 30 times. 

Marc

neha thakkar

unread,
Dec 26, 2014, 7:27:30 AM12/26/14
to phon...@googlegroups.com
Even I am facing the same issue with cordova 3.5.
Has anyone got the solution other than using the foreground plugin.

neha thakkar

unread,
Dec 26, 2014, 8:15:04 AM12/26/14
to phon...@googlegroups.com
Thank You so much.
 intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
he above solution worked for me.

Marc Syp

unread,
Dec 28, 2014, 1:12:53 PM12/28/14
to phon...@googlegroups.com

Got some weird advice that actually works, though it's not a good solution for deploying in the wild.

Try Uninstalling other third-party camera apps and see if the problem goes away. For me, it was vsco cam and camera plus.

Again, not a great solution, but if you're concern about being able to demo a prototype reliably, it can be a lifesaver.

Marc

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
---
You received this message because you are subscribed to a topic in the Google Groups "phonegap" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/phonegap/GFwv2OticKw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to phonegap+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages