Skip to content

Latest commit

 

History

History
125 lines (94 loc) · 8.02 KB

README.md

File metadata and controls

125 lines (94 loc) · 8.02 KB

M-Trust SDKs: Integrating with our Hardware Devices

Documentation Status

The M-Trust SDKs allow you to integrate our hardware tightly within your mobile applications. The SDKs are available for the SEC-Reader, IMP-Reader.

The SDKs allow you to quickly integrate an identification and verification step into your application.

All pub.dev packages included in the repository.

mtrust_urp_core

pub package pub points

mtrust_urp_ui

pub package pub points

mtrust_urp_ble_strategy

pub package pub points

mtrust_urp_virtual_strategy

pub package pub points

Cross-Platform Compatibility

The SDKs are optimized for cross-platform mobile development, with support for iOS and Android devices. Built using the Flutter framework, they provide a unified development experience across platforms, simplifying app development and maintenance.

While we recommend to implement your application using Flutter, the SDKs can also be used in native iOS and Android applications by following the native embedding guides provided by Flutter. Depending on the connection strategies you want to enable please make sure to configure the correct permissions:

SEC Kit IMP Kit Barcode Kit
Integrate with
SEC-Readers
Integrate with
IMP-Readers
Read barcodes on
iOS and Android
pub package
pub points
pub package
pub points
pub package
pub points

Installation

Android

In android/app/src/main/AndroidManifest.xml, add the following permissions:

<manifest ...>
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <application>
    ...
</manifest>

iOS

In ios/Runner/Info.plist, add the following keys for Bluetooth and location permissions:

    <dict>
        ...
	    <key>NSBluetoothAlwaysUsageDescription</key>
	    <string>Need BLE permission</string>
	    <key>NSBluetoothPeripheralUsageDescription</key>
	    <string>Need BLE permission</string>
	    <key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
	    <string>Need Location permission</string>
	    <key>NSLocationAlwaysUsageDescription</key>
	    <string>Need Location permission</string>
	    <key>NSLocationWhenInUseUsageDescription</key>
	    <string>Need Location permission</string>

USB Serial

MacOS

In macos/Runner/[DebugProfile/Release].entitlements, add:

<dict>
    ...
    <key>com.apple.security.device.serial</key>
    <true/>
</dict>

Android

In android/app/src/main/AndroidManifest.xml, add the following for USB host support:

    <manifest ...>
    <uses-feature android:name="android.hardware.usb.host"
                  android:required="true"/>

    <application>
        <activity>
            ...
            <intent-filter>
                <action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
            </intent-filter>
            <meta-data android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" android:resource="@xml/device_filter" />
        </activity>
    </application>

Add a file at android/app/src/main/res/xml/device_filter.xml with the following content:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <usb-device vendor-id="1155" product-id="22336" />
    </resources>

Contributing

We welcome contributions! Please fork the repository and submit a pull request with your changes. Ensure that your code adheres to our coding standards and includes appropriate tests.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.