We've moved into final testing with our app and suddenly attempting to access the webcam or folder on a Samsung Galaxy III causes the entire app to restart.
The app uses PhoneGap 2.0.0 and the app id is 223935 (camera is in iAsk menu item).
The app uses PhoneGap 2.0.0 and the app id is 223935 (camera is in iAsk menu item).
- 106 Posts
- 6 Reply Likes
Posted 8 years ago
- 68 Posts
- 7 Reply Likes
Hi Ian,
This is actually a well known problem with Android and PhoneGap. I have personally experienced the issue since the early days of PG 0.93. There's been many "workarounds" with plugins and many people reporting the same issue, but still no sound resolution with standalone PG. I'm a little surprised to hear you're experiencing it on a such a new device though. But most likely, you're out of memory and need to restart the device.
I have personally raised the issue several times on forums including Google Groups https://groups.google.com/forum/?from... and hopefully one day it will be fixed.
John
This is actually a well known problem with Android and PhoneGap. I have personally experienced the issue since the early days of PG 0.93. There's been many "workarounds" with plugins and many people reporting the same issue, but still no sound resolution with standalone PG. I'm a little surprised to hear you're experiencing it on a such a new device though. But most likely, you're out of memory and need to restart the device.
I have personally raised the issue several times on forums including Google Groups https://groups.google.com/forum/?from... and hopefully one day it will be fixed.
John
- 106 Posts
- 6 Reply Likes
Hi John,
Thanks for the reply. Yeah I've been reading about that all over the place, including the possibility of the phone being out of memory, so I checked and the memory was fine.
Will try it on another phone.
Of course it works fine in the emulator!
Thanks for the reply. Yeah I've been reading about that all over the place, including the possibility of the phone being out of memory, so I checked and the memory was fine.
Will try it on another phone.
Of course it works fine in the emulator!
- 68 Posts
- 7 Reply Likes
Haha of course it works fine in the emulator lol.... Your best place to start is checking logcat in Eclipse. It should tell you if the Android Garbage Collector is killing your app due to memory or some other issue is going on when you access the camera or gallery.
John
John
- 106 Posts
- 6 Reply Likes
Tried it on another phone (also a Samsung Galaxy S III) and it worked. But that phone had been upgraded to Android 4.1, so I restarted the original phone that it was tested on and it worked fine.
So it is as you said.
This will be a fun one to tell the customer!
So it is as you said.
This will be a fun one to tell the customer!
- 68 Posts
- 7 Reply Likes
Yes, that's always good times explaining to a customer. Good luck ;)
Another thing, Ice Cream Sandwich is a nightmare with PhoneGap. I would not be surprised if that's causing the issue on your original phone.
Unfortunately, many people in the U.S. (and some other parts of the world) are still being forced to use ICS and can't get Jelly Bean yet, so it just makes things that much more complicated.
But, most people are still using Froyo, Gingerbread, and other early versions of Android and nearly all of them will restart the app when using the camera or gallery when memory is low (which is almost always).
John
Another thing, Ice Cream Sandwich is a nightmare with PhoneGap. I would not be surprised if that's causing the issue on your original phone.
Unfortunately, many people in the U.S. (and some other parts of the world) are still being forced to use ICS and can't get Jelly Bean yet, so it just makes things that much more complicated.
But, most people are still using Froyo, Gingerbread, and other early versions of Android and nearly all of them will restart the app when using the camera or gallery when memory is low (which is almost always).
John
- 106 Posts
- 6 Reply Likes
Weirdly it works every time on my slow and full Android 2.2 HTC Desire. Not everyone can afford a new phone (e.g. me!)
It's a shame there's no way to check if there's enough memory or not so that the user could either be warned or the logic could be changed to disable camera access until enough memory is available.
It's a shame there's no way to check if there's enough memory or not so that the user could either be warned or the logic could be changed to disable camera access until enough memory is available.
- 68 Posts
- 7 Reply Likes
Yes, it's a perplexing issue no doubt. But, without plugins or writing your own Java code, it will continue to happen with most devices, unfortunately. All I can suggest is to start raising the issue in masses in the PhoneGap Google Group I mentioned above, so it finally gets the attention it deserves.
I can already attest that I've tried the upcoming PhoneGap 2.2.0rc1 and it's still not resolved.
John
I can already attest that I've tried the upcoming PhoneGap 2.2.0rc1 and it's still not resolved.
John
- 106 Posts
- 6 Reply Likes
It can't be an easy one to fix then, otherwise they would've already done so.
- 68 Posts
- 7 Reply Likes
I agree, I'm sure it's very tricky to resolve with so many different versions of Android and devices. I commend the PhoneGap team for their incredible work, because it's truly an amazing framework. However I also think such a widely used feature should haven been resolved long before version 2 was released. The majority of apps use a camera or gallery, and with that functionality broken, the product becomes virtually worthless.
- 1941 Posts
- 89 Reply Likes
Hey guys,
I would suggest also expressing your concerns here:
http://groups.google.com/group/phonegap
Most of the cordova/phonegap developers lurk there and would love to hear your feedback.
Hardeep Shoker
I would suggest also expressing your concerns here:
http://groups.google.com/group/phonegap
Most of the cordova/phonegap developers lurk there and would love to hear your feedback.
Hardeep Shoker
- 69 Posts
- 1 Reply Like
are you using the option: destinationType: destinationType.DATA_URL ? because if you do so, you are forcing the app to make a base64 encoding of the picture and if the picture has a huge resolution (as it has the galaxy 3 by default) probably the app will crash.
Try with a low resolution when you take the picture, it worked for me.
Im also trying to force the resolution when im calling the the camera but im not able to...
Try with a low resolution when you take the picture, it worked for me.
Im also trying to force the resolution when im calling the the camera but im not able to...
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers



