How To: Cordova repo and import it into Outsystems

How To: Cordova repo and import it into Outsystems

  


How would one take a Cordova repo and import it into Outsystems as a Plugin?

For example: 

https://github.com/manateeworks/phonegap-mwbarcodescanner

Thank you kindly


Brian

Hi Brian,


Have you taken a look at the OutSystems Learn Channel, Developing OutSystems Mobile Apps course? There's a specific video and exercise on Mobile Cordova Plugins that can get you started.


Other than this, you might also want to check the OutSystems Forge plugins: Barcode Plugin for Cordova based on ZBar library and ZXing Services, although this one is a server-side API, not client.


Cheers!

Hello Brian,

In attach you can find a very simple example of an integration with that plugin. Did you have any particular issues doing this integration?

Cheers,
R

Rodrigo Coutinho wrote:

Hello Brian,

In attach you can find a very simple example of an integration with that plugin. Did you have any particular issues doing this integration?

Cheers,
R

Thank you Rodrigo, your a gentleman and a scholar. We can see where went wrong with your example. We will keep you up to date with any new findings but your response was more than perfect, we were under the impression this was a normal response from the success team when they had time to assist outside of paying customers "how it is normally referenced when we request assistance".Unfortunately it hasn't been the case for most of our requests for assistance, but in your case you definitely you've definitely earned a big thumbs up from us. That small extra effort is what we thought we would always received from the success team with our questions. Thank you thank you thank you. Hoping this is the case moving forward. Crossing our fingers for the possibilities. 


Rodrigo Coutinho wrote:

Hello Brian,

In attach you can find a very simple example of an integration with that plugin. Did you have any particular issues doing this integration?

Cheers,
R

Rodrigo Coutinho

For some reason all were getting back is False as scan result? Are we doing something wrong? We can't seem to get it right with the limited amount of days left in the enterprise trial to show our board a true working example of outsystems in action. 

Would you be so kind to help us fix this issue?

Thanks


Brian

Pedro Gonçalves wrote:

Hi Brian,


Have you taken a look at the OutSystems Learn Channel, Developing OutSystems Mobile Apps course? There's a specific video and exercise on Mobile Cordova Plugins that can get you started.


Other than this, you might also want to check the OutSystems Forge plugins: Barcode Plugin for Cordova based on ZBar library and ZXing Services, although this one is a server-side API, not client.


Cheers!

Thanks Pedro, yes we have and we havent had any success with the plugins as new modules in the forge. We have just been going back and forth burning the enterprise trial. Seems as if we must be speaking to the community vs the success team that is suppose to be helping us.

I hope this isn't the experience once your paying customer. I would be the contact for ScanBoss and I certainly don't feel like the majority of the responses for the success team has been too helpful. 

If anything I feel like Ive been singled out and ganged up on for even asking for someone to help us make the module.

Its disappointing to say the least.


---------

EDIT:

Due to some serious help from the OutSystems community and team, we would like to say thank you! We appreciate all the help the team has refocused on us and we don’t take it lightly, we appreciate it. We’re sorry it went that way, whether it was our misunderstanding, or simple confusion on my interpreting the support system.


Thank you OutSystems team for helping, and having our back even when we doubted you.

---------

Hi Brian,

The call to scan doesn't return anything useful, you'll need to setup a callback. In attach you can find a more elaborate example where this is done, allowing you to you get the scanned code back on the screen.

Cheers,
R


Rodrigo Coutinho wrote:

Hi Brian,

The call to scan doesn't return anything useful, you'll need to setup a callback. In attach you can find a more elaborate example where this is done, allowing you to you get the scanned code back on the screen.

Cheers,
R


Rodrigo, you rock buddy. I don't care what anyone says, you're the best on the forum and in full stack dev. Just kidding! No one said anything. You're just a superstar and the most helpful person, you and Mario both. Whatever your selling, Im buying. 


So here's my follow up question.


I am trying to edit the Manatee Module Clone (cloned it so I wouldn’t mess anything up) to have the scanner look for two types of bar codes, three barcode results to be exact, before it returns the value(s).

Currently it returns whatever is in focus at the time of scanning, sometimes more than one is returned into result.

I was sure I saw something online regarding custom callbacks and documentation in the manatee sdk that would help me do this but I was definitely wrong.

How would you suggest I modify the start scanning javascript to keep the barcode scanner active until all three barcodes, two types, were captured?

Do you know what I could do to modify my module to ScanOnClick client action to look for (1) UPC-A barcode type & (2) Code128 barcodes.

Thanks for the extra push of help you guys have provided, you guys really know your platform, and more importantly your industry.

example pic attached.

ps. I'd like to remove or comment out anything I've been disappointed about, this has been a worldwind, an exact 180 to what I thought I was experiencing thanks to you two. 


Let me know on both accounts. I'd like to make sure no one discounts the power of the driving force, the staff, and technology of outsystems.

Hi Brian,

According to the documentation, you can prevent the scanner from closing once you scan. On the initialization JS you need to add the following to the init function:

mwbs['MWBcloseScannerOnDecode'] = false;

Then you can decide what to do when you scan a barcode.  Either continue scanning if there are missing codes:

scanner.resumeScanning();

or stop scanning and return the codes. It is at the point that you decide to stop scanning that you should call resolve.

scanner.closeScanner();
$resolve();

Best of luck,
R

Rodrigo,


Were having the toughest time with this, we uncommented the mwbs below and added to init like you suggested before and it's throwing the error attached. Anyway you can attach an example for us to work with. Any help would be a big help. 

Rodrigo Coutinho wrote:

Hi Brian,

According to the documentation, you can prevent the scanner from closing once you scan. On the initialization JS you need to add the following to the init function:

mwbs['MWBcloseScannerOnDecode'] = false;

Then you can decide what to do when you scan a barcode.  Either continue scanning if there are missing codes:

scanner.resumeScanning();

or stop scanning and return the codes. It is at the point that you decide to stop scanning that you should call resolve.

scanner.closeScanner();
$resolve();

Best of luck,
R

Rodrigo,

Below is the parser we'd like to use, is there a way to set this in the app using a local variable like we did with the license?

And then the parser results, Im assuming we could assign them to a local variable. Would you be able to use PDF417 with the parser below to scan a drivers license to help us understand what it should look like and we can finish the app with the drivers license scan?

Again thank you for taking the time out of your day to assist us with this. 

You've been the most helpful in the manatee integration. 

Thank you!



mwbs['MWBsetActiveParser'](constants.MWP_PARSER_MASK_AAMVA);
    Available options:
           MWP_PARSER_MASK_NONE
           MWP_PARSER_MASK_AUTO 
           MWP_PARSER_MASK_GS1 
           MWP_PARSER_MASK_IUID
           MWP_PARSER_MASK_ISBT
           MWP_PARSER_MASK_AAMVA
           MWP_PARSER_MASK_HIBC





Solution

Hi Brian,

Took another go at this, and attached a new module with some changes. I added the following line to the "InitPlugin" javascript node in the "StartScanning" action. I've added this right before the "switch(dvc.platform) {" line.

mwbs['MWBcloseScannerOnDecode'](false);

Next, I changed the code on the "Scan" javascript node to scan two arbitrary codes. The function waits for 2 seconds before scanning the 2nd conde.

Right now the function is only returning the result of the last scan, but you can transform this to return a list of results. 

You can also check to make sure the codes are all different, and of the types you're expecting.

Cheers,
R

Solution

God of the IoT I tell you, Bowing for you sir. Thank you.

I will advise on my findings, for documenting purposes. As you are brilliant. Thank you.