Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android voice recognition #4

Open
wants to merge 11 commits into
base: Android-VoiceRecognition
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions Strillone/.classpath
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
7 changes: 0 additions & 7 deletions Strillone/.settings/org.eclipse.jdt.core.prefs
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6
3 changes: 2 additions & 1 deletion Strillone/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
android:installLocation="auto">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WAKE_LOCK" /><uses-permission android:name="android.permission.RECORD_AUDIO" />

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />


<application android:icon="@drawable/icon_app_strillone"
android:label="@string/app_name"
Expand Down
3 changes: 2 additions & 1 deletion Strillone/bin/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
android:installLocation="auto">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WAKE_LOCK" /><uses-permission android:name="android.permission.RECORD_AUDIO" />

<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="8" />


<application android:icon="@drawable/icon_app_strillone"
android:label="@string/app_name"
Expand Down
Binary file modified Strillone/bin/Strillone.apk
Binary file not shown.
Binary file modified Strillone/bin/classes.dex
Binary file not shown.
1 change: 1 addition & 0 deletions Strillone/bin/classes/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/org/
/.gitignore
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 0 additions & 3 deletions Strillone/bin/jarlist.cache

This file was deleted.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified Strillone/bin/resources.ap_
Binary file not shown.
1 change: 1 addition & 0 deletions Strillone/gen/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/org/
/.gitignore
Binary file added Strillone/res/drawable-hdpi/icon_mic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Strillone/res/drawable-ldpi/icon_mic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Strillone/res/drawable-mdpi/icon_mic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
164 changes: 99 additions & 65 deletions Strillone/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,65 +1,99 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/upperleft">

<LinearLayout android:id="@+id/containerLinearLayout" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical">
<LinearLayout android:id="@+id/firstRowButtonsLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton android:id="@+id/upperLeftButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/cdupperleft"
android:src="@drawable/arrow_home"
android:background="@drawable/upperleft"
android:onClick="performUpperLeftAction"
android:clickable="false"
android:visibility="invisible" />

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton android:id="@+id/upperRightButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/cdupperright"
android:src="@drawable/arrow_up"
android:background="@drawable/upperright"
android:onClick="performUpperRightAction"
android:clickable="false"
android:visibility="invisible" />

</LinearLayout>

<LinearLayout android:id="@+id/secondRowButtonsLinearLayout" android:layout_width="fill_parent" android:layout_height="wrap_content">

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton android:id="@+id/lowerLeftButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/cdlowerleft"
android:src="@drawable/arrow_enter"
android:background="@drawable/lowerleft"
android:onClick="performLowerLeftAction"
android:clickable="false"
android:visibility="invisible" />

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton android:id="@+id/lowerRightButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:contentDescription="@string/cdlowerright"
android:src="@drawable/arrow_down"
android:background="@drawable/lowerright"
android:onClick="performLowerRightAction"
android:clickable="false"
android:visibility="invisible" />

</LinearLayout>
</LinearLayout>


<ImageView android:id="@+id/navigationArrowsImageView" android:layout_width="200dip" android:layout_height="200dip" android:src="@drawable/marchi" android:layout_centerInParent="true" />


</RelativeLayout>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/upperleft">

<LinearLayout
android:id="@+id/containerLinearLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:orientation="vertical" >

<LinearLayout
android:id="@+id/firstRowButtonsLinearLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton
android:id="@+id/upperLeftButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/upperleft"
android:clickable="false"
android:contentDescription="@string/cdupperleft"
android:onClick="performUpperLeftAction"
android:src="@drawable/arrow_home"
android:visibility="invisible" />

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton
android:id="@+id/upperRightButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/upperright"
android:clickable="false"
android:contentDescription="@string/cdupperright"
android:onClick="performUpperRightAction"
android:src="@drawable/arrow_up"
android:visibility="invisible" />
</LinearLayout>

<LinearLayout
android:id="@+id/secondRowButtonsLinearLayout"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton
android:id="@+id/lowerLeftButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/lowerleft"
android:clickable="false"
android:contentDescription="@string/cdlowerleft"
android:onClick="performLowerLeftAction"
android:src="@drawable/arrow_enter"
android:visibility="invisible" />

<org.informaticisenzafrontiere.strillone.ui.StrilloneButton
android:id="@+id/lowerRightButton"
android:layout_width="0dip"
android:layout_height="fill_parent"
android:layout_weight="1"
android:background="@drawable/lowerright"
android:clickable="false"
android:contentDescription="@string/cdlowerright"
android:onClick="performLowerRightAction"
android:src="@drawable/arrow_down"
android:visibility="invisible" />
</LinearLayout>

</LinearLayout>

<ImageView
android:id="@+id/navigationArrowsImageView"
android:layout_width="200dip"
android:layout_height="200dip"
android:layout_centerVertical="true"
android:layout_centerHorizontal="true"
android:src="@drawable/marchi" />

<View
android:id="@+id/touchView"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />

<ImageView
android:id="@+id/microphoneImage"
android:layout_width="120dip"
android:layout_height="120dip"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:layout_marginTop="60dp"
android:src="@drawable/icon_mic" />

</RelativeLayout>
24 changes: 24 additions & 0 deletions Strillone/res/values-en/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,28 @@
<string name="pos_section_selected">Section: %s.\u0020</string>
<string name="pos_no_article_selected">No selected article.</string>
<string name="pos_article_selected">Article: %s.</string>

<string name="start_voice">Say a command to interact with strillone.</string>
<string name="unrecognized_command">Invalid command.</string>
<string name="upperLeftString">up</string>
<string name="upperRightString">previous</string>
<string name="lowerLeftString">enter</string>
<string name="lowerRightString">next</string>
<string name="close">close</string>
<string name="close_exit">exit</string>
<string name="startRecognizer">Speech recognition started.</string>

<string name="bookmarks_mode">You are in the bookmarks mode.</string>
<string name="normal_mode">You are in the normal mode.</string>
<string name="bookmarks_error">No newspapers favourites.</string>
<string name="insert_newspaper_s_bookmark">Newspapers add in favourites.</string>
<string name="insert_section_s_bookmark">Section add in favourites.</string>
<string name="insert_article_s_bookmark">Article add in favourites.</string>
<string name="insert_newspaper_s_bookmark_error">Newspapers exist in favourites.</string>
<string name="insert_section_s_bookmark_error">Section exists in favourites.</string>
<string name="insert_article_s_bookmark_error">Article exists in favourites.</string>
<string name="delete_newspaper_s_bookmark">Newspapers removed from favourites.</string>
<string name="delete_section_s_bookmark">Section removed from favourites.</string>
<string name="delete_article_s_bookmark">Article removed from favourites.</string>

</resources>
29 changes: 27 additions & 2 deletions Strillone/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@

<string name="nav_first_header">Sei alla prima testata.</string>
<string name="nav_last_header">Sei all\'ultima testata.</string>
<string name="nav_use_lower_button_start_navigation_headers">Usa il pulsante in basso a destra per scorrere le testate.</string>
<string name="nav_use_lower_button_start_navigation_headers">Utilizza il pulsante in basso a destra per scorrere le testate.</string>

<string name="nav_first_sezione">Sei alla prima sezione.</string>
<string name="nav_last_sezione">Sei all\'ultima sezione.</string>
<string name="nav_use_lower_button_start_navigation_sezioni">Usa il pulsante in basso a destra per scorrere le sezioni.</string>
<string name="nav_use_lower_button_start_navigation_sezioni">Utilizza il pulsante in basso a destra per scorrere le sezioni.</string>

<string name="nav_first_articolo">Sei al primo articolo.</string>
<string name="nav_last_articolo">Sei all\'ultimo articolo.</string>
Expand All @@ -44,4 +44,29 @@
<string name="pos_section_selected">Sezione: %s.\u0020</string>
<string name="pos_no_article_selected">Nessun articolo selezionato.</string>
<string name="pos_article_selected">Articolo: %s.</string>


<string name="start_voice">Pronuncia un comando per interagire con strillone.</string>
<string name="unrecognized_command">Comando non valido.</string>
<string name="upperLeftString">sali</string>
<string name="upperRightString">precedente</string>
<string name="lowerLeftString">entra</string>
<string name="lowerRightString">successivo</string>
<string name="close">chiudi</string>
<string name="close_exit">esci</string>
<string name="startRecognizer">Riconoscimento vocale avviato.</string>

<string name="bookmarks_mode">Sei entrato nella modalità preferiti.</string>
<string name="normal_mode">Sei uscito dalla modalità preferiti.</string>
<string name="bookmarks_error">Non ci sono giornali preferiti.</string>
<string name="insert_newspaper_s_bookmark">Giornale aggiunto ai preferiti.</string>
<string name="insert_section_s_bookmark">Sezione aggiunta ai preferiti.</string>
<string name="insert_article_s_bookmark">Articolo aggiunto ai preferiti.</string>
<string name="insert_newspaper_s_bookmark_error">Giornale già presente nei preferiti.</string>
<string name="insert_section_s_bookmark_error">Sezione già presente nei preferiti.</string>
<string name="insert_article_s_bookmark_error">Articolo già presente nei preferiti.</string>
<string name="delete_newspaper_s_bookmark">Giornale rimosso dai preferiti.</string>
<string name="delete_section_s_bookmark">Sezione rimosso dai preferiti.</string>
<string name="delete_article_s_bookmark">Articolo rimosso dai preferiti.</string>

</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,7 @@ public interface IMainActivity {

public void notifyErrorDowloadingHeaders(String message);

public String getResourceTestata();//Morisco


}
Loading