Skip to content

Commit

Permalink
Imported code for v2.2 of the app
Browse files Browse the repository at this point in the history
  • Loading branch information
scaryghost committed Sep 8, 2014
1 parent 2bac129 commit a08bfe2
Show file tree
Hide file tree
Showing 17 changed files with 881 additions and 266 deletions.
6 changes: 3 additions & 3 deletions AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mbientlab.metawear.app"
android:versionCode="1"
android:versionName="1.0" >
android:versionCode="4"
android:versionName="2.2" >

<uses-sdk
android:minSdkVersion="18"
Expand All @@ -16,7 +16,7 @@

<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:icon="@drawable/metawear_logo"
android:label="@string/app_name"
android:theme="@style/AppTheme" >

Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# MetaWear Android App #

## About ##
This app provides an example of how to use the MetaWear API. It uses the sample BluetoothLeGatt app on the Android developer page as a reference.
This app provides an example of how to use the MetaWear API. It uses the sample BluetoothLeGatt app on the Android developer page and the Nordic nRF Toolbox app as references.

[http://developer.android.com/samples/BluetoothLeGatt/index.html](http://developer.android.com/samples/BluetoothLeGatt/index.html)
[http://developer.android.com/samples/BluetoothLeGatt/index.html](http://developer.android.com/samples/BluetoothLeGatt/index.html)
[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.1
Current version is: 2.2

### 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/).
Expand Down
Binary file added res/drawable-hdpi/metawear_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 67 additions & 60 deletions res/layout/fragment_device_info.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,119 +29,124 @@ DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
Should you have any questions regarding your right to use this Software,
contact MbientLab Inc, at www.mbientlab.com.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/RelativeLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:orientation="vertical"
android:padding="16dp" >

<TableLayout
android:id="@+id/TableLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content" >

android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >

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

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

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

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

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

<TextView
<TextView
android:id="@+id/firmware_version"
android:layout_width="0dp"
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:layout_height="wrap_content"
android:layout_weight="1"
android:orientation="horizontal" >

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

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

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

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

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

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

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

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

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

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

<TextView
android:id="@+id/temperature"
android:layout_width="0dp"
android:layout_weight="1" />
Expand All @@ -152,24 +157,26 @@ contact MbientLab Inc, at www.mbientlab.com.
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Refresh" />

</TableRow>
</TableLayout>

<LinearLayout
android:layout_width="match_parent"
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:gravity="center_horizontal" >
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="Reset" />

<ImageButton
android:background="@drawable/ic_feature_small_bg"
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/label_dfu_button"
android:src="@drawable/ic_dfu_feature" />

</LinearLayout>
<ImageButton
android:id="@+id/imageButton1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/button2"
android:layout_centerHorizontal="true"
android:layout_marginTop="16dp"
android:background="@drawable/ic_feature_small_bg"
android:contentDescription="@string/label_dfu_button"
android:src="@drawable/ic_dfu_feature" />

</LinearLayout>
</RelativeLayout>
Loading

0 comments on commit a08bfe2

Please sign in to comment.