Signature API don't work within Rhomobile 5.1.1

// Expert user has replied.
A Adel Sari 3 years 6 months ago
2 4 0

Hi,
as the doc mentioned i have included extensions: ["signature"] in my build.yml
i am using ruby, when calling Rho::Signature.takeFullScreen({}, url_for(:action => :signature_callback))
i am getting an error on runtime:
Error: uninitialized constant Rho::Signature
Trace:
C:/RhoMobileSuite5.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-5.1.1/lib/framework/rho/rho.rb:1236:in `const_missing'
C:/Users/asari/workspace/VMAXSOR_SV/app/Service/service_controller.rb:55:in `capture_fullscreen'
C:/RhoMobileSuite5.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-5.1.1/lib/framework/rho/rhocontroller.rb:101:in `serve'
C:/RhoMobileSuite5.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-5.1.1/lib/framework/rho/rhoapplication.rb:217:in `serve'
C:/RhoMobileSuite5.1.1/ruby/lib/ruby/gems/1.9.1/gems/rhodes-5.1.1/lib/framework/rho/rho.rb:836:in `serve'

i am testing on an MC40 and a TC55 devices (Android 4.x.x)
any help will be appreciated.

Please Register or Login to post a reply

4 Replies

A Abhineet Agarwal

Hi

By default app_type: "rhoelements" includes the signature extension as part of an application.

In Android device, there are two ways to achieve the same:-
1. set  app_type: "rhoelements" in build.yml. This will include signature extension. Hence all functionality related to signature extension will work.

2. If app_type: "rhoelements" is not set, then include "signature" extension in build.yml.
For example:-
android:
  extensions:
  - signature

In WM, mandatory to include app_type: "rhoelements", so the below thing is not necessary to be added in build.yml.
wm:
  extensions:
  - signature

Regards,
Abhineet

J Jon Tara

Signature is part of RhoElements. Are you using RhoElements?

In 2.x it was part of Rhodes.

As an alternative, consider using Javascript. There are many suitable scripts to be found, which use a element.

I've helped implement a sketch tool in Javascript, which replaced the Signature API being mis-used for that purpose...

A Adel Sari

Thanks Jon for your help, in fact i am using jSignature plugin in parallel, but still want to test Rho Signature API

J Joydeep Chakraborty

Hi Adel,
Please use
app_type: "rhoelements"
Hope this will fix your problem.

But I agree that,This should work without setting app_type and only adding extensions: ["signature"] ,at least documentation says that.
We will take a look into that.
Regards,
Joydeep

CONTACT
Can’t find what you’re looking for?