[//]: # (header-start)


<h1 align="center">
	<a href="https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de">
		Axway Amplify End-of-Life Announcement
	</a>	
</h1>
<h2 align="center">
	👇 &nbsp; See API FAQ below  &nbsp; 👇
</h2>	


<a href="https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de">
	<p align="center">
		<img src="https://cdn.secure-api.org/images/RIP-Axway-Amplify-Titanium.png" alt="RIP Axway Amplify Titanium (2010 - 2022)" width="80%" />
	</p>
</a>	
<p align="center">
	<a href="https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de">
			🪦 &nbsp; RIP Axway Amplify Titanium (2010 - 2022)
	</a>
</p>
<p align="center">
	<a href="https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de">
			🪦 &nbsp; RIP Axway Amplify Cloud Services (2012 - 2022)
	</a>
</p>

<hr>
<a href="https://brenton.house/saying-goodbye-to-axway-amplify-titanium-31a44f3671de">
	<h4 align="center">
🛑 &nbsp;&nbsp; All products affected by the announcements will not be supported by Axway effective their EOL dates in 2022.
</h4>

<h4 align="center">
Some Open-Source versions of Axway products will live on after End-of-Life (EOL) Axway Amplify product announcements.  However, some products are closed-source and will NOT continue after the shut down in 2022.  
	</h4>
</a>
<p>&nbsp;</p>

> 👉 &nbsp;&nbsp; Stay tuned for more info as plans are being made to save the Titanium project and move it under the control of a independent group of developers.

<p>&nbsp;</p>
<hr>

## API FAQ:

* [API Best Practices](https://brenton.house)
* [What is API Security?](https://brenton.house/what-is-api-security-5ca8117d4911)
* [Top API Trends for 2022](https://brenton.house/top-10-api-integration-trends-for-2022-49b05f2ef299)
* [What is a Frankenstein API?](https://brenton.house/what-is-a-frankenstein-api-4d6e59fca6)
* [What is a Zombie API?](https://brenton.house/what-is-a-zombie-api-6e5427c39b6a)
* [API Developer Experience](https://brenton.house/keys-to-winning-with-an-awesome-api-developer-experience-62dd2fa668f4)
* [API Cybersecurity 101](https://brenton.house/what-is-api-security-5ca8117d4911)
* [YouTube API Videos](https://youtube.com/brentonhouse)
* [YouTube API Shorts Videos](https://youtube.com/apishorts)



<p>&nbsp;</p>
<hr>

<p>&nbsp;</p>
<p>&nbsp;</p>

[//]: # (header-end)

# @titanium/scandit

[![@titanium/scandit](https://img.shields.io/npm/v/@titanium/scandit.png)](https://www.npmjs.com/package/@titanium/scandit)
[![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=brentonhouse/titanium-scandit)](https://dependabot.com)


> [Scandit SDK Barcode Scanner Module](https://docs.scandit.com/stable/titanium/index.html) for Titanium Native Mobile Apps


* [📝 Description](#-description)
* [🚀 Getting Started](#-getting-started)
	* [Obtain SDK API Key](#obtain-sdk-api-key)
	* [Using barcode scanner](#using-barcode-scanner)
* [✨Features](#features)
* [📚Learn More](#learn-more)
* [📣 Feedback](#-feedback)
* [©️ Legal](#️-legal)


## 📝 Description

This is a repackaging of the compiled iOS and Android modules for the [Scandit SDK for Titanium](https://docs.scandit.com/stable/titanium/index.html) to allow for installation via npm.

## 🚀 Getting Started

1. Install `@titanium/scandit` in root of project

```
npm install @titanium/scandit
```

### Obtain SDK API Key

You need to log into your Scandit Account (or create a new account) to obtain your Scandit API Key to use with this module.

https://ssl.scandit.com/account/sdk


### Using barcode scanner

```javascript
const scanditsdk = require('@titanium/scandit');
scanditsdk.appKey = 'YOUR_SCANDIT_API_KEY';

// Only after setting the app key, instantiate the Scandit SDK Barcode Picker view
scanner = scanditsdk.createView({
	top:    0,
	width:  Ti.UI.FILL,
	height: Ti.UI.FILL,
});

// Before calling any other functions on the picker you have to call init()
scanner.init();

/*************************
 * Set various features
 ************************/

scanner.showSearchBar(false);
scanner.setVibrateEnabled(true);
scanner.setBeepEnabled(true);
scanner.setTorchEnabled(true);

// add a tool bar at the bottom of the scan view with a cancel button (iphone/ipad only)
scanner.showToolBar(false);
scanner.setViewfinderSize(0.7, 0.7, 0.6, 0.4);

// Shows/hides viewfinder rectangle and highlighted barcode location in the scan screen UI. [default is true]
scanner.drawViewfinder(true);
// scanner.setViewfinderColor( red, green, blue ); // enterprise-only fea
// setViewfinderDecodedColor( red, green, blue);

// Reduces the area in which barcodes are detected and decoded.
// Must be used in combination with setScanningHotSpot
// If this method is not enabled, barcodes in the full camera preview are detected and decoded.
scanner.restrictActiveScanningArea(true);

	// Changes the location of the spot where the barcode decoder actively scans for barcodes.
// X and Y can be between 0 and 1, where 0/0 corresponds to the top left corner and 1/1 to the bottom right corner.
// The default hotspot is set to 0.5/0.5
scanner.setScanningHotSpot(0.5, 0.5);

// Forces the barcode scanner to always run the 2D decoders (QR,Datamatrix, etc.),
// even when the 2D detector did not detect the presence of a 2D code.
// This slows down the overall scanning speed, but can be useful when your application only tries to read QR codes
scanner.force2dRecognition(false);
scanner.setEan13AndUpc12Enabled(true);
scanner.setEan8Enabled(true);
scanner.set1DScanningEnabled(true);
scanner.setUpceEnabled(true);
scanner.setCode39Enabled(true);
scanner.setCode128Enabled(true);
scanner.setQrEnabled(true);
scanner.set2DScanningEnabled(true);
scanner.setDataMatrixEnabled(true); // enterprise-only feature
scanner.setMaxiCodeEnabled(true); // enterprise-only feature
scanner.setItfEnabled(true); // enterprise-only feature
scanner.setCode25Enabled(true); // enterprise-only feature
scanner.setGS1DataBarLimitedEnabled(true); // enterprise-only feature
scanner.setGS1DataBarExpandedEnabled(true); // enterprise-only feature
scanner.setGS1DataBarEnabled(true); // enterprise-only feature
scanner.setPdf417Enabled(true); // enterprise-only feature
scanner.setRM4SCCEnabled(true); // enterprise-only feature
scanner.setKIXEnabled(true); // enterprise-only
scanner.setMicroPdf417Enabled(true); // enterprise-only
scanner.setCode128Enabled(true); // enterprise-only
scanner.setCode11Enabled(true); // enterprise-only
scanner.setCode93Enabled(true); // enterprise-only
scanner.setCode39Enabled(true); // enterprise-only

// Set callback functions for when scanning succeeds and for when the
// scanning is canceled. This callback is called on the scan engine's
// thread to allow you to synchronously call stopScanning or
// pauseScanning. Any UI specific calls from within this function
// have to be issued through setTimeout to switch to the UI thread
// first.
scanner.setSuccessCallback(e => {
	console.error('scanner.openScanner.setSuccessCallback: entering');
	scanner.stopScanning();

	const upcNumber = e.barcode;
	const upcType = e.symbology;

}


```

## ✨Features

iOS: `com.mirasense.scanditsdk 5.13.1`
Android: `com.mirasense.scanditsdk 5.13.1`


## 📚Learn More

- [Scandit Homepage](https://scandit.com)
- [Scandit Titanium Documentation](https://docs.scandit.com/stable/titanium/index.html)
- [Scandit Titanium Samples](https://github.com/Scandit/barcodescanner-sdk-titanium-samples)

## 📣 Feedback

Have an idea or a comment?  [Join in the conversation here](https://github.com/brentonhouse/titanium-scandit/issues)! 

## ©️ Legal

**Modules licensed by Scandit AG**   
Copyright (c) 2018 by Scandit AG

Usage of this module is subject to the Terms of the Service Agreement with Scandit AG (available at http://www.scandit.com/pricing) 
as well as your Terms of Service agreement with Appcelerator, Inc.  


Alloy is developed by Appcelerator and the community and is Copyright © 2012-Present by Appcelerator, Inc. All Rights Reserved.

Alloy is made available under the Apache Public License, version 2. See their license file for more information.

Appcelerator is a registered trademark of Appcelerator, Inc. Titanium is a registered trademark of Appcelerator, Inc. Please see the LEGAL information about using trademarks, privacy policy, terms of usage and other legal information at http://www.appcelerator.com/legal.
