beautypg.com

Running a daqflex for android example project, Creating a daqflex for android project – Measurement Computing DAQFlex for Android Quick Start User Manual

Page 3

background image

Running a DAQFlex for Android Example Project

3

Running a DAQFlex for Android Example Project

To compile a project on your computer and run the project on the Android tablet, select the project in the

Package Explorer

pane in Eclipse, and then select

Run»Run As»Android Application

.

The project automatically compiles and runs on the tablet. The DAQFlex project also compiles automatically
with each example project.

Only one project can run on the Android tablet at a time

Each time you compile and run a DAQFlex for Android project, it replaces the existing project on the tablet.

To run another example project, select the project in the

Package Explorer

pane in Eclipse, and then select

Run»Run As»Android Application

.

Creating a DAQFlex for Android Project

To create your own DAQFlex for Android project on your computer using the

ExampleShared

project,

complete the following steps.

1.

Click to expand the

ExampleShared

project in the

Package Explorer

pane, and double-click on

AndroidManifest.xml

to open that file

2.

Add the following

action

and

meta-data

section to the

AndroidManifest.xml

file (refer to Figure 2),

and save the file:

android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED"

android:resource="@xml/device_filter" />

Figure 2. ExampleShared AndroidManifest.xml with added action and meta-data section

3.

From one of the other example projects (except the DAQFlex project), right-click on the

res/xml/device-filter.xml

folder and select

Copy

.

4.

Right-click on the

res

folder in the

ExampleShared

project and select

Paste

from the context menu.