Merge pull request #1 from brarcher/staging

Improve layout and appearance of application
This commit is contained in:
brarcher
2015-12-27 17:40:18 -05:00
21 changed files with 295 additions and 158 deletions

9
.travis.yml Normal file
View File

@@ -0,0 +1,9 @@
language: android
android:
components:
- build-tools-21.1.1
- android-17
script:
- echo "Travis branch is $TRAVIS_BRANCH"
- echo "Travis branch is in pull request $TRAVIS_PULL_REQUEST"
- ant debug

View File

@@ -14,7 +14,7 @@
android:allowBackup="true" android:allowBackup="true"
android:icon="@drawable/ic_launcher" android:icon="@drawable/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
android:theme="@style/AppTheme" > android:theme="@android:style/Theme.Holo" >
<activity <activity
android:name="protect.babymonitor.StartActivity" android:name="protect.babymonitor.StartActivity"
android:label="@string/app_name" android:label="@string/app_name"

View File

@@ -1,6 +1,8 @@
# protect-baby-monitor # protect-baby-monitor
An Open Source Baby Monitor for Android An Open Source Baby Monitor for Android
[![Build Status](https://travis-ci.org/brarcher/protect-baby-monitor.svg?branch=master)](https://travis-ci.org/brarcher/protect-baby-monitor)
_Protect Baby Monitor_ allows two Android devices to act as a baby monitor. The first device, _Protect Baby Monitor_ allows two Android devices to act as a baby monitor. The first device,
left in the room with the baby, will advertise itself on the network and stream audio left in the room with the baby, will advertise itself on the network and stream audio
to a connected client. The second device, with the parent, will connect to the monitoring to a connected client. The second device, with the parent, will connect to the monitoring
@@ -28,3 +30,9 @@ including:
If there is any interest in improving this open source baby monitor, kindly submit a pull request with If there is any interest in improving this open source baby monitor, kindly submit a pull request with
proposed changed. proposed changed.
# Thanks
App icon originals from [WPZOOM](http://www.wpzoom.com/wpzoom/new-freebie-wpzoom-developer-icon-set-154-free-icons)
and formatted using [Android Asset Studio](https://romannurik.github.io/AndroidAssetStudio/index.html).

92
build.xml Normal file
View File

@@ -0,0 +1,92 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="StartActivity" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>
<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true" />
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

BIN
ic_launcher-web.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 58 KiB

14
project.properties Normal file
View File

@@ -0,0 +1,14 @@
# 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-17

BIN
res/drawable-hdpi/ic_launcher.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.5 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
res/drawable-mdpi/ic_launcher.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

BIN
res/drawable-xhdpi/ic_launcher.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
res/drawable-xxhdpi/ic_launcher.png Normal file → Executable file

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -1,7 +1,9 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
@@ -9,22 +11,30 @@
tools:context="protect.babymonitor.MonitorActivity" > tools:context="protect.babymonitor.MonitorActivity" >
<TextView <TextView
android:id="@+id/textView1" android:id="@+id/parentDeviceTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/parentDevice"
android:textSize="25sp" />
<Space
android:layout_width="match_parent"
android:layout_height="15dip" />
<TextView
android:id="@+id/selectChildDeviceTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:text="@string/selectChildDevice"
android:layout_centerHorizontal="true" android:textSize="20sp" />
android:layout_marginTop="27dp"
android:text="Select a Child Device:"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TableLayout <TableLayout
android:id="@+id/ServiceTable" android:id="@+id/ServiceTable"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_below="@+id/textView1" android:layout_weight="0.32"
android:layout_centerHorizontal="true" android:padding="10dp" >
android:layout_marginTop="47dp" >
</TableLayout> </TableLayout>
</RelativeLayout> </LinearLayout>

View File

@@ -1,70 +1,58 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:keepScreenOn="true"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin" android:paddingTop="@dimen/activity_vertical_margin"
android:keepScreenOn="true"
tools:context="protect.babymonitor.MonitorActivity" > tools:context="protect.babymonitor.MonitorActivity" >
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="124dp" >
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<TextView <TextView
android:id="@+id/textStatusTitle" android:id="@id/parentDeviceTitle"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="@dimen/activity_horizontal_margin" android:gravity="center"
android:text="Status:" android:text="@string/parentDevice"
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textSize="25sp" />
<Space <Space
android:layout_width="match_parent"
android:layout_height="15dip" />
<TextView
android:id="@+id/connectedToTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:text="@string/connectedTo"
android:textSize="20sp" />
<TextView
android:id="@+id/connectedTo"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text=""
android:textSize="20sp" />
<Space
android:layout_width="match_parent"
android:layout_height="15dip" />
<TextView
android:id="@+id/status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/status"
android:textSize="20sp" />
<TextView <TextView
android:id="@+id/textStatus" android:id="@+id/textStatus"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="Listening..." android:text=""
android:textAppearance="?android:attr/textAppearanceLarge" /> android:textSize="20sp" />
<Space </LinearLayout>
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
<TextView
android:id="@+id/connectedToTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:padding="@dimen/activity_horizontal_margin"
android:text="Connected to:"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/connectedDeviceNameTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignLeft="@+id/connectedToTextView"
android:layout_below="@+id/connectedToTextView"
android:layout_marginLeft="20dp"
android:text=" "
android:textAppearance="?android:attr/textAppearanceLarge" />
</RelativeLayout>

View File

@@ -1,7 +1,9 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
@@ -9,64 +11,46 @@
tools:context="protect.babymonitor.MonitorActivity" > tools:context="protect.babymonitor.MonitorActivity" >
<TextView <TextView
android:id="@+id/textView1" android:id="@+id/childDeviceTitle"
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentTop="true" android:gravity="center"
android:layout_centerHorizontal="true" android:text="@string/childDevice"
android:layout_marginTop="40dp" android:textSize="25sp" />
android:text="Child Device"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TableLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:layout_marginTop="124dp" >
<TableRow
android:id="@+id/TableRow01"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Space <Space
android:layout_width="match_parent"
android:layout_height="15dip" />
<TextView
android:id="@+id/serviceTitle"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
android:text="@string/serviceTitle"
android:textSize="20sp" />
<TextView <TextView
android:id="@+id/textService" android:id="@+id/textService"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:text="@string/loading"
android:textSize="20sp" /> android:textSize="20sp" />
<Space <TextView
android:id="@+id/serviceDescription"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content"
</TableRow> android:text="@string/serviceDescription" />
<TableRow
android:id="@+id/tableRow1"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<Space <Space
android:layout_width="wrap_content" android:layout_width="match_parent"
android:layout_height="wrap_content" /> android:layout_height="15dip" />
<TextView <TextView
android:id="@+id/textStatus" android:id="@+id/textStatus"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge" android:text=""
android:textSize="20sp" /> android:textSize="20sp" />
<Space </LinearLayout>
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
</TableRow>
</TableLayout>
</RelativeLayout>

View File

@@ -1,7 +1,9 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/LinearLayout1"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:orientation="vertical"
android:paddingBottom="@dimen/activity_vertical_margin" android:paddingBottom="@dimen/activity_vertical_margin"
android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin"
@@ -9,23 +11,36 @@
tools:context="protect.babymonitor.StartActivity" > tools:context="protect.babymonitor.StartActivity" >
<Button <Button
android:id="@+id/connectMonitorButton" android:id="@+id/useChildDevice"
android:layout_width="wrap_content" style="?android:attr/buttonStyleSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignLeft="@+id/startMonitorButton" android:text="@string/useAsChildDevice"
android:layout_alignRight="@+id/startMonitorButton" android:textSize="17sp" />
android:layout_below="@+id/startMonitorButton"
android:layout_marginTop="72dp" <TextView
android:text="Use as Parent Device" /> android:id="@+id/childDescription"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/childDescription"
android:textSize="14sp" />
<Space
android:layout_width="match_parent"
android:layout_height="15dip" />
<Button <Button
android:id="@+id/startMonitorButton" android:id="@+id/useParentDevice"
style="?android:attr/buttonStyleSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/useAsParentDevice"
android:textSize="17sp" />
<TextView
android:id="@+id/parentDescription"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignParentLeft="true" android:text="@string/parentDescription" />
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginTop="129dp"
android:text="Use as Child Device" />
</RelativeLayout> </LinearLayout>

View File

@@ -3,5 +3,22 @@
<string name="app_name">Protect Baby Monitor</string> <string name="app_name">Protect Baby Monitor</string>
<string name="action_settings">Settings</string> <string name="action_settings">Settings</string>
<string name="useAsParentDevice">Use as Parent Device</string>
<string name="useAsChildDevice">Use as Child Device</string>
<string name="childDescription">Device is placed with baby, and sends audio to a paired parent device</string>
<string name="parentDescription">Pairs with child device and plays received audio</string>
<string name="childDevice">Child Device</string>
<string name="serviceTitle">Service:</string>
<string name="serviceDescription">Name of the service that parent must pair to</string>
<string name="loading">Loading...</string>
<string name="stopped">Stopped</string>
<string name="streaming">Streaming...</string>
<string name="waitingForParent">Waiting for Parent...</string>
<string name="parentDevice">Parent Device</string>
<string name="selectChildDevice">Select Child Device:</string>
<string name="status">Status:</string>
<string name="connectedTo">Connected To:</string>
<string name="disconnected">Disconnected</string>
<string name="listening">Listening...</string>
</resources> </resources>

View File

@@ -4,17 +4,7 @@
Base application theme, dependent on API level. This theme is replaced Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices. by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
--> -->
<style name="AppBaseTheme" parent="android:Theme.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. --> <!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources> </resources>

View File

@@ -24,6 +24,7 @@ import android.net.nsd.NsdServiceInfo;
import android.os.Bundle; import android.os.Bundle;
import android.util.Log; import android.util.Log;
import android.view.View; import android.view.View;
import android.widget.Button;
import android.widget.TableLayout; import android.widget.TableLayout;
import android.widget.TableRow; import android.widget.TableRow;
import android.widget.TextView; import android.widget.TextView;
@@ -115,12 +116,18 @@ public class DiscoverActivity extends Activity
final TableRow row = new TableRow(DiscoverActivity.this.getApplicationContext()); final TableRow row = new TableRow(DiscoverActivity.this.getApplicationContext());
serviceTable.addView(row); serviceTable.addView(row);
final TextView serviceText = new TextView(DiscoverActivity.this.getApplicationContext()); // If there is more than one service on the network, it will
serviceText.setText(serviceInfo.getServiceName()); // have a number at the end, but will appear as the following:
row.addView(serviceText); // "ProtectBabyMonitor\\032(number)
serviceText.setTextSize(20); // Replace \\032 with a ""
final String fixedServiceName = serviceInfo.getServiceName().replace("\\\\032", " ");
serviceText.setOnClickListener(new View.OnClickListener() final Button serviceButton = new Button(DiscoverActivity.this.getApplicationContext());
serviceButton.setText(fixedServiceName);
row.addView(serviceButton);
serviceButton.setTextSize(15);
serviceButton.setOnClickListener(new View.OnClickListener()
{ {
@Override @Override
public void onClick(View v) public void onClick(View v)
@@ -129,7 +136,7 @@ public class DiscoverActivity extends Activity
Bundle b = new Bundle(); Bundle b = new Bundle();
b.putString("address", serviceInfo.getHost().getHostAddress()); b.putString("address", serviceInfo.getHost().getHostAddress());
b.putInt("port", serviceInfo.getPort()); b.putInt("port", serviceInfo.getPort());
b.putString("name", serviceInfo.getServiceName()); b.putString("name", fixedServiceName);
i.putExtras(b); i.putExtras(b);
startActivity(i); startActivity(i);
} }

View File

@@ -110,8 +110,11 @@ public class ListenActivity extends Activity
@Override @Override
public void run() public void run()
{ {
final TextView statusText = (TextView) findViewById(R.id.connectedDeviceNameTextView); final TextView connectedText = (TextView) findViewById(R.id.connectedTo);
statusText.setText(_name); connectedText.setText(_name);
final TextView statusText = (TextView) findViewById(R.id.textStatus);
statusText.setText(R.string.listening);
} }
}); });
@@ -139,8 +142,11 @@ public class ListenActivity extends Activity
@Override @Override
public void run() public void run()
{ {
final TextView connectedText = (TextView) findViewById(R.id.connectedTo);
connectedText.setText("");
final TextView statusText = (TextView) findViewById(R.id.textStatus); final TextView statusText = (TextView) findViewById(R.id.textStatus);
statusText.setText("Listening stopped"); statusText.setText(R.string.disconnected);
} }
}); });
} }

View File

@@ -53,7 +53,7 @@ public class MonitorActivity extends Activity
public void run() public void run()
{ {
final TextView statusText = (TextView) findViewById(R.id.textStatus); final TextView statusText = (TextView) findViewById(R.id.textStatus);
statusText.setText("Streaming..."); statusText.setText(R.string.streaming);
} }
}); });
@@ -94,9 +94,6 @@ public class MonitorActivity extends Activity
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_monitor); setContentView(R.layout.activity_monitor);
final TextView text = (TextView) findViewById(R.id.textStatus);
text.setText("Loading...");
try try
{ {
// Initialize a server socket on the next available port. // Initialize a server socket on the next available port.
@@ -137,7 +134,7 @@ public class MonitorActivity extends Activity
public void run() public void run()
{ {
final TextView statusText = (TextView) findViewById(R.id.textStatus); final TextView statusText = (TextView) findViewById(R.id.textStatus);
statusText.setText("Stopped"); statusText.setText(R.string.stopped);
} }
}); });
} }
@@ -216,7 +213,7 @@ public class MonitorActivity extends Activity
public void run() public void run()
{ {
final TextView statusText = (TextView) findViewById(R.id.textStatus); final TextView statusText = (TextView) findViewById(R.id.textStatus);
statusText.setText("Waiting for connection..."); statusText.setText(R.string.waitingForParent);
final TextView serviceText = (TextView) findViewById(R.id.textService); final TextView serviceText = (TextView) findViewById(R.id.textService);
serviceText.setText(serviceName); serviceText.setText(serviceName);

View File

@@ -35,7 +35,7 @@ public class StartActivity extends Activity
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
setContentView(R.layout.activity_start); setContentView(R.layout.activity_start);
final Button monitorButton = (Button) findViewById(R.id.startMonitorButton); final Button monitorButton = (Button) findViewById(R.id.useChildDevice);
monitorButton.setOnClickListener(new View.OnClickListener() monitorButton.setOnClickListener(new View.OnClickListener()
{ {
@Override @Override
@@ -48,7 +48,7 @@ public class StartActivity extends Activity
} }
}); });
final Button connectButton = (Button) findViewById(R.id.connectMonitorButton); final Button connectButton = (Button) findViewById(R.id.useParentDevice);
connectButton.setOnClickListener(new View.OnClickListener() connectButton.setOnClickListener(new View.OnClickListener()
{ {
@Override @Override