This is an automated email from the git hooks/post-receive script. unknown user pushed a commit to branch devel in repository Say My Texts. commit 9fa5ce283437c360ed1d3048aaaefa9c12478f1b Author: kmorin <kmorin@2d65e43e-0f24-4770-8739-84cc4fd997b9> Date: Wed May 14 17:52:04 2014 +0000 add doc + remove widget code (it has been moved to a branch) --- AndroidManifest.xml | 8 -- res/drawable-hdpi-v14/appwidget_bg_pressed.9.png | Bin 798 -> 0 bytes res/drawable-hdpi-v14/appwidget_dark_bg.9.png | Bin 731 -> 0 bytes .../appwidget_dark_bg_focused.9.png | Bin 856 -> 0 bytes res/drawable-hdpi/appwidget_bg_pressed.9.png | Bin 3098 -> 0 bytes res/drawable-hdpi/appwidget_dark_bg.9.png | Bin 2909 -> 0 bytes res/drawable-hdpi/appwidget_dark_bg_focused.9.png | Bin 3273 -> 0 bytes res/drawable-mdpi-v14/appwidget_bg_pressed.9.png | Bin 502 -> 0 bytes res/drawable-mdpi-v14/appwidget_dark_bg.9.png | Bin 467 -> 0 bytes .../appwidget_dark_bg_focused.9.png | Bin 523 -> 0 bytes res/drawable-mdpi/appwidget_bg_pressed.9.png | Bin 1908 -> 0 bytes res/drawable-mdpi/appwidget_dark_bg.9.png | Bin 1784 -> 0 bytes res/drawable-mdpi/appwidget_dark_bg_focused.9.png | Bin 2040 -> 0 bytes res/drawable-xhdpi-v14/appwidget_bg_pressed.9.png | Bin 1098 -> 0 bytes res/drawable-xhdpi-v14/appwidget_dark_bg.9.png | Bin 1005 -> 0 bytes .../appwidget_dark_bg_focused.9.png | Bin 1135 -> 0 bytes res/drawable/appwidget_dark_bg_clickable.xml | 24 ----- res/layout/say_my_texts_widget.xml | 22 ---- res/values/strings.xml | 2 +- res/xml/say_my_texts_widget_info.xml | 9 -- .../saymytexts/SayMyTextsWidgetProvider.java | 111 --------------------- src/site/fr/rst/dev.rst | 4 +- src/site/fr/rst/index.rst | 6 +- src/site/fr/rst/user.rst | 27 ++++- src/site/rst/dev.rst | 4 +- src/site/rst/index.rst | 6 +- src/site/rst/user.rst | 26 ++++- 27 files changed, 58 insertions(+), 191 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index df9b9ab..36af8fc 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -57,13 +57,5 @@ android:finishOnTaskLaunch="true" android:configChanges="orientation|screenSize|keyboardHidden"/> - <receiver android:name=".SayMyTextsWidgetProvider" > - <intent-filter> - <action android:name="android.appwidget.action.APPWIDGET_UPDATE" /> - </intent-filter> - <meta-data android:name="android.appwidget.provider" - android:resource="@xml/say_my_texts_widget_info" /> - </receiver> - </application> </manifest> diff --git a/res/drawable-hdpi-v14/appwidget_bg_pressed.9.png b/res/drawable-hdpi-v14/appwidget_bg_pressed.9.png deleted file mode 100644 index efacbcf..0000000 Binary files a/res/drawable-hdpi-v14/appwidget_bg_pressed.9.png and /dev/null differ diff --git a/res/drawable-hdpi-v14/appwidget_dark_bg.9.png b/res/drawable-hdpi-v14/appwidget_dark_bg.9.png deleted file mode 100644 index 02ee440..0000000 Binary files a/res/drawable-hdpi-v14/appwidget_dark_bg.9.png and /dev/null differ diff --git a/res/drawable-hdpi-v14/appwidget_dark_bg_focused.9.png b/res/drawable-hdpi-v14/appwidget_dark_bg_focused.9.png deleted file mode 100644 index ccc0177..0000000 Binary files a/res/drawable-hdpi-v14/appwidget_dark_bg_focused.9.png and /dev/null differ diff --git a/res/drawable-hdpi/appwidget_bg_pressed.9.png b/res/drawable-hdpi/appwidget_bg_pressed.9.png deleted file mode 100644 index 03ca2a1..0000000 Binary files a/res/drawable-hdpi/appwidget_bg_pressed.9.png and /dev/null differ diff --git a/res/drawable-hdpi/appwidget_dark_bg.9.png b/res/drawable-hdpi/appwidget_dark_bg.9.png deleted file mode 100644 index 3b29eae..0000000 Binary files a/res/drawable-hdpi/appwidget_dark_bg.9.png and /dev/null differ diff --git a/res/drawable-hdpi/appwidget_dark_bg_focused.9.png b/res/drawable-hdpi/appwidget_dark_bg_focused.9.png deleted file mode 100644 index 9fae722..0000000 Binary files a/res/drawable-hdpi/appwidget_dark_bg_focused.9.png and /dev/null differ diff --git a/res/drawable-mdpi-v14/appwidget_bg_pressed.9.png b/res/drawable-mdpi-v14/appwidget_bg_pressed.9.png deleted file mode 100644 index 5c03b8a..0000000 Binary files a/res/drawable-mdpi-v14/appwidget_bg_pressed.9.png and /dev/null differ diff --git a/res/drawable-mdpi-v14/appwidget_dark_bg.9.png b/res/drawable-mdpi-v14/appwidget_dark_bg.9.png deleted file mode 100644 index a245d91..0000000 Binary files a/res/drawable-mdpi-v14/appwidget_dark_bg.9.png and /dev/null differ diff --git a/res/drawable-mdpi-v14/appwidget_dark_bg_focused.9.png b/res/drawable-mdpi-v14/appwidget_dark_bg_focused.9.png deleted file mode 100644 index fa2d682..0000000 Binary files a/res/drawable-mdpi-v14/appwidget_dark_bg_focused.9.png and /dev/null differ diff --git a/res/drawable-mdpi/appwidget_bg_pressed.9.png b/res/drawable-mdpi/appwidget_bg_pressed.9.png deleted file mode 100644 index d060b77..0000000 Binary files a/res/drawable-mdpi/appwidget_bg_pressed.9.png and /dev/null differ diff --git a/res/drawable-mdpi/appwidget_dark_bg.9.png b/res/drawable-mdpi/appwidget_dark_bg.9.png deleted file mode 100644 index afe41b6..0000000 Binary files a/res/drawable-mdpi/appwidget_dark_bg.9.png and /dev/null differ diff --git a/res/drawable-mdpi/appwidget_dark_bg_focused.9.png b/res/drawable-mdpi/appwidget_dark_bg_focused.9.png deleted file mode 100644 index 8b4ce3f..0000000 Binary files a/res/drawable-mdpi/appwidget_dark_bg_focused.9.png and /dev/null differ diff --git a/res/drawable-xhdpi-v14/appwidget_bg_pressed.9.png b/res/drawable-xhdpi-v14/appwidget_bg_pressed.9.png deleted file mode 100644 index 97a3ba0..0000000 Binary files a/res/drawable-xhdpi-v14/appwidget_bg_pressed.9.png and /dev/null differ diff --git a/res/drawable-xhdpi-v14/appwidget_dark_bg.9.png b/res/drawable-xhdpi-v14/appwidget_dark_bg.9.png deleted file mode 100644 index 7ccb762..0000000 Binary files a/res/drawable-xhdpi-v14/appwidget_dark_bg.9.png and /dev/null differ diff --git a/res/drawable-xhdpi-v14/appwidget_dark_bg_focused.9.png b/res/drawable-xhdpi-v14/appwidget_dark_bg_focused.9.png deleted file mode 100644 index da9289e..0000000 Binary files a/res/drawable-xhdpi-v14/appwidget_dark_bg_focused.9.png and /dev/null differ diff --git a/res/drawable/appwidget_dark_bg_clickable.xml b/res/drawable/appwidget_dark_bg_clickable.xml deleted file mode 100644 index 7cfc9d2..0000000 --- a/res/drawable/appwidget_dark_bg_clickable.xml +++ /dev/null @@ -1,24 +0,0 @@ -<!-- - Copyright 2011 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - --> - -<selector xmlns:android="http://schemas.android.com/apk/res/android"> - <item android:drawable="@drawable/appwidget_bg_pressed" android:state_pressed="true" /> - <item android:drawable="@drawable/appwidget_dark_bg_focused" - android:state_focused="true" - android:state_enabled="true" - android:state_window_focused="true" /> - <item android:drawable="@drawable/appwidget_dark_bg" /> -</selector> diff --git a/res/layout/say_my_texts_widget.xml b/res/layout/say_my_texts_widget.xml deleted file mode 100644 index f4c634f..0000000 --- a/res/layout/say_my_texts_widget.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" - android:id="@+id/say_my_texts_widget" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:orientation="vertical" - android:gravity="center" - android:padding="2dp" - android:background="@drawable/appwidget_dark_bg_clickable"> - - <ImageView android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:src="@drawable/logo_small"/> - - <ImageView android:id="@+id/say_my_texts_widget_onoff_icon" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_marginTop="2dp" - android:layout_marginBottom="2dp"/> - -</LinearLayout> \ No newline at end of file diff --git a/res/values/strings.xml b/res/values/strings.xml index f67cb39..ed08936 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -36,7 +36,7 @@ <string name="send_sms_confirmation">You dictated: %s. Would you like to confirm, modify ou cancel?</string> <string name="call_action">call</string> - <string name="answer_action">answer</string> + <string name="answer_action">reply</string> <string name="quit_action">nothing</string> <string name="confirm_action">confirm</string> diff --git a/res/xml/say_my_texts_widget_info.xml b/res/xml/say_my_texts_widget_info.xml deleted file mode 100644 index c8bd497..0000000 --- a/res/xml/say_my_texts_widget_info.xml +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> - -<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android" - android:minWidth="40dp" - android:minHeight="40dp" - android:updatePeriodMillis="0" - android:initialLayout="@layout/say_my_texts_widget" - android:resizeMode="none"> -</appwidget-provider> \ No newline at end of file diff --git a/src/org/chorem/android/saymytexts/SayMyTextsWidgetProvider.java b/src/org/chorem/android/saymytexts/SayMyTextsWidgetProvider.java deleted file mode 100644 index 16bd523..0000000 --- a/src/org/chorem/android/saymytexts/SayMyTextsWidgetProvider.java +++ /dev/null @@ -1,111 +0,0 @@ -package org.chorem.android.saymytexts; - -/* - * #%L - * Say My Texts - * $Id:$ - * $HeadURL:$ - * %% - * Copyright (C) 2014 Code Lutin - * %% - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as - * published by the Free Software Foundation, either version 3 of the - * License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program. If not, see - * <http://www.gnu.org/licenses/gpl-3.0.html>. - * #L% - */ - -import android.app.PendingIntent; -import android.appwidget.AppWidgetManager; -import android.appwidget.AppWidgetProvider; -import android.content.Context; -import android.content.Intent; -import android.content.SharedPreferences; -import android.preference.PreferenceManager; -import android.util.Log; -import android.widget.RemoteViews; - -/** - * @author Kevin Morin (Code Lutin) - * @since x.x - */ -public class SayMyTextsWidgetProvider extends AppWidgetProvider { - - private static final String TAG = "SayMyTextsWidgetProvider"; - - protected static final String CLICK_ACTION = "org.chorem.android.saymytexts.action.APPWIDGET_CLICKED"; - - @Override - public void onUpdate(final Context context, final AppWidgetManager appWidgetManager, int[] appWidgetIds) { - final int N = appWidgetIds.length; - - // Perform this loop procedure for each App Widget that belongs to this provider - for (int i = 0; i < N; i++) { - final int appWidgetId = appWidgetIds[i]; - - // Create an Intent to call this onReceive method - Intent intent = new Intent(context, getClass()); - intent.setAction(CLICK_ACTION); - PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); - - // Get the layout for the App Widget and attach an on-click listener - // to the button - RemoteViews views = updateButtonState(context); - views.setOnClickPendingIntent(R.id.say_my_texts_widget, pendingIntent); - - //TODO - PreferenceManager.getDefaultSharedPreferences(context) - .registerOnSharedPreferenceChangeListener(new SharedPreferences.OnSharedPreferenceChangeListener() { - @Override - public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) { -// String enableReadingKey = context.getString(R.string.preference_enable_reading_key); -// if (key.equals(enableReadingKey)) { -// RemoteViews views = updateButtonState(context); -// appWidgetManager.updateAppWidget(appWidgetId, views); -// } - } - }); - - // Tell the AppWidgetManager to perform an update on the current app widget - appWidgetManager.updateAppWidget(appWidgetId, views); - } - } - - @Override - public void onReceive(Context context, Intent intent) { - super.onReceive(context, intent); - Log.d(TAG, "on receive " + intent.getAction()); - if (CLICK_ACTION.equals(intent.getAction())) { - SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(context); -// String key = context.getString(R.string.preference_enable_reading_key); -// boolean enabled = sharedPref.getBoolean(key, true); -// Log.d(TAG, "enabled " + enabled); -// sharedPref.edit().putBoolean(key, !enabled).commit(); - } - } - - protected RemoteViews updateButtonState(Context context) { - SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context); -// String key = context.getString(R.string.preference_enable_reading_key); -// -// boolean enabled = sharedPreferences.getBoolean(key, true); -// int drawableId = enabled ? -// android.R.drawable.button_onoff_indicator_on : -// android.R.drawable.button_onoff_indicator_off; -// -// RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.say_my_texts_widget); -// views.setImageViewResource(R.id.say_my_texts_widget_onoff_icon, drawableId); - -// return views; - return null; - } -} diff --git a/src/site/fr/rst/dev.rst b/src/site/fr/rst/dev.rst index 8f97972..b41c186 100644 --- a/src/site/fr/rst/dev.rst +++ b/src/site/fr/rst/dev.rst @@ -27,7 +27,9 @@ Documentation développeur L'application est composée : -- d'un service qui lit les SMS à voix haute +- d'un service qui lit les SMS à voix haute et gère les commandes vocales - d'une activité de configuration - d'un *BroadcastReceiver* qui reçoit les SMS et écoute les connexions bluetooth +- d'un *BroadcastReceiver* qui reçoit les commandes vocales +- d'un *BroadcastReceiver* qui reçoit le texte dicté en réponse - d'une application pour configurer le rapporteur de plantage \ No newline at end of file diff --git a/src/site/fr/rst/index.rst b/src/site/fr/rst/index.rst index 02edd02..b37729c 100644 --- a/src/site/fr/rst/index.rst +++ b/src/site/fr/rst/index.rst @@ -25,6 +25,6 @@ Bienvenue sur le site de Say My Texts ##################################### -Say My Texts est une application Android qui permet de lire à haute voix les SMS que vous recevez -quand des écouteurs sont branchés ou que le téléphone est connecté à un kit mains-libres bluetooth. -Ceci est particulièrement utile en vélo, quand on court ou en voiture. \ No newline at end of file +Say My Texts est une application Android qui permet de lire à haute voix les SMS que vous recevez. +Ceci est particulièrement utile en vélo, quand on court ou en voiture. +Vous pouvez également répondre à l'expéditeur soit en l'appelant soit en dictant la réponse. \ No newline at end of file diff --git a/src/site/fr/rst/user.rst b/src/site/fr/rst/user.rst index df21573..5059090 100644 --- a/src/site/fr/rst/user.rst +++ b/src/site/fr/rst/user.rst @@ -52,6 +52,10 @@ L'application a besoin des permissions suivantes : pour trouver le nom du contact à partir du numéro de l'envoyeur :BLUETOOTH: pour accéder aux appareils bluetooth connectés +:RECORD_AUDIO: + pour les commandes vocales et dicter la réponse +:CALL_PHONE: + pour rappeler l'expéditeur Configuration ~~~~~~~~~~~~~ @@ -59,7 +63,9 @@ Configuration Le lancement de l'application depuis le menu ouvre la configuration de l'application. Vous pouvez : -- activer ou désactiver la lecture +- activer ou désactiver la lecture en fonction du branchement ou non d'un casque ou de la connexion d'un appareil bluetooth +- activer l'intéraction à la réception d'un message +- si l'intéraction est activée, vous pouvez choisir le nombre d'essais de reconnaissance des commandes vocales (3 par défaut) - activer ou désactiver le `mode Heisendroid`_. - vous envoyer un SMS pour tester la lecture @@ -75,7 +81,20 @@ et suivie de "*You're goddamn right!*". Il s'agit là aussi d'une référence à .. _mode Heisendroid: #Mode_Heisendroid -Widget -~~~~~~ +Intéractions +~~~~~~~~~~~~ + +Si l'intéraction est activée, lorsque vous recevez un SMS, l'application vous propose 3 possibilités : + +- appeler l'expéditeur (dîtes "appeler") +- répondre par SMS en dictant la réponse (dîtes "répondre") +- ne rien faire (dîtes "rien") + +Si vous choisissez de répondre par SMS, vous devrez alors dicter la réponse. L'application vous énoncera ce qu'elle a compris. +Vous pourrez alors : + +- confirmer et envoyer la réponse (dîtes "confirmer") +- redicter le SMS (dîtes "corriger") +- annuler la réponse et quitter (dîtes "annuler") -Le widget vous permet d'activer ou désactiver la lecture depuis l'écran d'accueil. \ No newline at end of file +Si l'application ne comprend pas ce que vous avez dit (ce qui arrive malheureusement), elle vous demandera de répéter. \ No newline at end of file diff --git a/src/site/rst/dev.rst b/src/site/rst/dev.rst index a29e401..e041486 100644 --- a/src/site/rst/dev.rst +++ b/src/site/rst/dev.rst @@ -27,7 +27,9 @@ Developer documentation The application is composed of: -- a service which reads the SMS out loud +- a service which reads the SMS out loud and manage the vocal commands - an activity for the settings - a *BroadcastReceiver* which receives the SMS and listens to the bluetooth connections +- a *BroadcastReceiver* which receives the vocal commands +- a *BroadcastReceiver* which receives the dictated reply - an application to setup the crash report \ No newline at end of file diff --git a/src/site/rst/index.rst b/src/site/rst/index.rst index 152c1f8..49c8d35 100644 --- a/src/site/rst/index.rst +++ b/src/site/rst/index.rst @@ -25,6 +25,6 @@ Welcome to Say My Texts website ############################### -Say My Texts is an Android application which reads out loud the SMS you receive while a headset is plugged -or a bluetooth handfree is connected. -This is particulary useful when you are riding, running or driving. \ No newline at end of file +Say My Texts is an Android application which reads out loud the SMS you receive. +This is particulary useful when you are riding, running or driving. +You also can reply to the sender by calling him or by dictating the reply. \ No newline at end of file diff --git a/src/site/rst/user.rst b/src/site/rst/user.rst index a80cc71..62b1c6f 100644 --- a/src/site/rst/user.rst +++ b/src/site/rst/user.rst @@ -47,6 +47,10 @@ The application needs the following permissions: :MODIFY_AUDIO_SETTINGS: the voice synthetizer needs it :READ_CONTACTS: to match the phone number of the sender with the contact name :BLUETOOTH: to get the connected devices +:RECORD_AUDIO: + pour les commandes vocales et dicter la réponse +:CALL_PHONE: + pour rappeler l'expéditeur Settings @@ -55,7 +59,9 @@ Settings When you launch the application from the menu, the settings open. You can: -- enable or disable the reading +- enable or disable the reading depending if a headset is plugged or not or if a bluetooth device is connected +- enable or disable the interaction with the received messages +- if the interaction is enabled, you can configure the maximum number of tries to understand the vocal commands (3 by default) - enable or disable the `Heisendroid mode`_. - send a SMS to yourself to test the reading @@ -71,8 +77,20 @@ and followed by "*You're goddamn right!*". It is also a reference to one of the .. _Heisendroid mode: #Heisendroid_mode +Interactions +~~~~~~~~~~~~ + +If the interaction is on, when you receive an SMS, the app offers you 3 choices: + +- call the sender (say "call") +- reply by SMS by dictating the message (say "repy") +- do nothing (say "nothing") + +If you choose to reply by SMS, you can then dictate the message. The application will tell what it understands. +You can then: -Widget -~~~~~~ +- confirm and send the reply (say "confirm") +- dictate the text again (say "modify") +- cancel the reply and quit (say "cancel") -The widget permits you to enable or disable the reading from the home screen. \ No newline at end of file +If the app does not understand what you said (it happens), you will be asked to repeat. \ No newline at end of file -- To stop receiving notification emails like this one, please contact Chorem.org SCM administrator <admin+scm@chorem.org>.