Implementation
import 'package:qitech_device_scan/qitech_device_scan.dart';
final _qitechDeviceScanPlugin = QitechDeviceScan();
final result = await _qitechDeviceScanPlugin.startDeviceScan(
mobileToken: '<MOBILE_TOKEN_SENT_BY_QITECH>',
environment: CaaSEnvironment.sandbox,
sessionId: '<SESSION_ID>',
eventType: '<EVENT_TYPE>',
eventId: '<EVENT_ID>',
documentNumber: '<USER_DOCUMENT_NUMBER>'
);
print('QiTech Device Scan result: ' + result);
Flutter Setup
To use the device scan plugin, the following steps are required:
Installation
First, run the following command to install the plugin:
flutter pub add qitech_device_scan
The command should install the latest version, which can be checked in your pubspec.yaml file:
dependencies:
qitech_device_scan: ^0.0.1
Import
Now, just import the package to start using it:
import 'package:qitech_device_scan/qitech_device_scan.dart';
Android Setup
Add the Qi Tech Android repository reference in your build.gradle file:
allprojects {
repositories {
maven { url 'https://sdks.zaig.com.br/' }
...
}
}
Initialize the AdMob service by adding the following code to your AndroidManifest.xml:
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="<ADMOB_APP_ID>"/>
If you do not have an ADMOB_APP_ID, contact suporte.caas@qitech.com.br.
iOS Setup
Add the Qi Tech iOS repository reference in your Podfile:
source 'https://cdn.cocoapods.org/'
source 'https://github.com/ZaigCoding/iOS.git'
Install dependencies directly via CocoaPods:
cd ios
pod install
or via Flutter:
flutter build ios