Skip to content

Commit

Permalink
Imported version 2.1 of the app
Browse files Browse the repository at this point in the history
  • Loading branch information
scaryghost committed Aug 16, 2014
1 parent 2886563 commit 2bac129
Show file tree
Hide file tree
Showing 15 changed files with 358 additions and 341 deletions.
2 changes: 2 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
<uses-feature android:name="android.hardware.bluetooth_le" android:required="true"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_INTERNAL_STORAGE" />

<application
android:allowBackup="true"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ This app provides an example of how to use the MetaWear API. It uses the sample
[http://developer.android.com/samples/BluetoothLeGatt/index.html](http://developer.android.com/samples/BluetoothLeGatt/index.html)

### Version ###
Current version is: 1.0
Current version is: 2.1

### Build ###
The API was created with Android Developer Tools v22.6.2-1085508 and is targeted to the Android 4.4.2 (API 19) SDK with Android 4.3 (API 18) as the minimum required SDK . To build the project, you will need to download the MetaWear API and configure the example app to include the API in the build path. More information on configuring the build is available in the "Getting Started" guide, available on the MbientLab website: [https://mbientlab.com/docs/](https://mbientlab.com/docs/).
The API was created with Android Developer Tools v22.6.2-1085508. It is targeted for Android 4.4.2 (API 19) SDK with Android 4.3 (API 18) as the minimum required SDK and requires a JDK compiler compliance level of 1.7. To build the project, you will need to download the MetaWear API and configure the example app to include the API in the build path. More information on configuring the build is available in the "Getting Started" guide, available on the MbientLab website: [https://mbientlab.com/docs/](https://mbientlab.com/docs/).

By default, the app is configured to refer to the MetaWear API Eclipse project. You may change it to link to the jar instead if you do not plan on modifying the API code.
Binary file added libs/androidplot-core-0.6.2-SNAPSHOT.jar
Binary file not shown.
7 changes: 7 additions & 0 deletions res/layout/activity_feature_dfu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@
android:layout_height="wrap_content"
android:onClick="onSelectFileClicked"
android:text="@string/dfu_action_select_file" />

<Button
android:id="@+id/action_update_latest"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:onClick="onUpdateLatestClicked"
android:text="@string/dfu_action_update_latest" />

<ImageView
android:layout_width="wrap_content"
Expand Down
123 changes: 32 additions & 91 deletions res/layout/fragment_accelerometer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,99 +35,40 @@ contact MbientLab Inc, at www.mbientlab.com.
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp" >

<TableLayout

<com.androidplot.xy.XYPlot
android:id="@+id/aprHistoryPlot"
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:layout_marginTop="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
title="Axis Data"
/>

<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TableRow
android:id="@+id/tableRow1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:weightSum="3" >

<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:text="@string/label_accelerometer_motion" >

</TextView>

<TextView
android:id="@+id/motion_data"
android:layout_width="0dp"
android:layout_weight="1" />

<Switch
android:id="@+id/switch1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:enabled="true" />

</TableRow>

<TableRow
android:id="@+id/tableRow2"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:weightSum="3" >

<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:text="@string/label_accelerometer_freefall" >

</TextView>

<TextView
android:id="@+id/freefall_state"
android:layout_width="0dp"
android:layout_weight="1" >

</TextView>

<Switch
android:id="@+id/switch2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />

</TableRow>

<TableRow
android:id="@+id/tableRow3"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1"
android:weightSum="3" >

<TextView
android:layout_width="0dp"
android:layout_weight="1"
android:text="@string/label_accelerometer_orientation" >

</TextView>

<TextView
android:id="@+id/orientation"
android:layout_width="0dp"
android:layout_weight="1" >

</TextView>

<Switch
android:id="@+id/switch3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />

</TableRow>
</TableLayout>
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_accelerometer_data_record" />

<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_accelerometer_data_plot" />

<Button
android:id="@+id/button3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_accelerometer_data_email" />

</LinearLayout>

</LinearLayout>
168 changes: 20 additions & 148 deletions res/layout/fragment_led.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,17 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >
android:weightSum="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:layout_weight="0.65"
android:text="@string/label_led_color_channel" />

<Spinner
android:id="@+id/spinner1"
android:layout_weight="0.35"
android:max="31"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

Expand All @@ -32,22 +34,19 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >
android:weightSum="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_on_intensity" />
android:text="@string/label_led_high_intensity" />

<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" >

<requestFocus />
</EditText>
<SeekBar
android:id="@+id/seekBar1"
android:layout_weight="0.65"
android:max="31"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</TableRow>

Expand All @@ -56,147 +55,20 @@
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >
android:weightSum="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_off_intensity" />
android:text="@string/label_led_low_intensity" />

<EditText
android:id="@+id/editText2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" />
<SeekBar
android:id="@+id/seekBar2"
android:layout_weight="0.65"
android:layout_width="match_parent"
android:layout_height="wrap_content" />

</TableRow>

<TableRow
android:id="@+id/tableRow12"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_pulse_rise" />

<EditText
android:id="@+id/editText3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" />

</TableRow>

<TableRow
android:id="@+id/tableRow13"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_pulse_on" />

<EditText
android:id="@+id/editText4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" />

</TableRow>

<TableRow
android:id="@+id/tableRow14"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_pulse_fall" />

<EditText
android:id="@+id/editText5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" />

</TableRow>

<TableRow
android:id="@+id/tableRow15"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_pulse_period" />

<EditText
android:id="@+id/editText6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" />

</TableRow>

<TableRow
android:id="@+id/tableRow16"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_pulse_offset" />

<EditText
android:id="@+id/editText7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" />

</TableRow>

<TableRow
android:id="@+id/tableRow17"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_weight="1" >

<TextView
android:layout_width="0dp"
android:layout_weight="0.35"
android:text="@string/label_led_pulse_repeat" />

<EditText
android:id="@+id/editText8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="number" />

</TableRow>
</TableLayout>

<LinearLayout
Expand Down Expand Up @@ -227,7 +99,7 @@
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
android:text="Save" />

</LinearLayout>

Expand Down
Loading

0 comments on commit 2bac129

Please sign in to comment.