Issue taking a picture on Winows Mobile (MC65)

Hi guys,

I'm using RMS_4.0.0 and I can't take a picture using MC65 device (WM 6.5.3). The code is very simple and work properly on Android devices:

  def new

    Camera::take_picture(url_for(:action => :camera_callback))

    ""

  end

  def camera_callback

   

    if @params['status'] == 'ok'

        @imgUri = Rho::RhoApplication.get_blob_path(@params['image_uri'])

        WebView.navigate(url_for :action => :elaborateImage, :query => {:img_uri => @imgUri})

    end

   

    ""

  end

I see that the condition if @params['status'] == 'ok' isn't satisfied on MC65. Unfortunately I haven't others WM devices to test

I've read this post https://developer.motorolasolutions.com/thread/1668 where Darryn said "We have known issues with the Camera on ES400 and MC65", but it was dated June 2012, do you know if there are issues yet?

Thanks a lot for any clue!

Kutir Mobility
Hi Luca,We are also facing

Hi Luca,

We are also facing "Camera| takePicture failed with code : 0x80070037" error with RMS 4.0 and RMS 2.2. on MC 65.

Thanks

Visnupriya R

Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


David Miller
HiI enquired with Motorola

Hi

I enquired with Motorola about the camera functions in V4.0 on 21 August.  This was the reply I received, original question relating to WM 6.5.3...

Hi David,

Unfortunately, the Rho4.0 Camera API did not make the cut for Rho4.0 release due to quality issues, but don’t worry as the Rho2.2 Imager/Camera APIs are still available in Rho4.0 (and future 4.x releases). You can mix and match 2.2 APIs with Rho4.0 APIs (which we call CommonAPIs) if you want, the MC55 should deal with this fine.

We are aiming to have Rho4.1 out by xmas time which fills in the gaps of the missing 4.0 APIs, Camera being the number 1 priority. It’s a shame, as Camera was ready on all platforms [in RhoV4.0] except WinMobile/CE, where there were still issues with getting the camera in and out of fullscreen mode.

Hopefully this is information enough to be able to make your decision [about whether to use V4 or not]

Best regards,

Device Features Team

...I assume the above is still the case?

If not - does the V4.0 documentation say it is a valid API?  I've just looked and the V4.0 API reference does not show the camera function listed.  However, the V4.0 RhoMobile API Summary does reference how to access the camera!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Kutir Mobility
Hi David, We used the old

Hi David, We used the old camera api on RMS 4.0 for MC65 and its not working. We once tried camera api with RMS 2.2 and its was not working either. VP Kutir Mobility

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


David Miller
I used the camera function

I used the camera function correctly on V2.2 on an MC55A0.  So:

V2.2 MC55A0 - works ok (according to David)

V4.0 MC55A0 - not ok (according to Luca and Kutir)

V2.2 MC65 - not ok (according to Kutir)

V4.0 MC65 - not ok (according to Luca)

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Nrusingha Patro
Hi,There is one more API

Hi,

There is one more API available for taking picture. (Imager)

http://edgedocs.rhomobile.com/v/2.2/rhoelements/imager

which works on both V4.0 and V2.2 on all platforms. (Available with Ruby and Javascript both)

This API can be used if there are issues with Camera API

Regards,

Patro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
I have successfully used the

I have successfully used the 2.2 Camera API (Ruby). You can easily use Ruby from your JS code by making an AJAX call to your ruby method and then 'return back to JS' via a Webview.execute_js call.

See example in the RhoSpection sample app:

rho-samples/Rhospection/Rhospection at master · rhomobile/rho-samples · GitHub

/app/Camera/controller.rb has two methods:

rho-samples/Rhospection/Rhospection/app/Camera/controller.rb at master · rhomobile/rho-samples · GitHub

To call the method look at : rho-samples/Rhospection/Rhospection/app/Report/new.erb at master · rhomobile/rho-samples · GitHub

$.ajax({

        url: "/app/Camera/take_picture_with_default_camera"

      }).done(function() {

      });


The controller then returns the location of the image file to the app via a Webview.execute JS;rho-samples/Rhospection/Rhospection/app/Camera/controller.rb at master · rhomobile/rho-samples · GitHub


      Rho::WebView.execute_js("change_image_source('"+image+"')")


the change_image_source is a JS function in the view.https://github.com/rhomobile/rho-samples/blob/master/Rhospection/Rhospection/app/Report/new.erb#L241

function change_image_source(img)

{

  $('#itemimgsrc').attr('src',img);

}

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Luca Priano
Hi Robert,did you try using

Hi Robert,

did you try using MC65? 

If didn't, do you know if there is or will be some hope to take a picture by it?

Thanks a lot

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
Hi LucaSorry i do not have

Hi Luca

Sorry i do not have access to a MC65 at the moment. It is the same platform as the ES400 so i think it will work. Can you download the project from above link and try it on your MC65?

Thanks

Rob

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Luca Priano
Hi Rob,I've tried but without

Hi Rob,

I've tried but without success on MC65 (with Galaxy S3 it works fine)

bye

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Luca Priano
Guys, yesterday we saw Pietro

Guys, yesterday we saw Pietro Maggi and we have the opportunity to try our simple app onto his MC65 and...it worked fine!!!

Comparing our MC65 with the one he had, there was a difference about the operating system version: we haven't the latest one, but unfortunatelly I can't update operating system to verify if the issue is just the old version because it isn't our property

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Luca Priano
Updated the operating system

Updated the operating system to the latest italian version, it works fine onto our MC65 too!!!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Pietro Francesc...
Very good news. I was

Very good news. I was starting to believe that RhoElements works only on my devices :-)

I'd like to have better information available in the RhoMobile Suite documentation, and the supported BSP is one of this information!

If you think that something is missing from the documentation site, please open an issue on gituhub:

https://github.com/rhomobile/rhomobile-docs/issues

~Pietro

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments