Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

The Barcode Scanner does not work anymore(?)

Hi,
I developed my first test app with barcode scanner service some weeks ago and it worked fine.

Today I worked to the same app to improve it, but the barcode scanner service does not work anymore.
If I run the app inside the Android Test App, I have the following message in the log window:

[23:21:45] System: To view log output, use Tiggzi Mobile Tester to launch your app in the "Debug" mode
[23:22:37] Android Device [my username] : I/Web Console( 8857): TypeError Cannot call method 'scan' of undefined at undefined:351

The service is called directly on a button "click" event

Any Idea?
Thanks

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

The Barcode Scanner does not work anymore(?)

Could you share the app for collaboration with a href="mailto:support@tiggzi.com" rel="nofollow"support@tiggzi.com/a for us to test it?

Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

The Barcode Scanner does not work anymore(?)

Done,

Thanks

Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

The Barcode Scanner does not work anymore(?)

If you have to login in the app, you can use username/pass as prova/abc

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

The Barcode Scanner does not work anymore(?)

We reproduced the problem and working on fixing it.

If this helps in any way, the problem is not reproduced in a new project where you add a barcode scanner and invoke on button click.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

The Barcode Scanner does not work anymore(?)

Barcode scanner doesn't work because custom JavaScript navigation was used. When such navigation was used, dependencies are not resolved correctly on a new page. The easiest solution is to use Navigate to Page action instead of custom navigation. Or, you may also add res/lib/barcodescanner.js as a resource in Project Profile.

Claudio
Posts: 0
Joined: Thu May 31, 2012 9:29 pm

The Barcode Scanner does not work anymore(?)

YES!
It worked. I choosed the second one: added the js as a resource

Thanks!

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

The Barcode Scanner does not work anymore(?)

I need custom navigation via JS.
So do you mean this?

Project Settings: = External Resources: = User Defined resources: =
In the field enter.. res/lib/barcodescanner.js
Then Click the Add Button.

Did I interpret this correctly ?

Thanks.

Emmz
Posts: 0
Joined: Sat Jun 23, 2012 11:06 pm

The Barcode Scanner does not work anymore(?)

Ok Tried the method I just Posted and it works. Kinda.
I have 1 scanner service. 1 button click event that runs the scanner service.
When using the Tiggzi tester On android 2.3.5 Galaxy S2
I get 2 overlapping (Generic Select which app to use for this function)
If i select Tiggzi tester on the first prompted request it Forcloses my app.
If I Use the Android Back Button to get rid of the first request. The 2nd one shows. I select Tiggzi Tester. It works Fine !
Why the 2 requests on 1 use Of the Barcode Scanner?

Note. If I dont add res/lib/barcodescanner.js as a External Resource
My app does nothing when scan button pressed. No Scan or Errors.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

The Barcode Scanner does not work anymore(?)

The prompt to select which is app is how Android works if there are two or more apps to do an action.

Without including the JavaScript library and not using he built-in navigation - the scan won't work and the library for it won't be loaded.

Return to “Issues”