Commit Graph

125 Commits

Author SHA1 Message Date
Branden Archer
871ce134f1 Correct source of app icon in README.md
The source of the app icon was Icons4Android. Mentioning WPZOOM instead was a typo.
2016-01-12 19:06:35 -05:00
Branden Archer
51b56fd59c Merge pull request #12 from brarcher/release
Prepare 0.2 release
2016-01-03 19:44:34 -05:00
Branden Archer
e7681624cf prepare for release 2016-01-03 19:42:02 -05:00
Branden Archer
d1e0c60be1 Mention Japanese translations in NEWS 2016-01-03 19:41:51 -05:00
brarcher
c4333c59fd Merge pull request #8 from naofum/master
Added Japanese translation
2016-01-01 23:05:17 -05:00
naofum
057ec17e28 Updated Japanese translation 2016-01-02 10:25:37 +09:00
naofum
7d9ad919be Merge remote-tracking branch 'upstream/master' 2016-01-02 10:15:26 +09:00
brarcher
d5ee75a143 Merge pull request #11 from brarcher/enter-address
Allow parent to enter child's address and port to connect
2016-01-01 17:01:37 -05:00
Branden Archer
c032e9f642 Allow parent device to pair to child via IP Address and port
If mDNS fails to locate the child device, allow the parent device
to enter an IP address and port to connect.
2016-01-01 16:58:53 -05:00
Branden Archer
562a2bb164 Initial attempt at pairing with child device with address/port
On some networks or some mDNS implementations child discovery may not
work well. As an alternative, allow a parent to connect to a device
directly with an IP Address and port.
2016-01-01 16:20:24 -05:00
Branden Archer
7cb2138d13 Display IP Address and port of child device
Later, the parent will be able to use this information to pair
with the child device, as an alternative to using mDNS
2016-01-01 16:20:24 -05:00
Branden Archer
fddb8ceede Use camel case for variable name 2016-01-01 16:20:24 -05:00
brarcher
7f9023d281 Merge pull request #10 from brarcher/update-news
Update NEWS
2016-01-01 14:06:18 -05:00
brarcher
800439457b Update NEWS 2016-01-01 14:05:28 -05:00
brarcher
2ad4780557 Merge pull request #9 from brarcher/authors-file
Create AUTHORS file
2016-01-01 14:00:58 -05:00
brarcher
aa336c4cdb Create AUTHORS file 2016-01-01 14:00:05 -05:00
naofum
378ecd7fe8 Added Japanese translation 2016-01-02 00:15:34 +09:00
brarcher
d2528f0f79 Merge pull request #7 from brarcher/improve-audio
Improve audio
2016-01-01 02:30:27 -05:00
Branden Archer
1603ff11bb Replace \032 in a service name with " "
Some implementations of mDNS on Android display a space as
  \\032
and some display it as
  \032

Attempt to convert both types to a " " before displaying it
2016-01-01 01:22:20 -05:00
Branden Archer
b361d56539 Use byteBufferSize instead of bufferSize*2
byteBufferSize is already defined to be bufferSize*2
2016-01-01 01:21:28 -05:00
Branden Archer
f2007e1693 Change variables which never should change to 'final' 2016-01-01 01:20:26 -05:00
Branden Archer
f49e6be777 Increase TCP send buffer size to the minimum audio buffer size
The original buffer sized used was 1/2 what was intended.
2016-01-01 01:17:35 -05:00
Branden Archer
bd2726370f simplify playback of audio without AudioPlayer
The additional thread to feed the AudioTrack was unnecessary.
Because the AudioTrack API is blocking when data is written,
and internally it buffers data, writing the data as soon
as it is received from the network leads to better playback
performance. It is also much simpler.
2016-01-01 01:09:31 -05:00
brarcher
07892afea1 Merge pull request #6 from brarcher/use-list-view
Use a ListView to store discovered child devices
2015-12-29 16:26:29 -05:00
brarcher
ec9d22301e Merge branch 'master' into use-list-view 2015-12-29 16:25:37 -05:00
Branden Archer
a4f8adf7a5 Use a ListView to store discovered child devices
The previous approach was to list buttons in a TableLayout.
However, this approach does not work well if there are more
items than can fit on the screen.

To allow scrolling of items, and also a better presentation
of said items, use a ListView.
2015-12-29 16:19:56 -05:00
brarcher
0f99fec0eb Merge pull request #5 from brarcher/update-versionName
Update versionName to be 0.1 for initial release
2015-12-28 21:10:35 -05:00
Branden Archer
68d9c69a01 Update versionName to be 0.1 for initial release 2015-12-28 21:01:26 -05:00
brarcher
f1c34274c5 Merge pull request #4 from brarcher/add-news
Create NEWS
2015-12-28 20:24:13 -05:00
brarcher
039cf0447d Create NEWS 2015-12-28 20:23:29 -05:00
brarcher
8f5b0cc4d2 Merge pull request #3 from brarcher/staging
Better recovery from connection disconnects
2015-12-28 17:22:25 -05:00
Branden Archer
c022fa8168 Update README.md, removing some improvements which are complete 2015-12-28 17:17:14 -05:00
Branden Archer
cb4c48d5fb Remove unused import 2015-12-28 17:14:05 -05:00
Branden Archer
cfddbf22c1 Explicitly list some methods private
These methods are not needed outside of this class
2015-12-28 17:13:58 -05:00
Branden Archer
e35126096f Play audio alert if child is disconnected
If the child device disconnects unexpectedly, alert the
user, in case they were not expecting the disconnect.

The audio file being played is originally from here:
https://freesound.org/people/pan14/sounds/263655/
2015-12-28 17:13:34 -05:00
Branden Archer
0d829708c7 Only post message if connection to child was lost
If the connection to the child was intentionally severed, do not
post a "disconnected" message, as the activity is likely closing.
2015-12-28 17:11:58 -05:00
Branden Archer
6dd26b70fe improve logging for service discovery 2015-12-28 16:24:06 -05:00
Branden Archer
c25b0fdeba Allow child device to establish new connection after parent disconnects
Previously the monitor activity would only support one connection,
after which the activity would need to be restarted. With this change,
if a connection is established with a parent device but is eventually
disconnected the child device will begin advertising again.

Note that because the child device can only support one connection
at a time currently, after the connection is established it will
now stop advertising. When a connection is lost and advertising
starts again, it may end up advertising as another service. E.g.
  ProtectBabyMonitor (2)
instead of
  ProtectBabyMonitor
2015-12-28 16:12:49 -05:00
Branden Archer
375242d6fb Cleanup AudioRecord if socket throws an exception
Previously an IOException would prevent the AudioRecord
from being cleaned up.
2015-12-28 16:08:59 -05:00
Branden Archer
0c45351c5a Create wrapper function for unregistering baby monitor service
This will eventually be called in multiple places
2015-12-28 16:06:35 -05:00
brarcher
14118499fa Merge pull request #2 from brarcher/staging
Improve usability - volume control, survive screen rotation, screen stays on
2015-12-27 20:52:41 -05:00
Branden Archer
6af9dff004 Prevent screen rotation or resize from destroying activities
If the screen is rotated by default Android destroys the
activity and recreates it. This causes issues if a child and
parent are already paired, as the connection is lost.

To prevent Android from destroying the Activity, instead
invoke a configuration change on an orientation or resize.
2015-12-27 20:50:25 -05:00
Branden Archer
7f604c47ce Prevent child device from sleeping if listening
If the screen turns off, the child device will be unable to
record from the microphone. Keep the screen on in the monitor
activity to keep microphone on.
2015-12-27 20:50:25 -05:00
Branden Archer
516ba5a225 Allow volume control to adjust playback volume
The AudioTrack for playing audio from the child device
was sending audio to the voice call stream. It is more
appropriate to use the music stream. In addition, suggest
that the activity control the music stream's volume with
the hardware controls.
2015-12-27 20:50:25 -05:00
brarcher
133baf9a48 Merge pull request #1 from brarcher/staging
Improve layout and appearance of application
2015-12-27 17:40:18 -05:00
Branden Archer
9eaf90fcda Use Travis CI to build project 2015-12-27 17:36:45 -05:00
Branden Archer
2e9ca0de88 Improve listen activity layout with Linear Layout 2015-12-27 16:20:32 -05:00
Branden Archer
c455e966cd Use buttons to list available child devices
It may not have been obvious that the labels were clickable before.
2015-12-27 16:20:31 -05:00
Branden Archer
72d5c75357 Replace \\032 in reported service name with " "
When mDNS returns the service name, any spaces are replaced
with \\032. Change this back into a space
2015-12-27 16:20:31 -05:00
Branden Archer
dd737c0be5 Improve layout of dicover activity with Linear Layout 2015-12-27 16:20:31 -05:00