Skip to content

Commit

Permalink
integrate last activity for associated devices
Browse files Browse the repository at this point in the history
  • Loading branch information
bertrandmartel committed May 6, 2016
1 parent fb39c51 commit b6c9bce
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 6 deletions.
3 changes: 1 addition & 2 deletions bboxiot-tv-app/bboxiot-tv-app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/exploded-aar/fr.bouyguestelecom.dev/bboxiot-library/0.76/jars" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jacoco" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/jniLibs" />
Expand All @@ -86,6 +85,6 @@
</content>
<orderEntry type="jdk" jdkName="Android API 22 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="bboxiot-library-0.76" level="project" />
<orderEntry type="module" module-name="bboxiot-lib" exported="" />
</component>
</module>
4 changes: 2 additions & 2 deletions bboxiot-tv-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ android {
minSdkVersion 17
targetSdkVersion 22
versionCode 1
versionName "0.76"
versionName "1.01"
testApplicationId "fr.bouyguestelecom.tv.bboxiot.tvapp.test"
testInstrumentationRunner "fr.bouyguestelecom.tv.bboxiot.tvapp.test.TestRunner"
}
Expand Down Expand Up @@ -44,7 +44,7 @@ repositories {

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'fr.bouyguestelecom.dev:bboxiot-library:0.76'
compile 'fr.bouyguestelecom.dev:bboxiot-library:1.01'
//compile project(':bboxiot-lib')
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ protected void setUp() throws Exception {
BluetoothSmartDevice smartDevice1 = new BluetoothSmartDevice(address, deviceUid, deviceName, manufacturerData, time, genericDevice1, ConnectionMode.MODE_NONE);
BluetoothSmartDevice smartDevice2 = new BluetoothSmartDevice(address, deviceUid, deviceName, manufacturerData, time, genericDevice2, ConnectionMode.MODE_NONE);

connection1 = new BtAssociatedDevice(smartDevice1.getDeviceUuid(), false, false, false, smartDevice1, new HashMap<Functions, HashMap<Properties, SmartProperty>>());
connection2 = new BtAssociatedDevice(smartDevice2.getDeviceUuid(), false, false, false, smartDevice2, new HashMap<Functions, HashMap<Properties, SmartProperty>>());
connection1 = new BtAssociatedDevice(smartDevice1.getDeviceUuid(), false, false, false, smartDevice1, new HashMap<Functions, HashMap<Properties, SmartProperty>>(),0);
connection2 = new BtAssociatedDevice(smartDevice2.getDeviceUuid(), false, false, false, smartDevice2, new HashMap<Functions, HashMap<Properties, SmartProperty>>(),0);

btDeviceList.add(connection1);
btDeviceList.add(connection2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,11 @@ public void onItemClick(AdapterView<?> parent, final View view,
TextView deviceMode = (TextView) dialog.findViewById(R.id.device_mode_value);
deviceMode.setText(item.getBtSmartDevice().getDeviceMode().toString());

TextView lastActivityDate = (TextView) dialog.findViewById(R.id.last_activity_date_value);
Date lastDate = new Date(item.getBtSmartDevice().getLastActivityTime());
DateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
lastActivityDate.setText(df.format(lastDate).toString());

TextView deviceAddress = (TextView) dialog.findViewById(R.id.device_address_value);
deviceAddress.setText(item.getBtSmartDevice().getDeviceAddress());

Expand Down
18 changes: 18 additions & 0 deletions bboxiot-tv-app/src/main/res/layout/connection_item.xml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,24 @@

</TableRow>

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

<TextView
android:id="@+id/last_activity_date"
android:layout_weight="0.5"
android:width="0px"
android:text="last activity" />

<TextView
android:id="@+id/last_activity_date_value"
android:layout_weight="0.5"
android:width="0px" />

</TableRow>


<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
Expand Down

0 comments on commit b6c9bce

Please sign in to comment.