Page 1 of 3

The Barcode Scanner does not work anymore(?)

Posted: Sun Jun 17, 2012 9:35 pm
by Claudio

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


The Barcode Scanner does not work anymore(?)

Posted: Sun Jun 17, 2012 11:24 pm
by maxkatz

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?


The Barcode Scanner does not work anymore(?)

Posted: Mon Jun 18, 2012 5:49 am
by Claudio

Done,

Thanks


The Barcode Scanner does not work anymore(?)

Posted: Mon Jun 18, 2012 7:27 am
by Claudio

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


The Barcode Scanner does not work anymore(?)

Posted: Mon Jun 18, 2012 3:58 pm
by maxkatz

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.


The Barcode Scanner does not work anymore(?)

Posted: Tue Jun 19, 2012 1:30 pm
by maxkatz

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.


The Barcode Scanner does not work anymore(?)

Posted: Wed Jun 20, 2012 9:13 pm
by Claudio

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

Thanks!


The Barcode Scanner does not work anymore(?)

Posted: Sat Aug 18, 2012 2:18 pm
by Emmz

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.


The Barcode Scanner does not work anymore(?)

Posted: Sat Aug 18, 2012 4:00 pm
by Emmz

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.


The Barcode Scanner does not work anymore(?)

Posted: Sat Aug 18, 2012 4:37 pm
by maxkatz

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.