android > camera - closes app

瀏覽次數:140 次
跳到第一則未讀訊息

cole peterson

未讀,
2012年1月28日 下午6:35:532012/1/28
收件者:phonegap、re...@zaaz.com
Running example code.

// Take picture using device camera and retrieve image as base64-
encoded string
navigator.camera.getPicture(onPhotoDataSuccess, onFail, {
quality : 50

Device camera launches.
I take a picture.
I get prompted to 'save' or 'discard'.

My App then relaunches.

onPhotoDataSuccess or onFail never get called.

thoughts?

thanks
cp

cole peterson

未讀,
2012年1月28日 晚上7:04:492012/1/28
收件者:phonegap
The code works if I specify
android:screenOrientation="landscape"
in the AndroidManifest.xml
thoughts?
cp

On Jan 28, 3:35 pm, cole peterson <co...@zaaz.com> wrote:
> Running example code.
>
> // Take picture using devicecameraand retrieve image as base64-
> encoded string
>         navigator.camera.getPicture(onPhotoDataSuccess, onFail, {
>                 quality : 50
>
> Devicecameralaunches.
> I take a picture.
> I get prompted to 'save' or 'discard'.
>
> MyAppthen relaunches.

Simon MacDonald

未讀,
2012年1月30日 上午9:48:232012/1/30
收件者:phon...@googlegroups.com
Make sure your mail activity tag has the following attribute:

    android:configChanges="orientation|keyboardHidden"

If not it will restart on each orientation change.

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

Rommel Peixoto

未讀,
2012年2月10日 下午1:58:562012/2/10
收件者:phon...@googlegroups.com
I have this problem...

My App relaunches after getPicture, in my device (Galaxy 5).
Simulator work fine.


Rommel Peixoto
Systems Analyst
Project Leader



2012/1/30 Simon MacDonald <simon.m...@gmail.com>

Rommel Peixoto

未讀,
2012年2月10日 下午2:08:442012/2/10
收件者:phon...@googlegroups.com
My code:

function getPicture() {
    navigator.camera.getPicture(dump_pic, onFail, {
        quality : 30,
        sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY,
        destinationType: navigator.camera.DestinationType.FILE_URI
    });
}



Rommel Peixoto
Systems Analyst
Project Leader



2012/2/10 Rommel Peixoto <romm...@gmail.com>

Rommel Peixoto

未讀,
2012年2月12日 下午5:34:212012/2/12
收件者:phon...@googlegroups.com
My application still restarts when I call the function getPicture.
Sometimes works, sometimes not...
Any idea?
回覆所有人
回覆作者
轉寄
0 則新訊息