2 - How to Set Up the MTSCRA Library for Projects
aDynamo, uDynamo, Dynamag, DynaMAX, eDynamo, BulleT| Secure Card Reader Authenticator | Programmer’s Reference (Android)
Page 9 of 42 (
D99875728-31
)
2
How to Set Up the MTSCRA Library for Projects
To add the MTSCRA library to a custom software project in the Eclipse development environment,
follow these steps:
1)
Create or open your custom software project in Eclipse.
2)
Copy the following JAR file to the
libs
subfolder of your software project:
mtscra.jar
3)
Ensure your project settings are set up correctly.
4)
Clean, build, and run your custom software project to make sure the library imported correctly.
5)
In your custom software, create an instance of
MTSCRA
. For examples, see the source code included
with the MagTek SCRA Demo project and/or the Code Examples section in this document.
6)
Depending on the connection types supported, the project should include the uses-features, uses-
permissions and services as specified in the table below in its AndroidManifest.xml file. For
examples, see the AndroidManifest.xml included with the MagTek SCRA Demo project
Connection
Type
AndroidManifest
Audio
<
uses-permission
android:name
=
"android.permission.RECORD_AUDIO"
/>
<
uses-permission
android:name
=
"android.permission.MODIFY_AUDIO_SETTINGS"
/>
<
service
android:name
=
"com.magtek.mobile.android.mtlib.MTAudioService"
android:enabled
=
"true"
/>
BLE
BLEEMV
<
uses-feature
android:name
=
"android.hardware.bluetooth_le"
/>
<
uses-permission
android:name
=
"android.permission.BLUETOOTH"
/>
<uses-permission
android:name
=
"android.permission.BLUETOOTH_ADMIN"
/>
<
service
android:name
=
"com.magtek.mobile.android.mtlib.MTBLEService"
android:enabled
=
"true"
/>
Bluetooth
<
uses-permission
android:name
=
"android.permission.BLUETOOTH"
/>
<uses-permission
android:name
=
"android.permission.BLUETOOTH_ADMIN"
/>
<
service
android:name
=
"com.magtek.mobile.android.mtlib.MTBTHService"
android:enabled
=
"true"
/>
USB
<
uses-feature
android:name
=
"android.hardware.usb.host"
/>
<
service
android:name
=
"com.magtek.mobile.android.mtlib.MTUSBService"
android:enabled
=
"true"
/>