navigator.camera.getPicture(onPhotoDataSuccess, onFail, { quality:
50, destinationType: Camera.DestinationType.FILE_URI });
Frequently the size of the Base64 encoded image causes and out of
memory error so I recommend to everyone they use the FILE_URI return
type.
As well make sure you have put:
android:configChanges="orientation|keyboardHidden"
in your AndroidManifest.xml. If not the main html page will reload
when you return from the camera.
Simon Mac Donald
http://hi.im/simonmacdonald
> --
> 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
Simon Mac Donald
http://hi.im/simonmacdonald
Simon Mac Donald
http://hi.im/simonmacdonald
One thing I did notice in the logs but I don't think it is related is:
E/WindowManager(22019): Activity com.test.activity.testActivity has
leaked window com.android.internal.policy.impl.PhoneWindow$DecorView@44c56818
that was originally added here
E/WindowManager(22019): android.view.WindowLeaked: Activity
com.test.activity.testActivity has leaked window
com.android.internal.policy.impl.PhoneWindow$DecorView@44c56818 that
was originally added here
E/WindowManager(22019): at android.view.ViewRoot.<init>(ViewRoot.java:247)
E/WindowManager(22019): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:148)
E/WindowManager(22019): at
android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91)
E/WindowManager(22019): at
android.view.Window$LocalWindowManager.addView(Window.java:424)
E/WindowManager(22019): at android.app.Dialog.show(Dialog.java:241)
E/WindowManager(22019): at
android.app.AlertDialog$Builder.show(AlertDialog.java:802)
E/WindowManager(22019): at
com.phonegap.DroidGap$GapClient.onJsAlert(DroidGap.java:885)
E/WindowManager(22019): at
android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:501)
E/WindowManager(22019): at android.os.Handler.dispatchMessage(Handler.java:99)
E/WindowManager(22019): at android.os.Looper.loop(Looper.java:123)
E/WindowManager(22019): at
android.app.ActivityThread.main(ActivityThread.java:4627)
E/WindowManager(22019): at java.lang.reflect.Method.invokeNative(Native Method)
E/WindowManager(22019): at java.lang.reflect.Method.invoke(Method.java:521)
E/WindowManager(22019): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
E/WindowManager(22019): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
E/WindowManager(22019): at dalvik.system.NativeStart.main(Native Method)
Are you calling an alert dialog from your code?
Simon Mac Donald
http://hi.im/simonmacdonald
It sounds like you are suffering from the issue that the default
intent for taking picture/video does not call onActivityResult
properly. I've run into this on my Samsung phone for audio recording.
This is a vendor bloatware issue and I'm not sure what I can do to fix
it.
Using a separate camera app like you've discovered seems to be the
only work around at the moment.
Simon Mac Donald
http://hi.im/simonmacdonald
i can bring some light into the dark of my camera functionality.
My Testing Scenario was:
Change things in Adroid Project in Eclipse, run as -> on emulator.
Copy apk to phone, overwriting prior version.
Stopping/Clearing Memory of prior installed version. Now install new
apk. Sometimes even uninstall current version on device.
I could not find any errors, so i ran paranoid. Now I'm deleting apk
inb4 new compile in eclipse, removing prior version manual in
emulator.
On phone uninstalling, prior versions, rebooting the device. Making a
clean install of new apk.
And BOOM it works? Now my Camera works with same code, nothing(!)
changed, with PhoneGap 1.2.0. For Both library and direct Camera.
I could reproduce this and i hope this stays now constant.
Being a SysAdmin in the past, i would consider myself to be able, to
not run in such problems or find them quick. It's frustrating :)
Seems that, my Development Environment got compromised by the latest
google/SDK update Problems, which occured (google it).
More likely: My Android img/Installtion on the Phone does not handle
install correctly or even more likely some installed Apps, which could
influence other App Installations were attacking me :)
Or im not aware of such issues in the Development Process for
Android?!?
I'll stick with this explanation until new problems occur. My Code,
has not changed, and is now working as intended. So no Javascript
errors could have been in the way.
Thanks to Simon for still reviewing my problem.
Regards
TehSharpie
On Nov 15, 4:14 pm, Simon MacDonald <simon.macdon...@gmail.com> wrote:
> Hey Lucy,
>
> It sounds like you are suffering from the issue that the default
> intent for taking picture/video does not call onActivityResult
> properly. I've run into this on my Samsung phone for audio recording.
> This is a vendor bloatware issue and I'm not sure what I can do to fix
> it.
>
> Using a separatecameraapp like you've discovered seems to be the
> only work around at the moment.
>
> Simon Mac Donaldhttp://hi.im/simonmacdonald
>
>
>
>
>
>
>
> On Tue, Nov 8, 2011 at 12:24 PM, LucyJp <kayok...@hotmail.com> wrote:
> > We found that using othercameraapp, getPicture and captureVideo
> > works as expected but using built incameraapp does not work. Does
> > this tell you anything?
>
> > Othercameraapp from market - “Camera360” and “Vignette Demo”
>
> > Any thought?
>
> > Thank you
>
> > On Nov 8, 8:57 am, LucyJp <kayok...@hotmail.com> wrote:
> >> Hi Simon,
>
> >> Please see log athttps://gist.github.com/1347716 (sorry added wrong
> >> url in previous post).
>
> >> Thank you
>
> >> On Nov 8, 8:42 am, LucyJp <kayok...@hotmail.com> wrote:
>
> >> > Hi Simon & Pranav,
>
> >> > I have same issue using Motorola Droid Android 2.2.2/phonegap 1.1.
>
> >> > Hit OK always brings back to thecameraapp and does not call success
> >> > call back. (Thecameraapp provide OK, retake, and cancel buttons.)
> >> > > 2. Link on theapplication, opens thecamera(API used as suggested by
> >> > > you)
> >> > > 3. Photo is taken
> >> > > 4 Since there is no option of saving the file and no way to return
> >> > > back toapplication, I deleted the photo ( After taking photo, it gave
> >> > > me options to delete the photo, take new photo, rename the file name
> >> > > and NO option to update, save as etc)
>
> >> > > Regards,
> >> > > Pranav
>
> >> > > On Nov 7, 7:02 pm, Simon MacDonald <simon.macdon...@gmail.com> wrote:
>
> >> > > > Create a gist onhttps://gist.github.com/asitisaneffective way to
> >> > > > share logs without having to paste it all in an email.
>
> >> > > > Simon Mac Donaldhttp://hi.im/simonmacdonald
>
> >> > > > On Mon, Nov 7, 2011 at 12:33 AM, Pranav <vpra...@gmail.com> wrote:
> >> > > > > Thanks Simon for quick reply.
>
> >> > > > > Shall I grep "D/CameraApp" and send across only theCameralogs or
> >> > > > > attach the entire logs. Also I donotsee the way to attach the file
> >> > > > > here. I have to copy and paste it :)
>
> >> > > > > Regards,
> >> > > > > Pranav
>
> >> > > > > On Nov 7, 9:48 am, Simon MacDonald <simon.macdon...@gmail.com> wrote:
> >> > > > >> Run "adb logcat" so we can see what is going on.
>
> >> > > > >> Simon Mac Donaldhttp://hi.im/simonmacdonald
>
> >> > > > >> On Sun, Nov 6, 2011 at 11:27 PM, Pranav <vpra...@gmail.com> wrote:
> >> > > > >> > Hi Simon,
>
> >> > > > >> > I tried your suggestion but it also didnotwork. After taking photo,
> >> > > > >> >camerais still open and I donotget option to "save" the picture.
> >> > > > >> >> >Cameraopens and I am able to take photo but after photo is taken, the
> >> > > > > For more info on PhoneGap or to download the code go towww.phonegap.com-Hidequotedtext -