Camera service request is greyed out

Hi,

I'm using camera service to all the App to take photos using the camera and store them into DB collection. I wanted to update the photo quality such that it occupies smaller size. To my unserstanding, I can do that by changin (quality) value at request tab. In the tutorial (http://devcenter.appery.io/tutorials/...) such values can be updated any time after linking the service. However, when tried that, I stumbled upon this:



Is there any reason that I cannot change the value here?

Thanks
1 person has
this question
+1
This topic is no longer open for comments or replies.
  • Hello!

    Please add service on page. You'll be able to edit those parameters values in mapping section.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • Thanks Maryna, got it. However, as I mentioned I'm trying to downscale the photos quality to have smallers photo. I checked the following (http://docs.phonegap.com/en/2.3.0/cor...) advised by your tutorial and I found the following:

    Note: The image quality of pictures taken using the camera on newer devices is quite good, and images from the Photo Album will not be downscaled to a lower quality, even if a quality parameter is specified. Encoding such images using Base64 has caused memory issues on many newer devices. Therefore, using FILE_URI as the 'Camera.destinationType' is highly recommended.


    So, is there other method to reduce the photos size ?

    Many thanks,
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. happy, confident, thankful, excited kidding, amused, unsure, silly indifferent, undecided, unconcerned sad, anxious, confused, frustrated

  • Hi Hawk,

    Yes you can reduce photos size with help of canvas.

    See example of code:



    //Get img component. You should replace "mobileimage_1" with your img component name.
    var img = Apperyio("mobileimage_1");

    var width = img.width();
    var height = img.height();

    var canvas = jQuery('');

    var c = canvas[0];
    var ctx = c.getContext("2d");

    ctx.drawImage(img[0], 0, 0, width, height);

    //Here you can make transformations you need.

    //Get base64String.
    var base64String = c.toDataURL();

    //Set this picture to other image component to be sure picture is ok.
    Apperyio("mobileimage_2").attr("src", base64String);



    Regards.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly

  • Hi Hawk,

    This code works with some image component(that populates with content form camera or other sources) .

    So you can run this code when your image component will be populated with data from camera.

    Also it's not a ready for your solution code, it's just a critical part it.. So you should make some modifications in accordance to your needs.

    Regards.
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. sad, anxious, confused, frustrated happy, confident, thankful, excited indifferent, undecided, unconcerned kidding, amused, unsure, silly