QS DAQFlex Android (1)
QS DAQFlex Android (1)
QS DAQFlex Android (1)
with
DAQFlex for Android™
Software Framework for Developing Apps for Android Tablets
2
Running a DAQFlex for Android Example Project
3
Guidelines for developing a DAQFlex for Android project
This folder contains the file device_filter.xml, which the Android device uses to determine which USB
devices can be used by the application. An example file provides support for the USB-7202 and USB-7204 is
shown in Figure 3
Acquiring Permission
The Android API requires permission for every USB device. To acquire permission for the USB device, call the
DaqDevice requestPermission() method to open the Android USB Permission dialog box. The resulting
broadcast is handled in the standard way for USB devices on Android.
Refer to the example in the DeviceSelector class of the ExampleShared project.
4
Sending a Message
During the normal Android activity lifecycle, the activity may be destroyed any time after the onPause()
callback. If you created the DaqDevice object inside of the activity, the DaqDevice object is also destroyed.
Make sure to call the close() method during the activity onPause() method.
Managing the activity lifecycle is particularly important when running scan operations. Because the
DaqDevice object may get destroyed by the activity, stop any active scan operations before calling the
DaqDevice close() method.
If a scan must continue while the application is paused, start an Android Service to hold the DaqDevice object
and to keep it open in the background. Failure to do so will result in a buffer overrun and data loss.
Sending a Message
After the device has permission and is opened, you can start sending messages to the device. Call the
DAQDevice sendMessage() method. The sendMessage() method accepts a string command to send to the
device.
For documentation on the DAQFlex command format, refer to the DAQFlex Software Help for the desktop API
at www.mccdaq.com/pdfs/manuals/DAQFlex Software.pdf and the Supported Messages section in this
document.
Supported Messages
DAQFlex for Android supports the following messages. Refer to the DAQFlex Software Help for the desktop
API at www.mccdaq.com/pdfs/manuals/DAQFlex Software.pdf for more detailed information on these
messages.
If a message from subsequent DAQFlex releases is not in the following table, or if a supported message returns
an unknown status, that message may or may not function correctly.
Component Properties
FLASHLED, FPGACFG, FPGAV, FWV, ID, MFGCAL, MFGSER, RESET, STATUS/ISO,
DEV
TEMP
CAL, CHMODE, CJC, DATARATE, OFFSET, RANGE, RES, SCALE, SENSOR, SLOPE,
AI
STATUS, VALUE*
BURSTMODE, CAL, COUNT, HIGHCHAN, LOWCHAN, RANGE, RATE, RESET,
AISCAN*
SAMPLES, SCALE, START, STATUS, STOP, XFRMODE
AO OFFSET, RANGE, REG, RES, SCALE, SLOPE, UPDATE, VALUE
CTR START, STOP, VALUE
DIO DIR, LATCH, VALUE
TMR DELAY, DUTYCYCLE, IDLESTATE, PERIOD, PULSECOUNT, START, STOP
*Temperature channels are not currently supported during an AISCAN. Temperature channels can be read with
the single-point AI:VALUE message.
5
Where to Find More Information
Additional information about DAQFlex software is available on our website at www.mccdaq.com. You can also
contact Measurement Computing Corporation by phone, fax, or email with specific questions.
Knowledgebase: kb.mccdaq.com
Phone: 508-946-5100 and follow the instructions for reaching Tech Support.
Fax: 508-946-9500 to the attention of Tech Support
Email: techsupport@mccdaq.com