1

メソッド get picture が呼び出されると、写真の撮影中にアプリがランダムにクラッシュします。

クリックするとカメラを起動する要素へのバックグラウンド URL があります...

ただし、この URL を削除することはできません。すべてのオプションを試しましたが、何も機能しません アプリがまだクラッシュします 助けてください.

our app crashes randomly while taking photos when the method get picture is called.

We do have background URL to the element on whose click we launch the camera...

But we cannot remove this URL. tried all the options but nothing works app still crashes please help.

HTML markup:

<div class="ui-grid-a"> <img class = "ui-block-a ui-bar-a new-photo-class accident-photos-block accident-photos-block-margin-right accident-photos-img owner-information-photos-class" id="ownerInformation_photo1" data-photoname = "photo1" /> <img class = "ui-block-b ui-bar-a new-photo-class accident-photos-block accident-photos-block-margin-left accident-photos-img owner-information-photos-class" id="ownerInformation_photo2" data-photoname = "photo2"/> </div>

class: 

.new-photo-class{
    background-repeat:no-repeat;
    background-position: center; 
    background-image: url('images/hdpi/new_photo.png'); 
    background-image: url('images/hdpi/new_photo.png'), -webkit-gradient(linear, left top, left bottom, from(#636363), to(#3f3f3f)); /* Saf4+, Chrome */
    background-image: url('images/hdpi/new_photo.png'), -webkit-linear-gradient(top, #636363, #3f3f3f); /* Chrome 10+, Saf5.1+ */
    background-image: url('images/hdpi/new_photo.png'),    -moz-linear-gradient(top, #636363, #3f3f3f); /* FF3.6+ */
    background-image: url('images/hdpi/new_photo.png'),     -ms-linear-gradient(top, #636363, #3f3f3f); /* IE10 */
    background-image: url('images/hdpi/new_photo.png'),      -o-linear-gradient(top, #636363, #3f3f3f); /* Opera 11.10+ */
    background-image: url('images/hdpi/new_photo.png'),         linear-gradient(top, #636363, #3f3f3f);

}

.new-photo-class:hover{
    background-repeat:no-repeat;
    background-position: center; 
    background-image: url('images/hdpi/new_photo.png'); 
    background-image: url('images/hdpi/new_photo.png'), -webkit-gradient(linear, left top, left bottom, from( #ffae00 /*{d-bdown-background-start}*/), to( #febe10 /*{d-bdown-background-end}*/)) !important; /* Saf4 , Chrome */
    background-image: url('images/hdpi/new_photo.png'), -webkit-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* Chrome 10 , Saf5.1  */
    background-image: url('images/hdpi/new_photo.png'),   -moz-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* FF3.6 */
    background-image: url('images/hdpi/new_photo.png'),    -ms-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* IE10 */
    background-image: url('images/hdpi/new_photo.png'),     -o-linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/) !important; /* Opera 11.10  */
    background-image: url('images/hdpi/new_photo.png'),        linear-gradient( #ffae00 /*{d-bdown-background-start}*/, #febe10 /*{d-bdown-background-end}*/)!important;
}

and the click of the photo image:
 // click function of photo 
    $(".owner-information-photos-class").off('click').on('click', function(){
        var photoNumber = $(this).data(Constants.photo_name);
        var photoId = $(this).attr(Constants.id);
        var src = $(this).attr(Constants.src);
        if(src === Config.add_image_url){
            DeviceManager.capturePhoto(photoNumber, photoId, Constants.owner_information_directory_key, false);
        } else {

            photoNameOwnerInfo = photoNumber;
            // set the source path of the image to the global variable
            largeImageSrc = src;
            // make a change page with the larger image shown 
            $.mobile.changePage( "#pageAccidentPhotosLargeImage");
        }
    });

------------------------------------------------------------------------
4

1 に答える 1