Skip to content

Commit

Permalink
Imported v2.3 of the app
Browse files Browse the repository at this point in the history
  • Loading branch information
scaryghost committed Oct 13, 2014
1 parent a08bfe2 commit 86c8123
Show file tree
Hide file tree
Showing 15 changed files with 897 additions and 142 deletions.
10 changes: 10 additions & 0 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,16 @@
android:label="@string/app_name"
android:theme="@style/AppTheme" >

<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="com.mbientlab.metawear.app.fileprovider"
android:grantUriPermissions="true"
android:exported="false">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/filepaths" />
</provider>

<service android:name="com.mbientlab.metawear.api.MetaWearBleService" />
<service
android:name="no.nordicsemi.android.nrftoolbox.dfu.DfuService"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ This app provides an example of how to use the MetaWear API. It uses the sample
[https://play.google.com/store/apps/details?id=no.nordicsemi.android.nrftoolbox&hl=en](https://play.google.com/store/apps/details?id=no.nordicsemi.android.nrftoolbox&hl=en)

### Version ###
Current version is: 2.2
Current version is: 2.3

### Build ###
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.
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/GraphView-3.1.3.jar
Binary file not shown.
Binary file removed libs/androidplot-core-0.6.2-SNAPSHOT.jar
Binary file not shown.
194 changes: 178 additions & 16 deletions res/layout/fragment_accelerometer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,39 +36,201 @@ contact MbientLab Inc, at www.mbientlab.com.
android:orientation="vertical"
android:padding="16dp" >

<com.androidplot.xy.XYPlot
android:id="@+id/aprHistoryPlot"
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/label_tap_detection" />

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

<CheckBox
android:id="@+id/checkBox1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="@string/label_enable" />

</RelativeLayout>

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

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/label_shake_detection" />

<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

<CheckBox
android:id="@+id/checkBox2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="@string/label_enable" />

</RelativeLayout>

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

<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/label_orientation_detection" />

<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

<CheckBox
android:id="@+id/checkBox3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="@string/label_enable" />

</RelativeLayout>

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

<TextView
android:id="@+id/textView7"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:text="@string/label_movement_detection" />

<TextView
android:id="@+id/textView8"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

<CheckBox
android:id="@+id/checkBox4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="@string/label_enable" />

</RelativeLayout>

<View
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_height="3dp"
android:background="@android:color/darker_gray" />

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

<Button
android:id="@+id/button1"
<TextView
android:id="@+id/textView9"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_accelerometer_data_record" />
android:text="@string/label_data_sampling" />

<CheckBox
android:id="@+id/checkBox5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:text="@string/label_enable" />

<TextView
android:id="@+id/textView10"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

</RelativeLayout>

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" >

<Button
android:id="@+id/button2"
android:id="@+id/button1"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_accelerometer_data_plot" />

<Button
android:id="@+id/button3"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/button1"
android:text="@string/label_accelerometer_data_email" />

</RelativeLayout>

<View
android:layout_width="fill_parent"
android:layout_height="3dp"
android:background="@android:color/darker_gray" />

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center" >

<ToggleButton
android:id="@+id/toggleButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOff="@string/action_start"
android:textOn="@string/action_stop" />

<Button
android:id="@+id/button2"
style="?android:attr/buttonStyleSmall"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@+id/toggleButton1"
android:text="@string/action_settings" />

</LinearLayout>
</RelativeLayout>

</LinearLayout>
123 changes: 123 additions & 0 deletions res/layout/fragment_accelerometer_settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:padding="16dp" >

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

<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_tap_type" />

<Spinner
android:id="@+id/spinner1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />

</RelativeLayout>

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

<TextView
android:id="@+id/textView2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_tap_axis" />

<Spinner
android:id="@+id/spinner2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />

</RelativeLayout>

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

<TextView
android:id="@+id/textView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_shake_axis" />

<Spinner
android:id="@+id/spinner3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />

</RelativeLayout>

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

<TextView
android:id="@+id/textView6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_movement_type" />

<Spinner
android:id="@+id/spinner6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />

</RelativeLayout>


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

<TextView
android:id="@+id/textView4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_data_range" />

<Spinner
android:id="@+id/spinner4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />

</RelativeLayout>

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

<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/label_sampling_rate" />

<Spinner
android:id="@+id/spinner5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true" />

</RelativeLayout>

</LinearLayout>
8 changes: 8 additions & 0 deletions res/layout/fragment_data_plot.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/data_plot"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >

</LinearLayout>
Loading

0 comments on commit 86c8123

Please sign in to comment.