forked from ldeluca/Metawear-SampleAndroidApp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Imported version 1.0 of the sample app
- Loading branch information
0 parents
commit fb957d5
Showing
19 changed files
with
1,059 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
package="com.mbientlab.metawear" | ||
android:versionCode="1" | ||
android:versionName="1.0" > | ||
|
||
<uses-sdk | ||
android:minSdkVersion="18" | ||
android:targetSdkVersion="19" /> | ||
|
||
<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"/> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@drawable/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme" > | ||
<activity | ||
android:name="com.mbientlab.metawear.app.BLEScannerActivity" | ||
android:label="@string/app_name" > | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
|
||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
<activity | ||
android:name="BleDeviceController"> | ||
</activity> | ||
<service android:name="com.mbientlab.metawear.api.MetaWearBLEService" /> | ||
</application> | ||
|
||
</manifest> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# This file is automatically generated by Android Tools. | ||
# Do not modify this file -- YOUR CHANGES WILL BE ERASED! | ||
# | ||
# This file must be checked in Version Control Systems. | ||
# | ||
# To customize properties used by the Ant build system edit | ||
# "ant.properties", and override values to adapt the script to your | ||
# project structure. | ||
# | ||
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): | ||
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt | ||
|
||
# Project target. | ||
target=android-19 | ||
android.library.reference.1=../MetaWearAPI |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
<!-- | ||
Copyright 2014 MbientLab Inc. All rights reserved. | ||
IMPORTANT: Your use of this Software is limited to those specific rights | ||
granted under the terms of a software license agreement between the user who | ||
downloaded the software, his/her employer (which must be your employer) and | ||
MbientLab Inc, (the "License"). You may not use this Software unless you | ||
agree to abide by the terms of the License which can be found at | ||
www.mbientlab.com/terms . The License limits your use, and you acknowledge, | ||
that the Software may not be modified, copied or distributed and can be used | ||
solely and exclusively in conjunction with a MbientLab Inc, product. Other | ||
than for the foregoing purpose, you may not use, reproduce, copy, prepare | ||
derivative works of, modify, distribute, perform, display or sell this | ||
Software and/or its documentation for any purpose. | ||
YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE | ||
PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, | ||
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, | ||
NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL | ||
MBIENTLAB OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, | ||
STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE | ||
THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED | ||
TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST | ||
PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, | ||
SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY | ||
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" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/LinearLayout1" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" > | ||
|
||
<TableLayout | ||
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="2" > | ||
<TextView | ||
android:layout_width="0dp" | ||
android:layout_weight="1" | ||
android:text="@string/label_manufacturer" > | ||
</TextView> | ||
|
||
<TextView | ||
android:id="@+id/manufacturer_name" | ||
android:layout_width="0dp" | ||
android:layout_weight="1" > | ||
|
||
</TextView> | ||
</TableRow> | ||
|
||
<TableRow | ||
android:id="@+id/tableRow2" | ||
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="1" | ||
android:text="@string/label_firmware_version" > | ||
|
||
</TextView> | ||
<TextView | ||
android:id="@+id/firmware_version" | ||
android:layout_width="0dp" | ||
android:layout_weight="1" > | ||
</TextView> | ||
</TableRow> | ||
|
||
<TableRow | ||
android:id="@+id/tableRow3" | ||
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="1" | ||
android:text="@string/label_hardware_version" > | ||
|
||
</TextView> | ||
<TextView | ||
android:id="@+id/hardware_version" | ||
android:layout_width="0dp" | ||
android:layout_weight="1" > | ||
</TextView> | ||
</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_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" > | ||
</TextView> | ||
</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_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" > | ||
</TextView> | ||
</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_width="0dp" | ||
android:layout_weight="1" | ||
android:text="@string/label_accelerometer_data" > | ||
|
||
</TextView> | ||
<TextView | ||
android:id="@+id/accelerometer_data" | ||
android:layout_width="0dp" | ||
android:layout_weight="1" > | ||
</TextView> | ||
</TableRow> | ||
|
||
<TableRow | ||
android:id="@+id/tableRow7" | ||
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="1" | ||
android:text="@string/label_switch" > | ||
|
||
</TextView> | ||
<TextView | ||
android:id="@+id/mechanical_switch" | ||
android:layout_width="0dp" | ||
android:layout_weight="1" > | ||
</TextView> | ||
</TableRow> | ||
</TableLayout> | ||
|
||
<TableLayout | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" > | ||
|
||
<TableRow | ||
android:id="@+id/tableRow10" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
android:layout_weight="1" > | ||
|
||
<SeekBar | ||
android:id="@+id/ledRedValue" | ||
android:layout_width="0dp" | ||
android:layout_weight="0.65" /> | ||
|
||
<TextView | ||
android:layout_width="0dp" | ||
android:layout_weight="0.35" | ||
android:text="@string/label_led_red" > | ||
|
||
</TextView> | ||
</TableRow> | ||
|
||
<TableRow | ||
android:id="@+id/tableRow11" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
android:layout_weight="1" > | ||
|
||
<SeekBar | ||
android:id="@+id/ledGreenValue" | ||
android:layout_width="0dp" | ||
android:layout_weight="0.65" /> | ||
<TextView | ||
android:layout_width="0dp" | ||
android:layout_weight="0.35" | ||
android:text="@string/label_led_green" > | ||
</TextView> | ||
</TableRow> | ||
|
||
<TableRow | ||
android:id="@+id/tableRow12" | ||
android:layout_width="fill_parent" | ||
android:layout_height="wrap_content" | ||
android:orientation="horizontal" | ||
android:layout_weight="1" > | ||
|
||
<SeekBar | ||
android:id="@+id/ledBlueValue" | ||
android:layout_width="0dp" | ||
android:layout_weight="0.65" /> | ||
<TextView | ||
android:layout_width="0dp" | ||
android:layout_weight="0.35" | ||
android:text="@string/label_led_blue" > | ||
</TextView> | ||
</TableRow> | ||
</TableLayout> | ||
|
||
<TextView | ||
android:id="@+id/textView1" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/label_commands" | ||
android:textAppearance="?android:attr/textAppearanceLarge" /> | ||
|
||
<ListView | ||
android:id="@+id/listView1" | ||
android:layout_width="match_parent" | ||
android:layout_height="wrap_content" > | ||
</ListView> | ||
|
||
</LinearLayout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<!-- | ||
Copyright 2014 MbientLab Inc. All rights reserved. | ||
IMPORTANT: Your use of this Software is limited to those specific rights | ||
granted under the terms of a software license agreement between the user who | ||
downloaded the software, his/her employer (which must be your employer) and | ||
MbientLab Inc, (the "License"). You may not use this Software unless you | ||
agree to abide by the terms of the License which can be found at | ||
www.mbientlab.com/terms . The License limits your use, and you acknowledge, | ||
that the Software may not be modified, copied or distributed and can be used | ||
solely and exclusively in conjunction with a MbientLab Inc, product. Other | ||
than for the foregoing purpose, you may not use, reproduce, copy, prepare | ||
derivative works of, modify, distribute, perform, display or sell this | ||
Software and/or its documentation for any purpose. | ||
YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE | ||
PROVIDED “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, | ||
INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE, | ||
NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL | ||
MBIENTLAB OR ITS LICENSORS BE LIABLE OR OBLIGATED UNDER CONTRACT, NEGLIGENCE, | ||
STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER LEGAL EQUITABLE | ||
THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES INCLUDING BUT NOT LIMITED | ||
TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE OR CONSEQUENTIAL DAMAGES, LOST | ||
PROFITS OR LOST DATA, COST OF PROCUREMENT OF SUBSTITUTE GOODS, TECHNOLOGY, | ||
SERVICES, OR ANY CLAIMS BY THIRD PARTIES (INCLUDING BUT NOT LIMITED TO ANY | ||
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" | ||
xmlns:tools="http://schemas.android.com/tools" | ||
android:id="@+id/LinearLayout1" | ||
android:layout_width="match_parent" | ||
android:layout_height="match_parent" | ||
android:orientation="vertical" | ||
tools:context="${packageName}.${activityClass}" > | ||
|
||
<ListView | ||
android:id="@+id/android:list" | ||
android:layout_height="wrap_content" | ||
android:layout_width="match_parent"> | ||
</ListView> | ||
</LinearLayout> |
Oops, something went wrong.