Giter Club home page Giter Club logo

headsetharry's Introduction

Build Status

Headset Harry

Reads events through a connected headset, in the right language.

Events can be:

  • Incoming SMS
  • Incoming MMS
  • Incoming e-mail
  • Wireless network connected / disconnected
  • Calendar events
  • ...

One core concept is that Headset Harry tries to be smart about what language should be used for what events.

Headset Harry supports all the languages you have TTS support for.

Installing

Go here to install from Google Play Store:

https://play.google.com/store/apps/details?id=com.gmail.walles.johan.headsetharry

Building

Before building the project you need to add an app/fabric.properties file. Here's one that will enable you to build and run:

apiKey=0

If you want to do it properly, set up a (free) Crashlytics account and use this fabric.properties:

apiSecret=YOUR_BUILD_SECRET_HERE
apiKey=YOUR_API_KEY_HERE_

The values can be retrieved from https://fabric.io/settings/organizations by clicking the (very small) API Key and Build Secret links.

Releasing

  1. Do git tag and think about what the next version number should be.
  2. Do git tag --annotate version-1.2.3 to set the next version number.
  3. ./gradlew --no-daemon clean build
  4. Upload app/build/outputs/apk/app-release.apk to Google Play
  5. git push --tags

TODO Misc

  • If somebody gets a lot of unknown-language announcements, make a notification asking them if they want to enable more languages. If we collect some messages it might even be possible for us to ask about some specific language.
  • Report battery status for attached bluetooth devices, http://stackoverflow.com/a/19701412/473672, https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicViewer.aspx?u=org.bluetooth.characteristic.battery_level.xml
  • When a message comes in, enqueue it if a phone call is in progress.
  • When a phone call ends, read all events received during the call
  • What do we do if there's no TTS for a configured language when we try to say something? Something notification based perhaps.
  • Enable selecting language flavors. US or GB English? Swedish Swedish or Finnish Swedish?
  • GMail: "Mail from NN: SUBJECT"
  • "Phone call from NN" (NN is name if in contacts, not number)
  • Think about long messages, should we have an upper limit on how much we read?
  • Think about multipart messages, how do we handle them? How should we handle them?
  • Remove HardCodedStringLiteral suppressions and remedy all warnings
  • Enable PMD NLS warnings if it has those
  • Read any text parts of MMS messages. To get the contents, maybe watch the MMS database: http://stackoverflow.com/a/6152073/473672

DONE

  • Log to Crashlytics
  • Listen for incoming SMS messages in SmsReceiver.java
  • Upload to GitHub
  • When a message arrives, determine what language to use for reading it
  • Use an appropriate TTS engine / voice for reading the incoming SMS
  • When a message comes in, ignore it if a phone call is in progress
  • When a message comes in, ignore it unless sound is being routed through a headset
  • Verify that we work properly with a Bluetooth headset connected
  • Set app version name from git describe
  • On incoming messages, try to find a template in the same language as the message
  • Look up message sender's phone number for incoming messages and say the name of the sender rather than their phone number.
  • Present phone numbers for which we have no contact info as unknown
  • When finding TTS engines supporting the required language, try the system default TTS engine first
  • Make a Settings activity where one can set which languages to support.
  • For incoming messages, identify exactly the languages that have been configured in the settings.
  • Default the configured-languages list to the system language
  • Support speaking over Bluetooth SCO if available and supported.
  • Caps the language names in the settings, or at least the first one
  • Announce incoming MMS. We don't access their content; just announcing them will be enough for now.
  • Look up incoming phone numbers and read contact names rather than phone numbers.
  • Announce connections to and disconnections from Wifi networks
  • Add support for announcements over wired headsets
  • Somehow try to help / inform the user if the language they want has no TTS available.
  • Don't look up "phone number"s with letters in them, just pretend they are already looked up.
  • Think about whether we think we'll survive app upgrades. Yes, we're just receiving broadcasts, nothing that needs to be restarted for that.
  • Think about whether we think we'll survive device reboots. Yes, we're just receiving broadcasts, nothing that needs to be restarted for that.
  • Add a .travis.yml configuration to run lint and the unit tests
  • Add Findbugs to the Travis build
  • Don't log to Crashlytics if running in the emulator
  • Set app version code from git somehow
  • Make up a release process and document it
  • Protect the master branch on GitHub
  • Add pre-commit and pre-push hooks that verifies stuff
  • Add a license and put copyright headers in all files
  • Handle announcing in locales we don't have translations for.
  • Make sure people don't deselect all languages.
  • In the language selection activity, test-speak a language when it's chosen. Then, if that doesn't work, refer people to the system language settings or to Google Play Store for installing more engines / languages.
  • Announce Google Inbox incoming e-mail by reading system notifications
  • If we get multiple events at once, speak one at a time rather than just messing up.
  • Report most popular notification apps to Crashlytics.
  • If the user is playing music, pause or turn down the music while the message is being read.
  • "Calendar event: ..."
  • Make an icon / all the other graphics needed by Market
  • Get on top of the UtteranceProgressListener not getting notified reliably when phrases end; we don't want to leave things hanging in our queue.
  • Make it possible for users to send me the most recent log excerpt when they think Harry misbehaves.
  • If an Inbox sender name contains ":", remove everything up to and including the first colon. That part is most often the name of an Inbox label / bundle / whatever they call them.
  • Implement Marshmallow permissions handling
  • Make sure our icon works equally well on both black and white backgrounds.
  • Only contact Answers.getInstance() after we've initialized Crashlytics

headsetharry's People

Contributors

walles avatar

Stargazers

Ryan Warsaw avatar

Watchers

James Cloos avatar  avatar

headsetharry's Issues

Announcements after BT headset shut off

I had the following happen to me:

  1. I use my phone with a Bluetooth headset connected for a while.
  2. I turn off the Bluetooth headset.
  3. Now, directly after me turning the Bluetooth headset off, I got two announcements over the phone's speaker.

How can we get more data if this happens again so that it can be tracked down?

SMS not announced

I've seen a demonstration of an SMS not being announced even though (wired) headphones were connected.

No other information available.

Think about what we could do to be able to track this down.

Messes with BT headsets

Repro instructions:

  • On a Samsung Galaxy S6 with Android 5.1
  • Get a bluetooth headset running
  • Open the system bluetooth settings for the headset and make sure Media (A2DP) audio is disabled and Call audio (SCO) is enabled.
  • Toggle Wifi and listen for Headset Harry's Wifi announcement while watching the bluetooth headset settings

Expected results:

  • Settings should stay the same

Current result:

  • Settings change after the speech is done

Remove duplicate "Wifi disconnected" announcements

There should be no timeouts for their removal.

I think we get such events spuriously when we try to connect to a network but fail.

In this case I think we do:
DISCONNECTED ->
CONNECTING ->
DISCONNECTED

And reporting the last DISCONNECTED there doesn't make any sense.

Galaxy S6 Battery Optimization Disables App

If HH gets "optimized" by the S6 Battery Optimization it won't receive at least Wifi events any more, and it won't announce them either.

We should detect / inform / something about this.

Public Release

  • Prevent duplicate calendar event announcements
  • Let the beta users use it for some time after the 0.0.11 release candidate, released on May 31st 2016
  • Release!

Fall back on less specific languages when speaking

When test speaking Swedish, we do it in locale sv. This is supported by Google's TTS.

Then, when speaking "for real", we try to do it in locale sv_SE. This is not supported by Google's TTS.

If sv_SE fails, we should try just sv instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.